4

I need some help with understanding JPEG 2000 imagery and coordinate systems.

I've downloaded NAIP files from USGS in jp2 format and am attempting to place them over a vrt height map I've created using QGIS 2.6. The .vrt shows the proper lat/lon decimal degrees such as -77.15, 41.91but when I add the .jp2 raster, it is completely off the map with coordinates like -8,575,110, 5,164,330. The jpeg 2000s are delivered in WGS 84 projection.

The jpeg 2000 Projection was "WGS_1984_Web_Mercator_Auxliary_Sphere". I used gdal warp to change it to a WGS 84 projection to the jpeg 2000 which coverted it to a GEOTIFF.

Comparing the information on the vrt and new GTIFF, the two files are nearly identical, the GEOGCS, DATUM, SPHEROID, AUTHORITIES, PRIMEM are identical. However, the Origins are different with vrt containing the proper decimal degree origin and the jpeg 2000 having the wacky -8.5 million, 5.1 million as the origin.

How do I align these files?

  • 1
    Somehow the gdalwarp didn't work. The jp2 is using EPSG:3857. Even though the coordinate ref system metadata was updated in the geotiff, the extent (and probably cell size) wasn't so it's still in WGS_1984_Web_Mercator_Auxiliary_Sphere. – mkennedy Jan 13 '15 at 17:55
3

@mkennedy provided a pointer.

The JPEG 2000 files were in WGS 84 format, but they used EPSG:3857 - Mercator Auxiliary Sphere. Reprojecting them only appears to work. You must specify EPSG:3857 as the source CRS system when you use gdal_warp to reproject them. Be sure also to specify to output CRS.

There was no documentation about the projection, and it wasn't obvious (to me, at least) that that EPSG:3857 was used even though the projection said it was Web Mercator Auxiliary Sphere. Now that I've realized what to search for, I find a few notations that help you backward translate that Web Mercator Auxiliary Sphere = EPSG:3857 but I'm not sure I'd hit on that by myself.

One QGIS specific note - when I reprojected the GEOTIFF and placed it and the vrt in layers in QGIS, the two still didn't align properly until I checked the project properties, set the CRS to my desired projection, and Enabled Projection on the Fly. Then they were both projected appropriately and aligned perfectly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.