Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a file of state 2001 assembly districts outlines, from 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.

share|improve this question
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 Mar 13 '11 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 Mar 13 '11 at 8:01
@NathanW You might want to post it as an answer so that Rusty can accept it. Issue solved! :D – R.K. Dec 22 '12 at 3:45

1 Answer 1

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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