Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Read a kml file on c# project to give back the information

Tags:

c#

.net

kml

I'm trying to read a KML file in a C #. I need to read this information to get the information and treat it. Is there a library to read a KML giving back the information in a data structure? If not, how do you read a KML file? Is it like reading a XML file?

like image 656
Javier C Avatar asked Oct 21 '25 02:10

Javier C


1 Answers

I've found the solution. The problem was the new xsd file have multiple namespace, so to convert to classes using XSD.exe I needed two more files: atom-author-link.xsd and xal.xsd

After that I've used XSD.exe with this command line: xsd.exe /c ogckml22.xsd atom-author-link.xsd xal.xsd

Finally, I had classes from xsd file.

Additional information:

I've just found this library (http://sharpkml.codeplex.com/) to read/write kml 2.2 files. It's an update of libkml

like image 148
Javier C Avatar answered Oct 22 '25 16:10

Javier C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!