[gdal-dev] prj to proj.4

Hermann Peifer peifer at gmx.eu
Wed Mar 25 04:06:22 EDT 2009


Hi,

I am looking for a convenient way to convert the SRS parameters from a 
random shapefile.prj into proj.4 format. A command line interface would 
be most helpful for a non-programmer, like me.

As far as I can see: Grass' g.proj is expected to do the job, but I did 
not get any further than to this g.proj error: "Segmentation fault" :-(

I understand that the related functionality is in the OGR source code, 
somewhere in the neighbourhood of the OGRSpatialReference method, but 
how can a non-programmer make use of it?

My current workaround is to write a temporary *.gmt file and read the 
parameters from its header, e.g.:

# @Jp"+proj=utm +zone=33 +ellps=GRS80 +units=m +no_defs "

I have a vague feeling that this is not the most elegant way to do it 
and hope that some smarter people have a better solution.

Hermann



More information about the gdal-dev mailing list