1

I'm a very new QGIS user and no GIS expert. I am having trouble getting jp2 images to align with a vrt raster I've created from SRTM images.

What I'm trying to do: Overlay SRTM data with corresponding jp2 images I've downloaded from USGS NAIP data. I'm using the CCM data in .jp2 format. Ultimately, I want to merge the images and cut them to the exact size of the SRTM vrt I've created. I then need to rescale the pixels and output them as a series of .bmp tiles for an aviation simulator scenery.

What I'm having trouble with: The jp2 images open in QGIS but although I specify WGS 1984, they are placed very far away from the actual lat/lon they are supposed to be at.

I know the data is in the jp2 files to do this, but there's something I'm missing about the jp2 format and how to get it to show up at the right lat/lon. I've searched but mostly find answers about manually georeferencing an image. I don't think that is necessary because I downloaded these images from the USGS using lat/lon coordinates as bulk files.

Using get info from the file, I get the following:

Driver: JP2OpenJPEG/JPEG-2000 driver based on OpenJPEG library Files: /Desktop/qgis_Photoreal/Tutorial_test/NAIP_Imagery/m_4207658_se_18_1_20130820_20131029.jp2 Size is 6964, 9373 Coordinate System is: 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.017453292519943295]], 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]] Origin = (-8550731.922834729775786,5170349.295708285644650) Pixel Size = (1.000000000000000,-1.000000000000000) Image Structure Metadata: INTERLEAVE=PIXEL Corner Coordinates: Upper Left (-8550731.923, 5170349.296) Lower Left (-8550731.923, 5160976.296) Upper Right (-8543767.923, 5170349.296) Lower Right (-8543767.923, 5160976.296) Center (-8547249.923, 5165662.796) Band 1 Block=4096x4096 Type=Byte, ColorInterp=Red Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Band 2 Block=4096x4096 Type=Byte, ColorInterp=Green Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Band 3 Block=4096x4096 Type=Byte, ColorInterp=Blue Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Overviews: arbitrary Mask Flags: PER_DATASET ALPHA Overviews of mask band: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Band 4 Block=4096x4096 Type=Byte, ColorInterp=Alpha Overviews: 3482x4686, 1741x2343, 870x1171, 435x585, 217x292, 108x146 Overviews: arbitrary

  • 1
    For what I understand your jp2 files are not in wgs84, but in some web mercator. Try setting the CRS to wgs84 / pseudo mercator EPSG: 3758. – Alexandre Neto Jan 4 '15 at 23:42
  • When I attempt to gdal_warp, I get the error message "No translation for Mercator_Auxiliary_Sphere to PROJ.4 format is known". I suspect this has something to do with either the project settings or the way I added the layer but am not sure what I've done wrong. – Krizbleen Jan 5 '15 at 14:24
  • Ah! It looks as if I had to specify both the input and output projection. This fixes the error in my comment above, but the image still does not in the proper lat/lon location. – Krizbleen Jan 5 '15 at 21:45
2

I have solved this problem by using a slightly different import specification. As Alexander Neto notes in his response, there was an issue with the web mercator.

Though the files are in WGS84 format, the location I am using the images is WGS 84/UTM zone 18N. Assigning that coordinate system in import would not place them properly. By using the more generic EPSG:4326 (WGS84) displayed them in the proper location.

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.