Create a Shapefile

440
5
Jump to solution
09-23-2019 07:38 AM
JessicaHarrell
New Contributor

I am building a UWP application and would like to export map data to a shapefile. It looks like the question had been asked a couple years back and that the ability to write shapefiles using arcgis runtime sdk net was on the roadmap but not yet possible. Now that some time has passed, I am interested in if this feature has been added. If so can you provide an example.

Reply
0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor

Hi,

That information is correct for editing of existing Shapefiles: it requires an ArcGIS Runtime Standard license. 

But it is not possible to create a new Shapefile from scratch.

Other formats may be a better option though because they allow you to persist additional information beyond the raw geometry and attributes, including the rendering info. Examples of these formats are KML and ArcGIS FeatureCollections. The recent 100.6 release of ArcGIS Runtime added support for creating/saving KML (for a sample see Create and save KML file | ArcGIS for Developers). Feature Collections are covered in the 'Editing' and 'Edit Features' topics referenced earlier.

Regards

Mike

View solution in original post

5 Replies
MichaelBranscomb
Esri Frequent Contributor

Hi,

Existing Shapefiles can be edited (features added / removed / updated) but it is not possible to create new Shapefiles. Can you share more details about your workflow for creating/editing Shapefiles? It's possible there are better ways to achieve the same goal (because Shapefiles have many limitations), for example FeatureCollections might support the capability you need.

Resources: 

Editing—ArcGIS Runtime SDK for .NET | ArcGIS for Developers 

Edit features—ArcGIS Runtime SDK for .NET | ArcGIS for Developers  

Feature layer (shapefile) | ArcGIS for Developers 

For the recommended local data and offline patterns see Work offline—ArcGIS Runtime SDK for .NET | ArcGIS for Developers 

Regards

Mike

JessicaHarrell
New Contributor

I was able to get on the phone with Esri technical support today. Not sure whom I spoke with but they said this was possible with the purchase of the Standard runtime license. Was that information incorrect? 

My application will allow users to place items on a map to represent their data. Once they have done so I would like to export their data locations and as well as some attributes to different file formats so they can consume their data in other apps. I have been successful representing their data in dxf files and kml files, but I would like to provide them shapefiles as well.

Reply
0 Kudos
MichaelBranscomb
Esri Frequent Contributor

Hi,

That information is correct for editing of existing Shapefiles: it requires an ArcGIS Runtime Standard license. 

But it is not possible to create a new Shapefile from scratch.

Other formats may be a better option though because they allow you to persist additional information beyond the raw geometry and attributes, including the rendering info. Examples of these formats are KML and ArcGIS FeatureCollections. The recent 100.6 release of ArcGIS Runtime added support for creating/saving KML (for a sample see Create and save KML file | ArcGIS for Developers). Feature Collections are covered in the 'Editing' and 'Edit Features' topics referenced earlier.

Regards

Mike

View solution in original post

MortenNielsen
Esri Frequent Contributor

If you know the schema of your data, you could include an empty shapefile with your app, then copy it somewhere and add features to it. Of course this only works if you know which columns and geometry types you'll be needing up-front.

TedKowal
Regular Contributor II

Don't know if this will be usable for you, but I have an ASP.NET/VB.NET app that uses Bing Maps API,  Users can draw shapes and using this DLL can create shape files.  It is not fast but it does work.  Windows 10 requires some changes to your registry..... Here is a link to the DLL and sources for Window 10 changes...

GitHub - rosspickard/ArcShapeFile: A C# library to read and write ESRI Shapefiles 

https://www.arcgis.com/home/item.html?id=a613e1282404495f8c075dd29ed057a5 

Reply
0 Kudos