Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GIS UTM raster misalginment #55

Open
etatara opened this issue Oct 23, 2021 · 0 comments
Open

GIS UTM raster misalginment #55

etatara opened this issue Oct 23, 2021 · 0 comments
Assignees
Milestone

Comments

@etatara
Copy link
Member

etatara commented Oct 23, 2021

Loading UTM rasters are misaligned by about 20 meters in the GIS display. This may be due to geotools conversion accuracy. QGIS and WorldWind Java example will align the Geography demo UTM Chicago raster properly. Geotools does not appear to be converting coords properly. There may also be pixel width issues that we need to account for in the display.

After investigating this issue, it appears to be due to projection conversion accuracy in the default transforms that the geotools library is using. The GIS display is based on the WorldWind Java library that requires WGS 84 lat/lon coordinates internally, so the Repast GIS display class automatically converts projected coordinates as in UTM data to WGS 84, irrespective of the CRS that’s used by the Repast Geography. I tested a code-generated WritableGridCoverage2D using WGS84 and loaded a raster in WGS84, and both of them line up perfectly with specific coordinates and Bing imagery layer, so that confirms that the Repast display is aligning layers properly as long as everything is in WGS84. I did see the misalignment when loading UTM raster data, and the misalignment appears to be around 20 meters. This misalignment isn’t obvious until the display is zoomed in pretty far, which is probably why I didn’t catch it in earlier testing.

If I load the UTM raster into QGIS, it aligns perfectly with the ESRI WGS84 mage layer, so QGIS is handling the projection properly. But it’s also telling that QGIS provides a list of transforms for UTM raster through the add layer wizard which suggests that QGIS may have more accurate transforms compared with the default geotools. I’ll need to look into this a bit more and for now they only suggestion I can make is to use something like QGIS to reproject your data to WGS84 from UTM since it has more accurate transforms.

@etatara etatara added this to the v.3.0.0 milestone Oct 23, 2021
@etatara etatara self-assigned this Oct 23, 2021
@etatara etatara modified the milestones: v.3.0.0, v.2.11.0 Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant