Skip to content
This repository has been archived by the owner on Oct 15, 2021. It is now read-only.

Conversion when using arcGISsdk plugin does not work? #13

Open
jwielebnowski opened this issue Mar 8, 2021 · 9 comments
Open

Conversion when using arcGISsdk plugin does not work? #13

jwielebnowski opened this issue Mar 8, 2021 · 9 comments

Comments

@jwielebnowski
Copy link

I am on UE 4.26.1
I cannot get conversion working when in the game that uses ArcGISMapSDK for Unreal.
Game created with simple steps:

  1. Create C++ empty game
  2. Add ArcGISMapSDK
  3. Select global scene with original location lat/long - 51.044701, -114.071899
  4. Add ArcGIS API key
  5. Select World Imagery

For the simulation plugin:

Projected CRS - EPSG:3403
Geographic CRS - EPSG:4326
Origin Projected X 65774
Origin Projected Y 5645079

Calculated original projection shows wrong lat/long location. 35.76269572, -78.73241143

Please find attached screenshots with all the settings including level blueprint with projection conversion and the game original output.

I wonder if I am using the plugin incorrectly or it just not working with ArctGIS sdk?

Jacek
EPSG4326-EPSG3403
GameArcGISController
GameEPSG4326-EPSH3403

@jwielebnowski
Copy link
Author

LevelBlueprint

@AlbanBERGERET-Epic
Copy link
Contributor

I tested it there with the latest version of the plugin and it works perfectly...

What I find strange with your application is that the Projected coordinates are 705000, 3960000 whereas they should have been 65774, 5645079.
IMO there is something wrong with your settings.

In this github version, there are 2 locations where you define the origin location

  • In project settings, and it cover all levels
  • In a specific level using a georef actor, to have a specific setting for this level.

If the level contains this actor, the project settings are ignored. And the 705000 3960000 values are those set by default. (Epic HQ in UTM...). It seems the georef system is initialized with the wrong ones. Where did you put your values. If it is in the project settings, make sure you don't have the georef actor in your level.

In the beginning, we thought it was easier when using several levels in a project, but in fact it is confusing, that's why we'll remove the project settings location in the next version.

ESRI
2021-03-08 16_49_50-SimulationDemo - Unreal Editor

@jwielebnowski
Copy link
Author

Packaged game shows a little bit better Not sure why is so much difference.
packaged

@jwielebnowski
Copy link
Author

Alban,
Thank you for your quick response. You were right, I had another settings in the GeoreferencingActor, which took over in the editor simulation. In the stand alone game, the projects settings took over so it shows much better. However, the values are still not correct. They are off. Here is what I see. The origin values set in the global scene do not match values reported in the game. It should be 51.044701 and -114.071899, but the plugin calculates in my version to 50.97389123, -114.06279879 and in yours to 50.97649004,-114.0745429.

image

Here is the example what the game is reporting versus the location on the map. I moved the game into the island. But the game reports the location a couple kilometers south. It does not look correct. And the movement is not correct either. I go East and game calculates West.
Here are the screenshots from the game and what it reports to the map.

image
Map with game location

It seems like the calculation is not correct. Can you confirm?

@AlbanBERGERET-Epic
Copy link
Contributor

AlbanBERGERET-Epic commented Mar 9, 2021 via email

@jwielebnowski
Copy link
Author

I don't see your images. Did you attach them?

@AlbanBERGERET-Epic
Copy link
Contributor

Sorry, it's because I used my web client to answer...

When just starting the application with your referencing. I have this
status bar :
1

Projected coordinates are correct, and if I transform between 3403 and
4326, I got what is displayed in the status bar.
2

So I guess our computations are correct.
If I do the opposite, taking the Lat/long you used in the ESRI origin I get
other results for the EPSG:3403 coordinates...
3

If I enter the right values in the georeferencing system, it seems
consistent...

4
5
6

So I think you made a mistake when computing your origin coordinates...

WRT your wrong deplacement mode, I indeed just noticed that ESRI chose a
different coordinate convention, with X pointing north and Y pointing East.
Thanks for pointing that out, I did not notice that before, and I'll fix it
in the next release !
For now, as a workaround, you can patch your engine coordinates before
calling Engine to Projected
something like X->Y, Y->X, Z->Z (TBC)

@jwielebnowski
Copy link
Author

Thank you, thank you. Yes, my initial projection values where wrong. The game starts perfectly now. However, I cannot work around the problem with updated location. It is like x/y scale in the game is wrong. I have tried different adjustments and this is the best one I got.
scale blueprint
Direction going E-W and N-S is correct, however, going N-S calculates distance that is too much:
scale show game island
scale sho map island
and going E-W too little:
scale show EW game
scale show EW map

So, I am thinking that it will not be able to work around the problem only by updating X/Y engine coordinates. Anything else you can suggest to work around that, or we need updated version?

@AlbanBERGERET-Epic
Copy link
Contributor

Well, I also just something strange while looking at this issue report :
#14

It seems that ESRI have their own rebasing algorithm and are not using the central one of the engine. Doing that, the georeferencing plugin is not able to compute the right coordinate. I just signaled them the issue. Hopefully they will address it soon. (IDK if they can provide their rebasing offset in a blueprint node).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants