On Mar 26, 2009, at 9:59 AM, Danny Shevitz wrote: >> Potentially round out the trip with >> >>>>> placemark = keytree.placemark(id='...', geometry=shape, >> name='...') >> > > I'm not sure of the best way to do this, but this is absolutely useful > and what I need. I am working with geometries using Shapely and I > want to > render the output into KML. > > Since KML is just XML, I'm currently rolling my own KML using > ElementTree, > but it sure seems like someone could do something useful for once > and for all > that would take geometries and help constuct the KML file via a > functional API > without having to mess directly with ElementTree. > > Just a pipe dream... (along with ElementTree pretty printing...) > > thanks, > Danny
Well, there's always libkml, but I prefer ElementTree. I just upload keytree 0.2 to PyPI and the README has an example of creating KML elements for the ElementTree API from geojson and Shapely objects. http://pypi.python.org/pypi/keytree/0.2 Sean -- Sean Gillies [email protected] http://sgillies.net _______________________________________________ Community mailing list [email protected] http://lists.gispython.org/mailman/listinfo/community
