[Proj] reprojection of sites within SHP file to standard output
John D. Evans
jdevans at gst.com
Wed Sep 14 11:14:19 EDT 2005
Hello Dave,
I just remembered... I once wrote a C utility to read portions of
shapefiles and draw pictures from them in any projection known to PROJ
(optionally transforming to/from NAD27/83). See the documentation and
links at
http://tull.mit.edu/orthoserver/vector/
Perhaps you can reuse portions of that code and save yourself some time.
(I recall we had to rethink the projection logic at least once.) It uses
old versions of Frank Warmerdam's shapelib, PROJ of course, and Tom
Boutell's libgd (which I presume you wouldn't need).
Of course, you could also rip out and reuse portions of MapServer.
--
John D. Evans, Ph.D. <john.evans at gsfc.nasa.gov>
NASA Geospatial Interoperability Office / GST, Inc.
1-301-286-0803 / 1-240-542-1133
*
*Frank Warmerdam wrote:
>On 9/14/05, Dave Sampson <gis at watersheds.ca> wrote:
>
>
>>all.
>>
>>Thanks for the repsonses.
>>
>>Ok, so after treading water for a few years in the open source world I'm
>>in over my head (again).
>>
>>BASH scripting is painful enough. I could only imagine what python would
>>be like.
>>
>>
>
>Dave,
>
>No offence, but at some point you will likely need to master some
>scripting language to give yourself flexability in doing GIS tasks
>with a mixture of software.
>
>
>
>>With regret of having to use ARCview could the following work
>>
>>1. Open shape in arcview (squirm)
>>2. run X,Y extension on SHP. Unless there is a UTM extension in existance.
>> If the shape is projected in nad27 can I assume the x,y collumns
>>would be UTM north/east?
>>3. Dump DB file as CSV
>> Could I keep the CSV with all 15000 points or should I create
>>seprate file for each point at this stage?
>>
>>
>
>There is no reason not to keep all the points in one file. I don't
>know anything about the "X,Y' extension so I don't can't address
>that.
>
>
>
>>4. THEN run proj for transformation of the two (x,y) columns in the CSV
>>file to produce my successive collumns.
>>
>>
>
>I am not sure how you are going to make proj ignore your siteid
>column and only use the following columns. Perhaps you will need
>to use the cut and paste programs to split up and patch together
>columns.
>
>
>
>>Can OGR be used directly to dump SHP points to a CSV?
>>
>>
>
>OGR can write directly to CVS but does not place the geometry
>in the CSV file (or at least not as separate columns).
>
>Best regards,
>
>
More information about the Proj
mailing list