Can you use .NET MVC web applications to allow user to upload a shapefile and save it to a ArcSDE database?

972
1
Jump to solution
09-13-2017 09:20 AM
MKF62
by
Occasional Contributor III

I have very little experience with .NET (C#) and I'm wondering if it's possible to allow a user to upload their shapefile and then the back-end would save it to our ArcSDE database. We don't need to display their shapefile or do anything with mapping procedures, we literally just need them to upload their file and have it save to our database with all the geometry information (so I could open it up in ArcGIS for Desktop for instance). How would you go about doing something like that?

All we would need is the geometry, we would want to ignore anything the user may have put in the shapefile's attribute table. We'd populate the ArcSDE geodatabase with their shapefile geometry and their answers to the fields in the web application.

To be clear, here is a scenario: 

User has a polygon shapefile that represent buildings. The attribute table contains an attribute on whether it's residential or commercial property. There is a field in the web application in which they can attach and upload their shapefile. There are also fields where the user is asked the square footage of the building and it's street address. The end product would be an ArcSDE geodatabase containing the polygon geometry and only attributes of square footage and street address. 

Tags (4)
1 Solution

Accepted Solutions
MKF62
by
Occasional Contributor III

To answer my own question 5 months later, this is definitely doable. Have users zip up their shapefile or a file geodatabase, upload it with your .NET application and unzip it. Write a python script and do all your geoprocessing in there, including connecting to databases and whatever. You could also do geoprocessing with ArcObjects in your .NET application, I simply used python because it's easier for me. Call that python script from your .NET application using ArcObjects IGeoProssessor2 interface. Use search/update/insert cursors to transfer and manipulate data in your python script.

View solution in original post

1 Reply
MKF62
by
Occasional Contributor III

To answer my own question 5 months later, this is definitely doable. Have users zip up their shapefile or a file geodatabase, upload it with your .NET application and unzip it. Write a python script and do all your geoprocessing in there, including connecting to databases and whatever. You could also do geoprocessing with ArcObjects in your .NET application, I simply used python because it's easier for me. Call that python script from your .NET application using ArcObjects IGeoProssessor2 interface. Use search/update/insert cursors to transfer and manipulate data in your python script.