0

I have a raster (TIFF) hillshade image that I would like to use in a mapping project. However, I'm having a hard time lining it up properly in QGIS. Through a series of investigations, I have determined that this problem might be caused by broken metadata. The raster was apparently created in ERDAS Imagine. I opened this raster in a text editor, to see if the metadata tags were visible. Sure enough, the following appears at the very end of the file:

#IMAGINE GeoTIFF Support
Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved
@(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $
Projection Name = NAD_1983_HARN_StatePlane_Hawaii_3_FIPS_5103_Feet
Units = us_survey_feet
GeoTIFF Units = feet|IMAGINE GeoTIFF Support
Copyright 1991 - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved
@(#)$RCSfile: egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST $
State Plane Zone -5103
NAD = HARN

This data indicates the right projection, with the right units (feet) (this projection is functionally similar to EPSG:3760). ArcGIS is apparently able to read these tags, and readily assigns it the correct projection. However, when I view metadata on this file using QGIS or the QGIS browser I see that the projection of the raster is different. Most of the parameters are correct, but the units are set to meters. See screenshot from QGIS browser below.

enter image description here

Using ArcGIS, I removed the spatial reference of [a copy of] this raster, and then reset it using the Define Projection tool. Unfortunately, the metadata shown in QGIS remained the same. This leads me to two questions.

  1. Where is this information coming from? Is there some other set of tags that QGIS is reading?
  2. How can I remove or repair this broken metadata?

I'd prefer an open source solution, but I'll accept anything that works for now.

2
  • If you're sure that the unit type is correct, did you try to reproject the raster via the Reproject or Save as tool in QGis? This should at least format the raster meta-data to the defined options.
    – Curlew
    Commented Jan 23, 2013 at 0:15
  • Save As doesn't work for rasters. Reproject and Assign Projection both set the units to feet and multiply every x and y in the raster by 3.28084. So it's still out of place.
    – L_Holcombe
    Commented Jan 23, 2013 at 2:34

1 Answer 1

2

gdal_translate has an option -a_srs to override the rasters crs information. You might change the command line created by Qgis manually before starting the operation.

2
  • There's actually a checkbox in the QGIS gdal_translate dialogue that allows you to select a target coordinate system, and writes the -a_srs argument for you. And this did exactly what I wanted. Thank you.
    – L_Holcombe
    Commented Jan 23, 2013 at 6:47
  • For your first question: QGIS does some kind of guessing upon the SRS information. In your case, it might guess wrong that units=feet is equivalent to the units=us-ft stored in the EPSG:3760 proj definition.
    – AndreJ
    Commented Jan 23, 2013 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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