Skip to content
sindizzy edited this page Dec 30, 2020 · 4 revisions

Sample code that demonstrates how to open an existing shapefile and save that shapefile with a new file name.

using DotSpatial.Data;


private void button1_Click(object sender, EventArgs e)
{
    //Declare a new feature set
    IFeatureSet fs = FeatureSet.Open(@"C:\[Your File Path](Your-File-Path)\Municipalities.shp");

    //Saves the open shapefile
    fs.SaveAs(@"C:\[Your File Path](Your-File-Path)\Municipalities_Test.shp", true);
}
Clone this wiki locally