1

I am creating a raster using GDAL and the IMAGINE file doesn't work in ERDAS because it doesn't recognize the projection.

Here is the code to generate a sample:

from osgeo import gdal

projectionWkt = """PROJCS["Albers Conical Equal Area",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4269"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",29.5],PARAMETER["standard_parallel_2",45.5],PARAMETER["latitude_of_center",23],PARAMETER["longitude_of_center",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["meters",1]]"""

outputRaster = gdal.GetDriverByName("HFA").Create("test.img",10,10,1,gdal.GDT_FLoat32)
outputRaster.setProjection(projectionWkt)

This file does work in ArcMap, but can't be used in ERDAS.

Am I doing something wrong with GDAL?

  • A guess: try changing the projection name to "Albers" from "Albers_Conic_Equal_Area". That's actually an alias supported by ArcGIS for...Oracle? EPSG? Can't remember off-hand. – mkennedy Jul 12 '13 at 19:15
  • @mkennedy nope :/ just tried it and ERDAS still can't use it. – Erik L Jul 12 '13 at 19:44

Your Answer

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

Browse other questions tagged or ask your own question.