Re: [gdal-dev] To know about centriod of a polygon shape file

2013-02-20 Thread Chaitanya kumar CH
Siva,

If you want to remove features with duplicate centroids, it is not safe to
use the spatial filter directly. A centroid may lie outside the geometry.

Make a duplicate layer using OGRDataSource::CopyLayer() and replace the
geometry in each feature with its centroid. So, the duplicate layer will
have all the corresponding centroids. Now you can loop through each feature
in the original layer and then get coinciding points by applying a spatial
filter on the duplicate layer.

Let us know how it went.


On Wed, Feb 20, 2013 at 12:04 PM, SIVA RAMA KRISHNA
s.r.kriis...@gmail.comwrote:

  Chaitanya,
   Fine i got your point .I wanted to know when do different  features have
 same centroids for  removing duplicate centriods

With Regards




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] To know about centriod of a polygon shape file

2013-02-19 Thread Chaitanya kumar CH
Siva,

Centroid of a polygon need not coincide with the centroid of it's buffer.


On Tue, Feb 19, 2013 at 11:21 AM, SIVA RAMA KRISHNA
s.r.kriis...@gmail.comwrote:

 Dear All,

 I am just working on  Shape files I am unable to detect duplicate
 centroids in a shape file

 .After buffering a polygon does centroids of both will match



 Any help in greatly  appreciated


 With Regards

 ___
 gdal-dev mailing list
 gdal-dev@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/gdal-dev




-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] To know about centriod of a polygon shape file

2013-02-18 Thread SIVA RAMA KRISHNA
Dear All,

I am just working on  Shape files I am unable to detect duplicate centroids
in a shape file

.After buffering a polygon does centroids of both will match



Any help in greatly  appreciated


With Regards
___
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev