PostGIS would be a fairly easy way to go. Probably just two steps: $ shp2pgsql states.shp states | psql -d gisdata $ pgsql2shp -f state_centroids.shp -h localhost gisdata "SELECT centroid(the_geom) AS the_geom, <other columns> FROM states"
- matt On 3/28/06, Bart van den Eijnden (OSGIS) <[EMAIL PROTECTED]> wrote: > You could load it into PostGIS, let PostGIS calculate the centroid and > export it again to shape using e.g. ogr2ogr. > > You probably could also write an OGR Python script doing this. > > Best regards, > Bart > > Chip Taylor wrote: > > >Is there an open source utility that will convert a polygon shapefile to a > >point shapefile, using the centroid of the polygon as the xy for the point? > > > >Chip Taylor > >Prepared Response, Inc > > > > > > > > > > > -- > Bart van den Eijnden > OSGIS, Open Source GIS > http://www.osgis.nl > -- Matt Perry [EMAIL PROTECTED] http://www.perrygeo.net
