[gdal-dev] ArcGIS 9.3 does not recognize .prj file made with GDAL tools

Howard Butler hobu.inc at gmail.com
Tue Dec 2 17:21:23 EST 2008


On Dec 2, 2008, at 4:16 PM, Dylan Beaudette wrote:

> Hi,
>
> Any idea on why Arc GIS can understand [1] version of a file, and  
> not another
> made by GDAL [2]. This projection file used to work with ArcGIS, and  
> now
> seems not to with version 9.3. Could I be generating the file  
> incorrectly?
>
> Here is the code (python) I used to generate the file [2] with GDAL.
>
>
> #!/usr/bin/env python
> # generate a PRJ file
>
> import osgeo.osr as osr
>
> # Set up spatial reference systems
> proj_object = osr.SpatialReference()
> proj_object.ImportFromProj4('+proj=aea +x_0=0.0 +y_0=0 +lon_0=-96  
> +lat_0=40.0
> +lat_1=20 +lat_2=60.0 ellps=GRS80 +datum=NAD83 +units=m +no_defs')
>
> print proj_object.ExportToWkt()
>
>
> Attachments:
> 1. ca_geo_new-arcmap.prj
> 2. ca_geo_new.prj
>

Might you need to MorphToESRI?

 >>> p = osr.SpatialReference()
 >>> p.ImportFromProj4("""+proj=aea +x_0=0.0 +y_0=0 +lon_0=-96  
+lat_0=40.0
... +lat_1=20 +lat_2=60.0 ellps=GRS80 +datum=NAD83 +units=m +no_defs""")
0
 >>> p.MorphToESRI()
0
 >>> p.ExportToWkt()
'PROJCS["Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Albers"],PARAMETER["standard_parallel_1",20],PARAMETER["standard_parallel_2",60],PARAMETER["latitude_of_origin",40],PARAMETER["central_meridian",-96],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]'
 >>>





More information about the gdal-dev mailing list