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

New Post: Create Shapefile from Filtered Shapefile

$
0
0
I'm not sure how you queried your polygon shapefile. But if you could use FeatureLayers Selection you can simply convert this to FeatureSet by using IFeatureLayer.Selection.ToFeatureSet().
Then you can simply save the resulting featureset to a file.

Check whether the following code could work for you.
IFeatureLayer pFeatureLayer = PolygonShapefile as IFeatureLayer;
pFeatureLayer.SelectByAttribute("your query condition based on attributes"); // also have a look at the other select functions
FeatureSet fs = IFeatureLayer.Selection.ToFeatureSet();
fs.SaveAs("yourNewFile.shp");

Viewing all articles
Browse latest Browse all 3973

Trending Articles



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