Re: [OSM-talk] Weather overlay
--- On Fri, 21/8/09, Peter Körner osm-li...@mazdermind.de 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' ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
xplanet can download cloud images and overlay them onto a map/globe http://xplanet.sourceforge.net/ it just needs an OSM world-map image in plate-carre format to use as the ground image, and you'd have a cloud map. On Thu, Aug 20, 2009 at 2:05 PM, Peter Körnerosm-li...@mazdermind.de wrote: Has anyone ever made an whether-overlay for openstreetmap using the Google [1] or the Yahoo API [2]? I think this would be possible with mapnik: * load a planet.osm into some kind of db (or process it in-place with a sax-parser) * find the regions with ZIP, PLZ or whatever * fetch the whether-info for these regions * add the regions to a/the postgis-db * let a renderd render the overlay-tiles using a stylesheet that only displays those whether-regions * server them using openlayers as an overlay May i'll try this but I wanted to share the idea. Peter [1] http://www.google.com/ig/api?weather=londonhl=en [2] http://developer.yahoo.com/weather/ ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
On Fri, 2009-08-21 at 10:50 +, John Smith wrote: --- On Fri, 21/8/09, Peter Körner osm-li...@mazdermind.de 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 talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
I'm currently playing with the PostGIS Queries, too. I tried sth. like SELECT osm_id, name FROM planet_osm_polygon WHERE boundary='administrative' AND ST_Within(way, (SELECT way FROM planet_osm_polygon WHERE boundary='administrative' AND admin_level='2' AND name='Deutschland' LIMIT 1) ) to get all boundaries in germany but i only get Aachen [1] and Deutschland [2] back. Any idea? Peter [1] http://www.openstreetmap.org/?relation=62665 [2] http://www.openstreetmap.org/?relation=51477 Jon Burgess schrieb: On Fri, 2009-08-21 at 10:50 +, John Smith wrote: --- On Fri, 21/8/09, Peter Körner osm-li...@mazdermind.de 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' ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
admin_level=2 is country level, 4 and lower for state and regional boundaries. I'm aware of that and the admin_level=2 is only used in the subquery to determine the boundary of germany. The main query runs without a admin_level-condition, only with boundary='administrative', does it? Peter ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, John Smith delta_foxt...@yahoo.com wrote: ERROR 1: ERROR: AddToPROJ4SRSCache: Cannot find SRID (4326) in spatial_ref_sys nm, found this: psql gis /usr/share/postgresql-8.3-postgis/spatial_ref_sys.sql Then run this SQL query: INSERT into spatial_ref_sys (srid, auth_name, auth_srid, srtext, proj4text) values (900913 ,'EPSG',900913,'GEOGCS[WGS 84, DATUM[World Geodetic System 1984, SPHEROID[WGS 84, 6378137.0, 298.257223563,AUTHORITY[EPSG,7030]], AUTHORITY[EPSG,6326]],PRIMEM[Greenwich, 0.0, AUTHORITY[EPSG,8901]], NIT[degree,0.017453292519943295], AXIS[Longitude, EAST], AXIS[Latitude, NORTH],AUTHORITY[EPSG,4326]], PROJECTION[Mercator_1SP],PARAMETER[semi_minor, 6378137.0], PARAMETER[latitude_of_origin,0.0], PARAMETER[central_meridian, 0.0], PARAMETER[scale_factor,1.0], PARAMETER[false_easting, 0.0], PARAMETER[false_northing, 0.0],UNIT[m, 1.0], AXIS[x, EAST], AXIS[y, NORTH],AUTHORITY[EPSG,900913]] |','+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgri...@null +no_defs'); ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: I'm aware of that and the admin_level=2 is only used in the subquery to determine the boundary of germany. The main query runs without a admin_level-condition, only with boundary='administrative', does it? What boundaries are you trying to find? ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
John Smith schrieb: --- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: I'm aware of that and the admin_level=2 is only used in the subquery to determine the boundary of germany. The main query runs without a admin_level-condition, only with boundary='administrative', does it? What boundaries are you trying to find? Any :) I'm just getting started. I tried to find any boundaries in a given Area, in this case in Germany. Peter ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
John Smith schrieb: --- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: Any :) I'm just getting started. I tried to find any boundaries in a given Area, in this case in Germany. Leave admin_level= out of the query Thank you for the hint :) Please take a look at my query, again: SELECT osm_id, name FROM planet_osm_polygon WHERE boundary='administrative' AND ST_Within(way, (SELECT way FROM planet_osm_polygon WHERE boundary='administrative' AND admin_level='2' AND name='Deutschland' LIMIT 1) ) These are two seperate queries: SELECT osm_id, name FROM planet_osm_polygon WHERE boundary='administrative' AND ST_Within(way, ... ) and SELECT way FROM planet_osm_polygon WHERE boundary='administrative' AND admin_level='2' AND name='Deutschland' LIMIT 1 The second should fetch the border of Germany and the first one all boundaries in that. At least that's what I want it to do :) Peter ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: boundary='administrative' AND admin_level='2' AND name='Deutschland' LIMIT 1) ) to get all boundaries in germany but i only get Aachen [1] and Deutschland [2] back. Any idea? admin_level=2 is country level, 4 and lower for state and regional boundaries. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Jon Burgess jburgess...@googlemail.com wrote: 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' I get the following error and have no idea how to get round/past it: ERROR 1: ERROR: AddToPROJ4SRSCache: Cannot find SRID (4326) in spatial_ref_sys 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. I found that as well, but couldn't figure out how to make use of it. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: Any :) I'm just getting started. I tried to find any boundaries in a given Area, in this case in Germany. Leave admin_level= out of the query ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
John Smith schrieb: --- On Sat, 22/8/09, Jon Burgess jburgess...@googlemail.com wrote: This admin.kml loads up fine in GoogleEarth and the boundaries appear as lines. Thanks for your help, just admin_level=10 information for only the Australia region is 186M uncompressed and 76M when zipped. Will have to come up with a new plan where the map moves request a small section of this information, rather than everything. I thought of this before and that's why I would suggest to do it with mapnik mod_tiles or so (as is said in my initial posting). Peter ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Jon Burgess jburgess...@googlemail.com wrote: This admin.kml loads up fine in GoogleEarth and the boundaries appear as lines. Thanks for your help, just admin_level=10 information for only the Australia region is 186M uncompressed and 76M when zipped. Will have to come up with a new plan where the map moves request a small section of this information, rather than everything. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: I thought of this before and that's why I would suggest to do it with mapnik mod_tiles or so (as is said in my initial posting). I currently do, but I was hoping to avoid needing 2 tile sets just for showing the admin_level=10 boundary. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Sat, 22/8/09, Peter Körner osm-li...@mazdermind.de wrote: Thank you for the hint :) I really shouldn't be emailing when tired... The second should fetch the border of Germany and the first one all boundaries in that. At least that's what I want it to do :) I just ran that query on my database and used name='Australia' and it works as you thought it should. SELECT count(osm_id) FROM planet_osm_polygon WHERE boundary='administrative' AND ST_Within(way, (SELECT way FROM planet_osm_polygon WHERE boundary='administrative' AND admin_level='2' AND name='Australia' LIMIT 1)) I'm still waiting for it to finish counting, but I ran it with a limit 10 and it worked fine. ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
[OSM-talk] Weather overlay
Has anyone ever made an whether-overlay for openstreetmap using the Google [1] or the Yahoo API [2]? I think this would be possible with mapnik: * load a planet.osm into some kind of db (or process it in-place with a sax-parser) * find the regions with ZIP, PLZ or whatever * fetch the whether-info for these regions * add the regions to a/the postgis-db * let a renderd render the overlay-tiles using a stylesheet that only displays those whether-regions * server them using openlayers as an overlay May i'll try this but I wanted to share the idea. Peter [1] http://www.google.com/ig/api?weather=londonhl=en [2] http://developer.yahoo.com/weather/ ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
On Thu, 20 Aug 2009 15:05:02 +0200, Peter Körner osm-li...@mazdermind.de wrote: Has anyone ever made an whether-overlay for openstreetmap using the Google [1] or the Yahoo API [2]? Probably not exactly what you're after, but you might find this interesting: http://www.kdedevelopers.org/node/3991 Marble can be downloaded for Windows, Mac and Linux. Regards, Tom ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
maybe you could skip the complete db and make a dynamic kml layer (by using a php file that outputs xml) in openlayers Rob 2009/8/20 Peter Körner osm-li...@mazdermind.de Has anyone ever made an whether-overlay for openstreetmap using the Google [1] or the Yahoo API [2]? I think this would be possible with mapnik: * load a planet.osm into some kind of db (or process it in-place with a sax-parser) * find the regions with ZIP, PLZ or whatever * fetch the whether-info for these regions * add the regions to a/the postgis-db * let a renderd render the overlay-tiles using a stylesheet that only displays those whether-regions * server them using openlayers as an overlay May i'll try this but I wanted to share the idea. Peter [1] http://www.google.com/ig/api?weather=londonhl=en [2] http://developer.yahoo.com/weather/ ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
--- On Fri, 21/8/09, Rob r...@coolbegin.com wrote: maybe you could skip the complete db and make a dynamic kml layer (by using a php file that outputs xml) in openlayers Any suggestions on exporting admin boundaries from a database to kml format? ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk
Re: [OSM-talk] Weather overlay
Any suggestions on exporting admin boundaries from a database to kml format? If you have some kind of database anyway (e.g. postgis for mapnik-rendering on cassini, it shouldn't be the problem. You may also try query2map [1]. If none of this works for you, you may consider processing a planet.osm.bz2 with a sax-parser. See [2] for an example. [1] http://wiki.openstreetmap.org/wiki/Query-to-map [2] http://cassini.toolserver.org/~mazder/duplicate-countries/from-planet.osm/source.tar.bz2 Peter ___ talk mailing list talk@openstreetmap.org http://lists.openstreetmap.org/listinfo/talk