This may not be the simplest way but you could use mapserver to draw the 
polygon layer as a point layer (at the centroids) and then use the wfs export 
format capability to export back to shapefile.

Mike

--
Michael Smith
US Army Corps
Remote Sensing GIS/Center

From: Chaitanya kumar CH <[email protected]<mailto:[email protected]>>
Date: Thu, 3 Nov 2011 08:12:39 +0530
To: katrin eggert 
<[email protected]<mailto:[email protected]>>
Cc: gdal dev <[email protected]<mailto:[email protected]>>
Subject: Re: [gdal-dev] Extract centroids

That's exactly what I meant. None of the prebuilt utilities do that.
You should try other desktop GIS programs like QGIS.

On Thu, Nov 3, 2011 at 12:12 AM, katrin eggert 
<[email protected]<mailto:[email protected]>> wrote:
Hi (again ! :) )
Ok you mean developing a function and use OGR library right? so none of the 
pre-built functions (e.g. ogr2ogr) is able to do that ?
THanks
Kat


2011/11/2 Chaitanya kumar CH 
<[email protected]<mailto:[email protected]>>
katrin,

You can programatically extract the centroids. You can use the OGR_G_Centroid() 
function on the geometry.

On Thu, Nov 3, 2011 at 12:06 AM, katrin eggert 
<[email protected]<mailto:[email protected]>> wrote:
Greetings
Just one question: I tried to find in Google if GDAL could be used to extract 
polygons centroids. But I was not able to find anything. Is it possible?
Kat

_______________________________________________
gdal-dev mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/gdal-dev



--
Best regards,
Chaitanya kumar CH.

+91-9494447584<tel:%2B91-9494447584>
17.2416N 80.1426E




--
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list 
[email protected]<mailto:[email protected]> 
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to