How to convert GML to features and features to GML i ArcObjects?
We are building an application where we want to communicate with a service with GML but natively in our stand-alone application we want to use features and shapefiles.
Update: I have an ArcGIS Server so I could use that a bridge so I could use thatas a bridge beween the service and the client.
Best Answer
If you can give a few more details on what you're trying to accomplish (r/o? r/w?), I suspect that someone can probably give you more specifics. What you're attempting is a largish, but not insurmountable problem.
Oh, and one quick (obvious in retrospect) question - does the server you're talking to generate WSDL? If so, then you should be able to get VS2008 or 2010 to consume that directly, making life much more pleasant.
Edit: Add specifics from minor experimentation:
Starting from the link previously, I was able to generate C# classes using XSD. This generates classes that will fail at runtime due to the problem of XSD & .NET not generating strongly typed lists correctly. I also tried the suggestions / fixes from this post, just to see what's changed. I'm unconvinced that changing the underlying data types from double/int, etc. to string is the greatest idea ever, but it should work. In both cases the command to generate classes is:
And yeah, it's ugly. It also assumes that you've downloaded the entire set of schemas from OpenGIS.net (available here), which you've got to have to resolve all the references.
A quick comparison of the two resulting sets of classes shows surprisingly few differences (the original data type in parenthesis after the name of the changed member:
So, worst case, if you really needed to, you might want to use the "fixed" version of 3.2.1, and then update those few members to use custom serialization to get a more strongly typed implementation instead of simply using strings.