projection info (.prj file) from ESRI Shape [message #47359] |
Tue, 07 February 2006 03:01  |
Weihua FANG
Messages: 26 Registered: January 2006
|
Junior Member |
|
|
hi, all,
Just finished some codes for reading vector and attribute data from
ESRI Shape by using IDLffShape Object.
ESRI shape file stores its projection (if any) in a text file (.prj).
But IDLffShape does not support reading it. My shape files can be in
different projection, very tedius to change them mannually to
longitude/latitude in other GIS like ArcGIS.
Is there any IDL routine, which can read/ parse the projection
information from projection file (.prj file) of ESRI Shape?
thanks.
Fang
|
|
|
Re: projection info (.prj file) from ESRI Shape [message #47418 is a reply to message #47359] |
Thu, 09 February 2006 02:51  |
Weihua FANG
Messages: 26 Registered: January 2006
|
Junior Member |
|
|
Hi, Hyer,
Gonna hack around the library.
Thank you for your information.
Fang
Ed Hyer Wrote:
> Fang,
>
> The routine you're looking for may not be out there. Thing is, not even
> all of ESRI's own software bothers to read the .PRJ files.
>
> But, if you open them up, you can see that the format is very simple,
> and you could handily write a reader for them. But if you are really
> dealing with many different projections, that could be too much.
>
> The GDAL package, a free Unix/Linux project, includes a utility called
> OGR2OGR (http://www.gdal.org/ogr/ogr2ogr.html). Docs for that program
> assert that "This program can be used to convert simple features data
> between file formats performing various operations during the process
> such as spatial or attribute selections, reducing the set of
> attributes, setting the output coordinate system or even reprojecting
> the features during translation."
>
> This program can take shapefile input and give shapefile output, and
> (since it is Unix) can be run in batch mode.
|
|
|
Re: projection info (.prj file) from ESRI Shape [message #47428 is a reply to message #47359] |
Wed, 08 February 2006 09:10  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Fang,
The routine you're looking for may not be out there. Thing is, not even
all of ESRI's own software bothers to read the .PRJ files.
But, if you open them up, you can see that the format is very simple,
and you could handily write a reader for them. But if you are really
dealing with many different projections, that could be too much.
The GDAL package, a free Unix/Linux project, includes a utility called
OGR2OGR (http://www.gdal.org/ogr/ogr2ogr.html). Docs for that program
assert that "This program can be used to convert simple features data
between file formats performing various operations during the process
such as spatial or attribute selections, reducing the set of
attributes, setting the output coordinate system or even reprojecting
the features during translation."
This program can take shapefile input and give shapefile output, and
(since it is Unix) can be run in batch mode.
|
|
|