Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

New Post: Is there a way to findout if inserted polygon is overlapping existing data

$
0
0
I have read https://dotspatial.codeplex.com/wikipage?title=UnionShapesCS&referringTitle=Desktop_SampleCode for getting union of two polygons, which is stated below
public void UnionShapes()
    {
        IFeatureSet fs = FeatureSet.Open(@"C:\[Your File Path]\Centroids.shp");
        IFeatureSet result = fs.UnionShapes(ShapeRelateType.Intersecting);
        SaveFileDialog sfd = new SaveFileDialog();
        sfd.Filter = "*Shapefiles (*.shp)|*.shp";
        if (sfd.ShowDialog() != DialogResult.OK) return;
        result.SaveAs(sfd.FileName, true);
    }
I want to determine if the polygon I am inserting is overlapping an existing polygon already loaded and if true do not insert the polygon.
I would be grateful for some help in this.


Kind Regards
Worlanyo

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>