[OSM-dev] Free OSM tag queries, WMS and WFS
sfkeller at gmail.com
Sun Mar 11 23:16:41 GMT 2012
I realized following online webapps to directly visualize spatial
queries against Swiss OpenStreetMap data:
* XAPI (I call it "XAPI-to-Map"): See examples at
http://www.gis.hsr.ch/wiki/PostGIS_Terminal#XAPI-to-Map and try
PostGIS Terminal, e.g. http://bit.ly/A8duyB
* Spatial SQL: See examples at
http://www.gis.hsr.ch/wiki/PostGIS_Terminal#Examples and enter SQL
query in PostGIS Terminal
* OGC Filter Encoding: Try the examples at OpenPOIMap (Switzerland) at
PostGIS Terminal only requires osm2pgsql, PostGIS (with hstore
extension of course :->) and some small PHP/Python code.
The problem of the sql parameter you gave (like "&sql=(tags@>
'highway=>primary')" ), is, that it is not URL encoded and the weblink
gets broken (like the other ones in this thread). Those weblinks can't
be easily embeded in mails and webpages - unless you shorten it with
e.g. http://bit.ly/A8duyB .
That's because characters like @, and "=" are reserved. Such URL
parameter values should be percent encoded (see
http://en.wikipedia.org/wiki/URL_encoding ), which looks
like this: http://labs.geometa.info/postgisterminal/?xapi=*%5Btourism=viewpoint%5D&zoom=11&lat=47.260&lon=8.775
2011/8/19 Jukka Rahkonen <jukka.rahkonen at latuviitta.fi>:
> Sven Geggus wrote:
>> Jukka Rahkonen wrote:
>>> No own development done, just playing with existing possibilities of
>>> MapServer WMS and WFS and osm2pgsql with hstore.
>> Would you mind sharing your Mapfile?
> Please find attached. I modified them a bit and tried to take of all that
> is not needed. I am not sure if they are still in a totally working
> condition. Notise that the sql parameter is effectively not validated at
> all in these mapfiles.
> I like to use includes for keeping the system more modular and easier to
> maintain. The ms_ows.map is the main mapfile which is reading the INCLUDEd
> point, line and polygon mapfiles which all three are referring to
> connection.map through their own INCLUDEs. You can combine them to one
> mapfile if you like.
> I left definitions for geotiff, SVG and pdf outputformats in place if they
> happen to interest.
> Mapfiles are made for data that is in EPSG:3067 in the database so you
> will need to adjust those for point, line and polygon layers
> DATA "way from (select (way),osm_id,tags from osm_point where %sql%) as
> foo using unique osm_id using srid=3067"
> -Jukka Rahkonen-
> dev mailing list
> dev at openstreetmap.org
More information about the dev