[postgis-users] Shapefile toolkit

Dave Potts dave.potts at pinan.co.uk
Sat Jun 9 13:34:15 PDT 2007


Stephen Woodbridge wrote:
> Dave Potts wrote:
>> Is anybody aware of any tools to creat or manipulate shape files?
>>
>> I have a shape file and I want to add some projection data to it
>
> PostGIS is a good tool for this. Or if you are C language compatible 
> you can get shapelib and write trivial tools for manipulating them. I 
> do this all the time.
>
> Question: what do you mean by: "add some projection data to it"?
Good question,  I have the .shp, .dbx and .shx files, but no .prj files.

Thanks for the tips.

Dave.
>
> Shapefiles per say do not have projection information. ESRI Arc* 
> tools, the newer ones anyway, create file.prj file but shapefiles 
> themselves have no projection definition.
>
> If on the other hand you have data that is in a different project and 
> you would like to merge is with data from a different projection, then 
> why not load it into postgis and multiple tables using shp2pgsql where 
> each table has the appropriate srid set. Then do something like:
>
> insert into tablea (select col1, col2, transform(the_geom, srid_from 
> tablea) from tableb);
>
> This will transform the data from tableb srid to tablea srid and 
> insert it into tablea
>
> then you can use pgsql2shp to dump the data back out to a shapefile.
>
> -Steve
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dave.potts.vcf
Type: text/x-vcard
Size: 85 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20070609/59e963dd/attachment.vcf>


More information about the postgis-users mailing list