[Gdal-dev] Old style ESRI prj files

Ari Jolma ari.jolma at tkk.fi
Wed Nov 14 12:28:10 EST 2007


Ethan Alpert kirjoitti:
> I'm still in the debugger looking at what is going on hopefully I'll
> come up with something. For now, it seems [$prj] although it is the type
> expected by the wrapper, causes pszItem to always be NULL when it
> fetches the list of strings. So arg2 contains no data when calling
> OSRSpatialReferenceShadow_ImportFromESRI
> I'm going to have to read the perl guts docs to get a better idea of why
> this is.
>
> Here's an ESRI prj file:
>
> PROJCS["WGS_1984_UTM_Zone_10N",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",
> SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Gr
> eenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_
> Mercator"],PARAMETER["False_Easting",500000],PARAMETER
> ["False_Northing",0],PARAMETER["Central_Meridian",-123],PARAMETER["Scale
> _Factor",0.9996],PARAMETER["Latitude_Of_Origin",0],UNI
> T["Meter",1]]
>   

Isn't this more or less WKT? At least ImportFromWkt() method eats it 
without complaints and the result seems ok. I saw somewhere an old prj 
file which had what looked like key, value -pairs.

Ari

>
> -----Original Message-----
> From: gdal-dev-bounces at lists.maptools.org
> [mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Ari Jolma
> Sent: Wednesday, November 14, 2007 12:29 AM
> To: gdal-dev
> Subject: [Gdal-dev] Old style ESRI prj files
>
> The ImportFromESRI method of OSR SpatialReference takes a list of 
> strings as a parameter. Could somebody give me or point me to an example
>
> of such a list?
>
> Hobu, you changed the API of that method to use a correct typemap but it
>
> seems that it miraculously worked earlier in the Perl bindings when it 
> was given the contents of a PRJ file in one string.
>
> Cheers,
>
> Ari
>
>   


-- 
Prof. Ari Jolma
Geoinformaatio- ja paikannustekniikka / Geoinformation and positioning
Teknillinen Korkeakoulu / Helsinki University of Technology
tel: +358 9 451 3886 address: POBox 1200, 02015 TKK, Finland
Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma





More information about the gdal-dev mailing list