We have several ArcMap georeferenced images (raster datasets) that we are attempting to open in QGIS without any luck. These are not inside of a geodatabase and are not Arcinfo Binary Grid format or Arcinfo Binary Coverages. QGIS supports GDAL rasters and the ArcMap created .aux.xml file contains the georeference points, but QGIS apparently does not recognize this file as it places my Texas image in a very small area of the Atlantic ocean off the coast of Africa (with a google maps basemap added). (THe only other files in the raster dataset are .tfwx and .ovr)
Is there something special I need to do within QGIS to apply the coordinates in the aux.xml created by ArcMap, or something else I'm missing?
Here are the contents of one such aux.xml file:
-
-
NEAREST
-
-
1
-
PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0],AUTHORITY["EPSG",3857]]
-22041259.177065704
-33265069.154224794
135385247.70505452
-100000
10000
-100000
10000
0.001
0.001
0.001
true
102100
3857
-
5.994281757832141
5.6742238617780458
2.0592992159490677
4.5229583592636118
2.014907522695573
8.8668953443025202
2.8272115205686532
7.7051733542912189
-
-10752195.345278211
3857531.2694506948
-10756947.906142347
3856205.4206410511
-10756935.616529588
3861470.3939956115
-10755980.997953685
3860058.8390891682
Answer
Your best bet is to rectify the georeferenced raster and that way there will be no problem when moving between different software. Save your raster as a GeoTiff or GeoJPG and (barring raster statistics) you can dispense with both the aux and the world file.
Any file with a 'W' at the end (e.g. TFW JPW etc) is a world file. A world file that ends in an 'X' denotes an approximate world file, that is one where the transformation cannot be adequately defined within the limits of a conventional world file. Such 'approximate' world files are specific to ArcGIS and Arc uses them in conjunction with the aux.xml file, so by itself, that aux.xml will not help you (as you've discovered).
The irony is that because both ArcGIS and QGIS use GDAL to read and write rasters, they both produce aux.xml file that in theory should be compatible but in practice, because QGIS doesn't use approximate world files, relying on the aux.xml becomes a liability and not a help.
The contents of a 'proper' world file for a rectified raster will look very different to the contents of an equivalent approximate world file (the one with the X). I don't personally recommend hacking it by just chopping off the X.
One more irony (IMHO) is that georeferenced rasters that don't have world files (GeoTiff, GeoJPG etc) have all the projection and CRS information in their headers (or should do) and therefore don't need the aux file except to store raster statistics (hence my opening statement). In fact, that aux file can be a menace because as soon as you open a raster an aux is made even if you only open an image for a quick look. Arc then incorrectly thinks it knows the CRS and projection for your raster before you even georeference it. I've had situations where the aux has got out of sync with the georeferencing process (at which point your only recourse is to kill the aux).
Solution - I always rectify!
No comments:
Post a Comment