6

I have a file of state 2001 assembly districts outlines, from http://goo.gl/dJPyx in Mapinfo MIF format. I've created a kml file from that using ogr2ogr. These are the outlines of each assembly district. In the kml file each assembly district outline is inside a Placemark tag. I want to put the kml outlines in Google Fusion Tables but I need them split up so that each assembly district outline (Placemark) is in a separate kml file.

It looks like I might be able to do it with xslt but I was wondering if there is a more direct way to do it. Or perhaps split the mif file first.

I'm also worried about splitting the xml file using xslt because there are a bazillion coordinates, as one very very long line, between the coordinates tag down inside the Polygon tag.

2
  • Do you want all the areas to go into on Google Fusion Table, if you do you won't need to split them out into one kml for each area you; you can just upload one kml file.
    – Nathan W
    Commented Mar 13, 2011 at 2:07
  • Well, duh; that was too simple. Thanks very much for the easy answer. Why do I invariably assume that things need to be more complicated than they are?
    – lumpynose
    Commented Mar 13, 2011 at 8:01

1 Answer 1

0

I'm currently finding solutions for the same problem as this. For now, my initial plan is to do it programatically using either Java or C/C++. Since KML files are just text files, they can be parsed and string manipulated.

Another advantage with parsing it is that you can scrape the unnecessary decimal places needed for accuracy. I think 8-9 decimal points is more than enough for most GIS applications.

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