[GIS] How feasible to extract data from KML/KMZ files

kml

We have a large bunch of KML files, they are basically global cable maps. In our company they are wide-spread and everybody uses them with Google Earth.

Now there is an interest to extract information from these files, e.g. Cable Lengths. With Google Earth extracting Cable Length is a very tedious task because you need to look at each tiny segment's height profile. So I started writing a software to read those files, problem is: the quality of most of those KML/KMZs is really low. Sometimes linestrings contain too many or even duplicate coordinate-sequences. You can even see that in Google Earth.

So question: does it make sense to try to parse these KMLs to calculate cables' total length? Or is this too much asked from KML format?

Best Answer

You can convert kml to other GIS formats such as shape using ogr2ogr, part of gdal. If there are too many points or double points this should not really cause problems: calculating a length is a fast progress.

Although they work with any GIS program, calculating the actual length is not that straightforward: most of them only work with projected data, and if you have global cables they should work with unprojected data as well.

BTW: a google search turned up with this tool to measure lengths in kml files: http://freegeographytools.com/2007/determining-google-earth-path-lengths

Related Question