Saving Graphics Layer to locally to SDCARD

3007
1
05-08-2012 10:49 AM
LukeCatania
New Contributor III
What is the point of the geometryToEsriShape method?  I would like to save my graphics layer to the sdcard, but this method just puts the the geometry in a shape format.  It does not do anything with the attributes and does not actually give the ability to save the create a shape file.
0 Kudos
1 Reply
GwenRoyakkers1
New Contributor
I solved this problem by writing a few functions to write features into an sqlite database.
I also made a tool for arcmap with C# to convert those records back to features on my desktop.

However I have only used this for Points.
So the only thing i needed to store in the database where the x and y for the geometry.

When you also need to store lines, polylines or polygons, you will need to now how to store them in a database.
To store this in a sqlite database there are several ways.

I found decent information to do this on the website of the "open geospatial consortium" (http://www.opengeospatial.org/standards/is)
in the document "OpenGIS Implementation Specification for Geographic information - Simple feature access - Part 2: SQL option",
you will find the information you need on how to store geometry as text inside a database.

Unfortunately there is no way to export features to the sdcard out of the box.
And writing classes to store geometry that is more complex than points will take a lot of work.

This should give you a good start, but I won't recommend this solution for complex geometry.
For complex geometry it is easier to serialize the objects, export them, and then put them back together on your desktop.

Regards

Gwen
0 Kudos