Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
    
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 Jan 23 '13 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 Jan 23 '13 at 2:34
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 Jan 23 '13 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. –  Andre Joost Jan 23 '13 at 7:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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