Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is it possible to store geometry objects in a database using the ESRI Silverlight API? For this particular case, the client may have SQL Server 2005 installed instead of 2008 and therefore I can not use spatial types.

Any solution would also have to support clients who use ArcGIS Server 9.3, and therefore we would not be able to use the new editing capabilities in ArcGIS 10.

share|improve this question

5 Answers 5

At 9.3/9.3.1 level, it is not possible to directly save features to the database, using the ESRI Silverlight API.

What you could do, is to create a custom .NET Service, which saves the features in your Geodatabase database. you could call this service from your silverlight App. This Custom .NET service could use ArcObjects or the Web ADF to save the spatial data to the geodatabase

share|improve this answer
    
What about saving it to a standard SQL Server database instead of the GeoDatabase? Can I serialize the Geometry object and then cast it back again later on? –  Seth P. Aug 3 '10 at 13:40
    
You have mentioned in your question that the client may have SQL Server 2005. I don't think that 2005 supports Spatial types. You could always serialize the Geometries and then store that in SQL 2005. Do note that this SQL database won't be a geodatabase & other clients won't directly see it as a geometry. –  Devdatta Tengshe Aug 4 '10 at 0:34
    
That's fine. Are there any examples of serializing the geometries? When they are deserialized, they will still maintain all proper coordinates and spatial references? Thanks! --Seth –  Seth P. Aug 4 '10 at 5:53
up vote 1 down vote accepted

In the end, I used an XmlSerializer object to read and write the geometry data to the database as XML.

share|improve this answer

You are correct that you can serialize the geometries. They do have data contracts already defined so serialization is pretty straightforward.

Basically, you can roll your own service to handle the geometries and attributes on the server and them implement a custom layer class in the ESRI Silverlight API to then display and interact with your data. We've done similar things to integrate other data sources into an ESRI Silverlight app.

share|improve this answer

As far as I know, just jumping into Silverlight development with arcgis, if you can upgrade to 10.0, 2008 can also be used...

Don't quote me on it, just trying to think on what I remember hearing...

share|improve this answer
    
Sorry, I should've added that the solution must work with ArcGIS 9.3 –  Seth P. Aug 2 '10 at 20:50

Are you asking if its possible to do this without ArcGIS Server in the equation?

I know that if you are using the new SL API via ArcGIS Server 10, you can make use of the Editable Feature Layer and consume ready-to-go Editor Tasks.

An alternative would be to wait for the expected ArcGIS Application for Silverlight

Check the Flex equivalent --> Click on the Edit Widget

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.