[Proj] reprojection of sites within SHP file to standard output
Dave Sampson
gis at watersheds.ca
Wed Sep 14 09:44:51 EDT 2005
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.
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?
4. THEN run proj for transformation of the two (x,y) columns in the CSV
file to produce my successive collumns.
If I create a seprate file for each of the 15000 points a BASH
script could run PROJ in a FOR EACH loop
How feasible does this sound? The ideal would be to keep all 15000
points in one file along the work flow.
Hamish,
Can OGR be used directly to dump SHP points to a CSV?
Thanks again for all the input.
>On 9/13/05, Dave Sampson <gis at watersheds.ca> wrote:
>
>
>>Hey yall,
>>
>>Been a while since I've posed a question so thought I'd reer the ugly
>>head again.
>>
>>What I am tryin to do is start by using a SHP file with close to 15000
>>points. The shp file is suposedly nad27. for each point I would like to
>>extract the nad27 co-ordinates of each site, reproject them to nad83,
>>and DDMMSS and DDMM.SS to an output file.
>>
>>the final goal is to have a CSV file that can be imported into a silly
>>proprietary dabase. the CSV would look something like
>>
>>SITEID, NAD27, NAD83, LAT/LONG, DDMMSS, DDMM.SS
>>
>>I think that's right... projections still confuse this geographer from
>>time to time.
>>
>>I'm not sure if maybe you'd need a NAD27E, NAD27W format.
>>
>>
>
>Dave,
>
>My suggestion would be to write a python script to do this
>using OGR to read the shapefile, and the OGR wrappers
>for GDAL to handle the datum shift. Of course, many other
>possible solutions exist too but you need to put something
>together for reading the shapefiles, and something for doing
>the datum shift. OGR is convenient in having both.
>
>If you look at:
> http://www.gdal.org/srctree/pymod/samples
>
>you should find a "tolatlong.py" script that gives a brief
>idea how to deal with coordinate transformations, and a
>assemblepoly.py script that demonstrates reading features
>with OGR.
>
>Quite a bit of work would have to be done to put it all
>together of course. The following tutorials might also
>be of help.
>
> http://www.gdal.org/ogr/osr_tutorial.html
> http://www.gdal.org/ogr/ogr_apitut.html
>
>You can use the FWTools build if you need a package
>with Python, OGR and PROJ.4 and nicely pre-setup
>(win32 or linux).
>
> http://fwtools.maptools.org/
>
>Best regards,
>
>
--
+---------------------------------------------------------------+
|Dave Sampson: Geographic Information System (GIS) Technician |
| |
|Centre for Sustainable Watersheds |
|Cooperative Approaches to Protect Canada's Water Resources |
| |
|14 Water St, P.O Box 280. Portland Ontario, Canada. K0G 1V0 |
|Lat: 44.700 Long: -76.19 |
|www.watersheds.ca gis at watersheds.ca |
+---------------------------------------------------------------+
More information about the Proj
mailing list