I'm using fastkml in python to parse a large kml file where Google Earth has made a new style for every placemark.
I'm trying to parse subfolders which contain a point placemark and/or a polygon placemark, whereby each placemark is assigned one of 5 icon styles or one of 5 polygon styles (respectively), then apply that style accordingly.
root/fldr1/num1/pm1 if pm1 is Point: pm1.styleUrl = "#point_class2" elif pm1 is Polygon: pm1.styleUrl = "#poly_class2" else: raise Exception ("Nope")
- Should/(can) I merge the styleUrls?
- Is there a better way I should go about tidying 50000 lines of superfluous Google Earth-created styles?
NB. I asked a similar more specific question here