[mapserver-users] WFS and WMS
Rahkonen Jukka (Tike)
jukka.rahkonen at mmmtike.fi
Fri Jun 13 07:21:32 PDT 2014
Hi,
A rough example is here. I am sure it is not perfect but at least both WMS and WFS layers work with QGIS 2.0. I know there is an odd mixture of ows*, wms* and wfs* metadata items.
http://latuviitta.org/downloads/wms-wfs.zip
Zip file contains a Spatialite database for data and a corresponding mapfile. They should work as is with MS4W when the installation drive is c:\ and files are extracted into c:\ms4w\apps. The path appears only in few places in the mapfile but naturally they must be edited if c:\ms4w\apps is not correct.
The WMS layer had a little extra with two labels but I commented them out because they require Mapserver 6.2 and such MS4W version does not exist. The whole mapfile is so short that I paste it also here below
MAP
SIZE 800 800
EXTENT -90 -180 90 180
UNITS DD
IMAGECOLOR 20 250 250
WEB
METADATA
"ows_enable_request" "*"
"wms_bbox_extended" "true"
"ows_srs" "CRS:84 EPSG:4326 EPSG:32634 EPSG:3857 EPSG:2923"
"wms_title" "MS 6.1.1 WMS from Spatialite"
"wfs_title" "MS 6.1.1 WFS from Spatialite"
"wfs_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=c:\ms4w\apps\wms-wfs.map"
END
END
DEBUG 10
CONFIG "PROJ_LIB" "C:/ms4w/proj/nad"
CONFIG "CPL_DEBUG" "ON"
CONFIG "SQLITE_LIST_ALL_TABLES" "TRUE"
CONFIG "MS_ERRORFILE" "c:/ms4w/tmp/debug.txt"
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "states_table"
CONNECTIONTYPE OGR
CONNECTION "\ms4w\apps\wms-wfs.sqlite"
DATA "states"
PROCESSING "CLOSE_CONNECTION=DEFER"
TYPE POLYGON
STATUS ON
PROJECTION
"init=epsg:4326"
END
METADATA
"ows_title" "states" ##REQUIRED
"wfs_srs" "EPSG:4326" ## REQUIRED
"gml_include_items" "all" ## Optional (serves all attributes for layer)
"gml_featureid" "PK_UID" ## REQUIRED
END
CLASS
STYLE
COLOR 100 200 100
END
LABEL
COLOR 150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION UL
#TEXT "[STATE_FIPS]"
PARTIALS FALSE
END
LABEL
COLOR 150 150 150
OUTLINECOLOR 255 255 255
TYPE bitmap
SIZE small
POSITION LL
#TEXT "[STATE_NAME]"
PARTIALS FALSE
END
END
END
END
-Jukka Rahkonen-
Rahkonen Jukka wrote:
Hi,
I will need to make one first. I am going to use the famous "states.shp" that is used as one of the demo layers of Geoserver. I would say that we should have something similar for Mapserver, a bunch of mapfiles and some demo datasets that could be dropped on the server so that they just work and users could see examples about how to make layers from shapefiles, geotiffs, tileindexes, and OGR connection and set up WMS, WFS and WCS services, activate GetFeatureInfo, use labels and layer groups with min/maxscaledenom and so on. That would also be a great help when reporting and resolving bugs because all parties could have the same data on their computers without pain. An official demo server would be a great supporting resource and people could send just links like "See, this one is advertised as a Mapserver WFS in http://demo.mapserver.org/ but hey, it is WMS at the same!"
http://demo.mapserver.org:8080/cgi-bin/wfs?REQUEST=GetMap&SERVICE=WMS&VERSION=1.1.1&WIDTH=459&HEIGHT=346&LAYERS=cities&TRANSPARENT=TRUE&FORMAT=image%2Fpng&BBOX=-185.53624949999997,-128.25123742265794,186.75224949999998,152.38453742265796&SRS=EPSG:4326&STYLES=
-Jukka Rahkonen-
Malm Paul wrote:
Yes please,
if you have one I would be grateful.
/Paul
From: Rahkonen Jukka (Tike) [mailto:jukka.rahkonen at mmmtike.fi]
Sent: den 13 juni 2014 14:30
To: Malm Paul; 'mapserver-users at lists.osgeo.org'
Subject: Re: WFS and WMS
Short answer: yes. However, you would perhaps like to see an example, or?
-Jukka Rahkonen-
Malm Paul wrote
Hi list!
Is it possible to combine configuration for both WFS and WMS in a mapfile?
Thanks,
/Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140613/ff75b53e/attachment.htm>
More information about the MapServer-users
mailing list