[OSM-dev] Free OSM tag queries, WMS and WFS

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Fri Aug 19 17:03:26 BST 2011


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
PROJECTION
        "init=epsg:3067"
END
and
DATA "way from (select (way),osm_id,tags from osm_point where %sql%) as
foo using unique osm_id using srid=3067"

-Jukka Rahkonen-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: connection.map
Type: application/octet-stream
Size: 129 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110819/aaba587c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm_line.map
Type: application/octet-stream
Size: 671 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110819/aaba587c/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm_polygon.map
Type: application/octet-stream
Size: 680 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110819/aaba587c/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ms_ows.map
Type: application/octet-stream
Size: 1385 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110819/aaba587c/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osm_point.map
Type: application/octet-stream
Size: 829 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20110819/aaba587c/attachment-0004.obj>


More information about the dev mailing list