On Fri, 2009-08-21 at 10:50 +0000, John Smith wrote:
> --- On Fri, 21/8/09, Peter Körner <[email protected]> wrote:
> 
> > If you have some kind of database anyway (e.g. postgis for
> > mapnik-rendering on cassini, it shouldn't be the problem.
> 
> I have a suitable query, I just don't know how to turn the query into kml 
> data, such as lines.
> 
> select way from planet_osm_polygon where boundary='administrative' and 
> "admin_level"='10'


One possibility is:

ogr2ogr -f "KML" admin.kml PG:"dbname=gis" -sql "select 
name,transform(ST_ExteriorRing(way),4326) from planet_osm_polygon where 
boundary='administrative' and "admin_level"='10'"

This admin.kml loads up fine in GoogleEarth and the boundaries appear as lines.

postgis also has an AsKML() function but this does not appear to create
a complete KML document. It outputs the geometry data with no styling.

        Jon



_______________________________________________
talk mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/talk

Reply via email to