Discussion:
[mapserver-users] WFS with several SRS?
sulu
2011-11-08 10:37:48 UTC
Permalink
I would like to offer a WFS-Service which supports several different
projections.

("WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284 EPSG:32632
EPSG:25832 EPSG:21781")

My mapserver is of version 5.6.6 on a Centos-Box

MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=FASTCGI INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
INPUT=GDAL INPUT=SHAPEFILE


As expected the default SRS is 31254.

A GetFeature-Call with this EPSG works just fine:
Example:
http://vogis.cnv.at/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=nutzungs-grenzen&SRSNAME=epsg:31254

But if i try a other SRS from the WFS_SRS (e.g. 4326) above i receive:
...
msWFSGetFeature(): WFS server error. Invalid GetFeature Request: SRSNAME
value should be valid for all the TYPENAMES. Please check the capabilities
and reformulate your request.
...

As you can see in the Mapfile below, i avoided specifying any projection in
the layer section so i have to wonder what i am doing wrong?

Thanks
Andy

----------------------------------------------------------------------------------------------------
MAPFILE
----------------------------------------------------------------------------------------------------

MAP

EXTENT -70000 180000 5000 280000 #for EPSG:31254
FONTSET ./fontset
IMAGETYPE png
MAXSIZE 8000
RESOLUTION 96
SYMBOLSET ./etc/symbol/symbols.sym


# Debugging
CONFIG "MS_ERRORFILE" "/tmp/mapserver_wfs_error.txt"
DEBUG 5

WEB

METADATA
"WFS_TITLE" "DKM Vorarlberg"
"WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284
EPSG:32632 EPSG:25832 EPSG:21781"
"WFS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WFS"

"WMS_SRS" "EPSG:4326 EPSG:31254 EPSG:31284 EPSG:32632
EPSG:25832 EPSG:21781"
"WMS_TITLE" "DKM Vorarlberg"
"WMS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WMS"
#"WMS_ONLINERESOURCE"
"http://vogis.cnv.at/mapserver/mapserv?map=wfs.map&version=1.1.0"
"WMS_FORMATLIST" "image/gif,image/png,image/jpeg,image/tif"
"WMS_FEATURE_INFO_MIME_TYPE" "text/html"

END
END

OUTPUTFORMAT
NAME jpg
DRIVER "GDAL/JPEG"
MIMETYPE "image/jpeg"
IMAGEMODE RGB
EXTENSION "jpg"
END

OUTPUTFORMAT
NAME jpg
DRIVER "GDAL/JPEG"
MIMETYPE "image/jpg"
IMAGEMODE RGB
EXTENSION "jpg"
END

OUTPUTFORMAT
NAME gif
DRIVER "GD/GIF"
MIMETYPE "image/gif"
IMAGEMODE PC256
EXTENSION "gif"
END

OUTPUTFORMAT
NAME png
# Driver AGG/PNG weil der GDAL-Driver Probleme bei der Transparenz hat
DRIVER "AGG/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
TRANSPARENT ON
FORMATOPTION "INTERLACE=OFF"
END

OUTPUTFORMAT
NAME wbmp
DRIVER "GD/WBMP"
MIMETYPE "image/wbmp"
IMAGEMODE PC256
EXTENSION "wbmp"
END

OUTPUTFORMAT
NAME GTiff
DRIVER "GDAL/GTiff"
MIMETYPE "image/tiff"
IMAGEMODE RGB
EXTENSION "tif"
END


# Start of LAYER DEFINITIONS ---------------------------------------------

# --------------------------------------------------
# Layer: Nutzungs-Grenzen
# --------------------------------------------------
LAYER
NAME "nutzungs-grenzen"
#GROUP "nutzungs-grenzen"
METADATA
'OWS_TITLE' 'Nutzungs-Grenzen'
"WFS_TITLE" "Nutzungs-Grenzen"

"GML_INCLUDE_ITEMS" "all"
"GML_FEATUREID" "ID"

END

MAXFEATURES 1000
EXTENT -70000 180000 -1000 280000 #for EPSG:31254

DATA "/data/Geodaten/Grenzen/DKM/Vorarlberg/Nutzung/NFL"

OPACITY 100

TYPE polygon
MINSCALEDENOM 100
MAXSCALEDENOM 5001
STATUS ON
DUMP TRUE

CLASS
NAME "Nutzungs-Grenzen"
STYLE
WIDTH 0.25
ANTIALIAS false
OUTLINECOLOR 0 130 0
BACKGROUNDCOLOR 0 130 0
END #end style
END
PROCESSING "CLOSE_CONNECTION=DEFER"
END #end layer


END #end map





--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6973831.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Jörg Thomsen
2011-11-08 12:53:03 UTC
Permalink
hi,

1st: there is no definition of the srs of the source data.
2nd: have you tried putting the line
> "WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781"
into your metadata-layer-section?

Jörg
sulu
2011-11-08 13:08:40 UTC
Permalink
Hi Jörg.

Thanks for answering.


Jörg Thomsen wrote:
>
> hi,
>
> 1st: there is no definition of the srs of the source data.
> 2nd: have you tried putting the line
>> "WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284
>> EPSG:32632
>> EPSG:25832 EPSG:21781"
> into your metadata-layer-section?
>
> Jörg
>


ad 1st:
something like
PROJECTION
"init=epsg:31254"
END #end projection
??
I intentionally left it out because my impression is that WFS does not like
any SRS-Definitions on the layer level.

ad 2nd:
Yes. I tried but no effect.

What i'm really searching is a mapfile which works with different SRS.









--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6974205.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Jörg Thomsen
2011-11-08 13:23:04 UTC
Permalink
hello Andreas,

Am 08.11.2011 14:08, schrieb sulu:
> ad 1st:
> something like
> PROJECTION
> "init=epsg:31254"
> END #end projection
> ??

yes

> I intentionally left it out because my impression is that WFS does not like
> any SRS-Definitions on the layer level.

mapserver has to know the source srs to transform the data into another
srs i think.

> What i'm really searching is a mapfile which works with different SRS.

this one works with both srs, 4326 and 3035:
> MAP
> NAME Bundelaender
> EXTENT 3957944 2678000 4749055 3568000
> SYMBOLSET "symbols/test.sym"
> FONTSET "fonts/fonts.txt"
> IMAGECOLOR 255 255 255
>
> LEGEND
> ....
> END
> WEB
> IMAGEPATH "temp"
> METADATA
> "ows_encoding" "UTF-8"
> "wms_title" "Bundesländer Verwaltungsgrenzen"
> "wfs_title" "Bundeslaänder Verwaltungsgrenzen"
> "ows_abstract" "WMS der Bundesländer der Bundesrepublik"
> "wms_srs" "EPSG:4326 EPSG:3035"
> "ows_onlineresource" "http://....."
> END
> END
> PROJECTION
> "init=epsg:3035"
> END
>
> # BUNDESLAENDER
> LAYER
> NAME "Bundeslaender_1000"
> STATUS ON
> TYPE POLYGON
> METADATA
> "ows_title" "Bundesländer Verwaltungsgrenzen"
> "ows_extent" "5.8659987449646 47.1703590393066 15.0415315628052 55.0473768615723"
> "ows_featureid" "id"
> "ows_srs" "EPSG:4326 EPSG:3035"
> "gml_include_items" "all"
> END
> DATA "the_geom from ... using srid=4326"
> CONNECTIONTYPE POSTGIS
> CONNECTION "user=xx password=xx host=xx port=5432 dbname=bkg_geodaten"
> MINSCALEDENOM 250000
> OPACITY 100
> DUMP true
> LABELCACHE on
> SIZEUNITS pixels
> LABELITEM "gen"
> PROJECTION
> "init=epsg:4326"
> END
> CLASS
> STYLE
> OUTLINECOLOR 100 100 100
> WIDTH 1
> END
> NAME "Bundesländer"
> LABEL
> FONT "vera"
> COLOR 50 50 50
> OUTLINECOLOR 240 240 240
> TYPE truetype
> SIZE 9
> ANTIALIAS true
> POSITION cc
> MINDISTANCE 500
> END
> END
> END # Layer
> END # Map File

Grüße in die Berge,
Jörg
sulu
2011-11-08 14:24:05 UTC
Permalink
Jörg Thomsen wrote:
>
> hello Andreas,
>
> Am 08.11.2011 14:08, schrieb sulu:
>> ad 1st:
>> something like
>> PROJECTION
>> "init=epsg:31254"
>> END #end projection
>> ??
>
> yes
>
>> I intentionally left it out because my impression is that WFS does not
>> like
>> any SRS-Definitions on the layer level.
>
> mapserver has to know the source srs to transform the data into another
> srs i think.
>
>> What i'm really searching is a mapfile which works with different SRS.
>
> this one works with both srs, 4326 and 3035:
>> MAP
>> NAME Bundelaender
>> EXTENT 3957944 2678000 4749055 3568000
>> SYMBOLSET "symbols/test.sym"
>> FONTSET "fonts/fonts.txt"
>> IMAGECOLOR 255 255 255
>>
>> LEGEND
>> ....
>> END
>> WEB
>> IMAGEPATH "temp"
>> METADATA
>> "ows_encoding" "UTF-8"
>> "wms_title" "Bundesländer Verwaltungsgrenzen"
>> "wfs_title" "Bundeslaänder Verwaltungsgrenzen"
>> "ows_abstract" "WMS der Bundesländer der Bundesrepublik"
>> "wms_srs" "EPSG:4326 EPSG:3035"
>> "ows_onlineresource" "http://....."
>> END
>> END
>> PROJECTION
>> "init=epsg:3035"
>> END
>>
>> # BUNDESLAENDER
>> LAYER
>> NAME "Bundeslaender_1000"
>> STATUS ON
>> TYPE POLYGON
>> METADATA
>> "ows_title" "Bundesländer Verwaltungsgrenzen"
>> "ows_extent" "5.8659987449646 47.1703590393066 15.0415315628052
>> 55.0473768615723"
>> "ows_featureid" "id"
>> "ows_srs" "EPSG:4326 EPSG:3035"
>> "gml_include_items" "all"
>> END
>> DATA "the_geom from ... using srid=4326"
>> CONNECTIONTYPE POSTGIS
>> CONNECTION "user=xx password=xx host=xx port=5432
>> dbname=bkg_geodaten"
>> MINSCALEDENOM 250000
>> OPACITY 100
>> DUMP true
>> LABELCACHE on
>> SIZEUNITS pixels
>> LABELITEM "gen"
>> PROJECTION
>> "init=epsg:4326"
>> END
>> CLASS
>> STYLE
>> OUTLINECOLOR 100 100 100
>> WIDTH 1
>> END
>> NAME "Bundesländer"
>> LABEL
>> FONT "vera"
>> COLOR 50 50 50
>> OUTLINECOLOR 240 240 240
>> TYPE truetype
>> SIZE 9
>> ANTIALIAS true
>> POSITION cc
>> MINDISTANCE 500
>> END
>> END
>> END # Layer
>> END # Map File
>
> Grüße in die Berge,
> Jörg
> _______________________________________________
> mapserver-users mailing list
> mapserver-***@.osgeo
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

Hi Jörg.

Thanks for your sample.
I will keep it as a template when i am ready to do WFS 1.1 (requieres
mapserver-6) .
My mapfile was stripped down quasi naked because of my desperation not
finding any errors preventing me to use multiple SRS on WFS. I was not aware
that my mapserver-version does not support that particular feature.

Grüße aus den Bergen
Andy



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6974430.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Burgholzer, Robert (DEQ)
2011-11-08 15:42:59 UTC
Permalink
I wish to have a map displayed with the extent automatically zoomed to the extent of the active layers, my thought was that using "mapext=shape" or "mapext=shapes" in the CGI URL would do the trick, but it seems to be only interested in the extent that is in the .map file (as reported in the mapserv log, see below). Any help would be appreciated.

Thanks!

URLCGI request:
http://deq2.bse.vt.edu/cgi-bin/mapserv?map=/var/www/html/wooommdev/nhd_tools/nhd.map&layer=nhd_fulldrainage&mode=map&mapext=shapes

Relevant log info (I think):
[Tue Nov 8 10:40:15 2011].745182 msPostGISLayerWhichShapes query: select encode(ST_AsBinary(ST_Force_2D("shape"),'NDR'),'hex') as geom,"oid" from (select a.the_geom AS shape, a.comid, gid as oid from nhd_fulldrainage as a) AS foo where shape && GeomFromText('POLYGON((-78.8392602660197 38.3490447998047,-78.8392602660197 38.7100791931152,-78.2368658326131 38.7100791931152,-78.2368658326131 38.3490447998047,-78.8392602660197 38.3490447998047))',4269) and (comid in (4505206))
[Tue Nov 8 10:40:15 2011].867114 msPostGISLayerWhichShapes got 0 records in result.

Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
***@deq.virginia.gov
804-698-4405
Open Source Modeling Tool
Jeff McKenna
2011-11-08 13:23:34 UTC
Permalink
Hello,

Some quick notes that may assist you as you travel down this path:

- for any WMS/WFS/OGC mapfiles, I always
- check my GetCapabilities response in a text editor for any
"Warning" text, if any exist then change the mapfile until all warnings
from GetCapabilities are gone
- make sure that each layer has a PROJECTION object (the source
projection for that layer)
- make sure to have a MAP-level PROJECTION object
- make sure the WEB object's METADATA parameter has a "wms_srs" or
"wfs_srs" or "ows_srs" line that lists/advertises several different
projections (as previously mentioned in another response)

Hope that helps you through your travels.

-jeff


--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/




On 11-11-08 6:37 AM, sulu wrote:
> I would like to offer a WFS-Service which supports several different
> projections.
>
> ("WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781")
>
> My mapserver is of version 5.6.6 on a Centos-Box
>
> MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=FASTCGI INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
>
>
> As expected the default SRS is 31254.
>
> A GetFeature-Call with this EPSG works just fine:
> Example:
> http://vogis.cnv.at/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=nutzungs-grenzen&SRSNAME=epsg:31254
>
> But if i try a other SRS from the WFS_SRS (e.g. 4326) above i receive:
> ...
> msWFSGetFeature(): WFS server error. Invalid GetFeature Request: SRSNAME
> value should be valid for all the TYPENAMES. Please check the capabilities
> and reformulate your request.
> ...
>
> As you can see in the Mapfile below, i avoided specifying any projection in
> the layer section so i have to wonder what i am doing wrong?
>
> Thanks
> Andy
>
> ----------------------------------------------------------------------------------------------------
> MAPFILE
> ----------------------------------------------------------------------------------------------------
>
> MAP
>
> EXTENT -70000 180000 5000 280000 #for EPSG:31254
> FONTSET ./fontset
> IMAGETYPE png
> MAXSIZE 8000
> RESOLUTION 96
> SYMBOLSET ./etc/symbol/symbols.sym
>
>
> # Debugging
> CONFIG "MS_ERRORFILE" "/tmp/mapserver_wfs_error.txt"
> DEBUG 5
>
> WEB
>
> METADATA
> "WFS_TITLE" "DKM Vorarlberg"
> "WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284
> EPSG:32632 EPSG:25832 EPSG:21781"
> "WFS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WFS"
>
> "WMS_SRS" "EPSG:4326 EPSG:31254 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781"
> "WMS_TITLE" "DKM Vorarlberg"
> "WMS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WMS"
> #"WMS_ONLINERESOURCE"
> "http://vogis.cnv.at/mapserver/mapserv?map=wfs.map&version=1.1.0"
> "WMS_FORMATLIST" "image/gif,image/png,image/jpeg,image/tif"
> "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
>
> END
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpeg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME gif
> DRIVER "GD/GIF"
> MIMETYPE "image/gif"
> IMAGEMODE PC256
> EXTENSION "gif"
> END
>
> OUTPUTFORMAT
> NAME png
> # Driver AGG/PNG weil der GDAL-Driver Probleme bei der Transparenz hat
> DRIVER "AGG/PNG"
> MIMETYPE "image/png"
> IMAGEMODE RGBA
> EXTENSION "png"
> TRANSPARENT ON
> FORMATOPTION "INTERLACE=OFF"
> END
>
> OUTPUTFORMAT
> NAME wbmp
> DRIVER "GD/WBMP"
> MIMETYPE "image/wbmp"
> IMAGEMODE PC256
> EXTENSION "wbmp"
> END
>
> OUTPUTFORMAT
> NAME GTiff
> DRIVER "GDAL/GTiff"
> MIMETYPE "image/tiff"
> IMAGEMODE RGB
> EXTENSION "tif"
> END
>
>
> # Start of LAYER DEFINITIONS ---------------------------------------------
>
> # --------------------------------------------------
> # Layer: Nutzungs-Grenzen
> # --------------------------------------------------
> LAYER
> NAME "nutzungs-grenzen"
> #GROUP "nutzungs-grenzen"
> METADATA
> 'OWS_TITLE' 'Nutzungs-Grenzen'
> "WFS_TITLE" "Nutzungs-Grenzen"
>
> "GML_INCLUDE_ITEMS" "all"
> "GML_FEATUREID" "ID"
>
> END
>
> MAXFEATURES 1000
> EXTENT -70000 180000 -1000 280000 #for EPSG:31254
>
> DATA "/data/Geodaten/Grenzen/DKM/Vorarlberg/Nutzung/NFL"
>
> OPACITY 100
>
> TYPE polygon
> MINSCALEDENOM 100
> MAXSCALEDENOM 5001
> STATUS ON
> DUMP TRUE
>
> CLASS
> NAME "Nutzungs-Grenzen"
> STYLE
> WIDTH 0.25
> ANTIALIAS false
> OUTLINECOLOR 0 130 0
> BACKGROUNDCOLOR 0 130 0
> END #end style
> END
> PROCESSING "CLOSE_CONNECTION=DEFER"
> END #end layer
>
>
> END #end map
>
>
>
>
>
Yewondwossen ASSEFA
2011-11-08 13:39:10 UTC
Permalink
Hi,

Multiple SRS is only valid for wfs 1.1 and higher.
The support of it in MapServer was added only for MapServer 6.0 [1].
Hope this helps.

[1] http://trac.osgeo.org/mapserver/ticket/3227

best regards,

Y. Assefa


On 11-11-08 05:37 AM, sulu wrote:
> I would like to offer a WFS-Service which supports several different
> projections.
>
> ("WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781")
>
> My mapserver is of version 5.6.6 on a Centos-Box
>
> MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=FASTCGI INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
>
>
> As expected the default SRS is 31254.
>
> A GetFeature-Call with this EPSG works just fine:
> Example:
> http://vogis.cnv.at/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=nutzungs-grenzen&SRSNAME=epsg:31254
>
> But if i try a other SRS from the WFS_SRS (e.g. 4326) above i receive:
> ...
> msWFSGetFeature(): WFS server error. Invalid GetFeature Request: SRSNAME
> value should be valid for all the TYPENAMES. Please check the capabilities
> and reformulate your request.
> ...
>
> As you can see in the Mapfile below, i avoided specifying any projection in
> the layer section so i have to wonder what i am doing wrong?
>
> Thanks
> Andy
>
> ----------------------------------------------------------------------------------------------------
> MAPFILE
> ----------------------------------------------------------------------------------------------------
>
> MAP
>
> EXTENT -70000 180000 5000 280000 #for EPSG:31254
> FONTSET ./fontset
> IMAGETYPE png
> MAXSIZE 8000
> RESOLUTION 96
> SYMBOLSET ./etc/symbol/symbols.sym
>
>
> # Debugging
> CONFIG "MS_ERRORFILE" "/tmp/mapserver_wfs_error.txt"
> DEBUG 5
>
> WEB
>
> METADATA
> "WFS_TITLE" "DKM Vorarlberg"
> "WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284
> EPSG:32632 EPSG:25832 EPSG:21781"
> "WFS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WFS"
>
> "WMS_SRS" "EPSG:4326 EPSG:31254 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781"
> "WMS_TITLE" "DKM Vorarlberg"
> "WMS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WMS"
> #"WMS_ONLINERESOURCE"
> "http://vogis.cnv.at/mapserver/mapserv?map=wfs.map&version=1.1.0"
> "WMS_FORMATLIST" "image/gif,image/png,image/jpeg,image/tif"
> "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
>
> END
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpeg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME gif
> DRIVER "GD/GIF"
> MIMETYPE "image/gif"
> IMAGEMODE PC256
> EXTENSION "gif"
> END
>
> OUTPUTFORMAT
> NAME png
> # Driver AGG/PNG weil der GDAL-Driver Probleme bei der Transparenz hat
> DRIVER "AGG/PNG"
> MIMETYPE "image/png"
> IMAGEMODE RGBA
> EXTENSION "png"
> TRANSPARENT ON
> FORMATOPTION "INTERLACE=OFF"
> END
>
> OUTPUTFORMAT
> NAME wbmp
> DRIVER "GD/WBMP"
> MIMETYPE "image/wbmp"
> IMAGEMODE PC256
> EXTENSION "wbmp"
> END
>
> OUTPUTFORMAT
> NAME GTiff
> DRIVER "GDAL/GTiff"
> MIMETYPE "image/tiff"
> IMAGEMODE RGB
> EXTENSION "tif"
> END
>
>
> # Start of LAYER DEFINITIONS ---------------------------------------------
>
> # --------------------------------------------------
> # Layer: Nutzungs-Grenzen
> # --------------------------------------------------
> LAYER
> NAME "nutzungs-grenzen"
> #GROUP "nutzungs-grenzen"
> METADATA
> 'OWS_TITLE' 'Nutzungs-Grenzen'
> "WFS_TITLE" "Nutzungs-Grenzen"
>
> "GML_INCLUDE_ITEMS" "all"
> "GML_FEATUREID" "ID"
>
> END
>
> MAXFEATURES 1000
> EXTENT -70000 180000 -1000 280000 #for EPSG:31254
>
> DATA "/data/Geodaten/Grenzen/DKM/Vorarlberg/Nutzung/NFL"
>
> OPACITY 100
>
> TYPE polygon
> MINSCALEDENOM 100
> MAXSCALEDENOM 5001
> STATUS ON
> DUMP TRUE
>
> CLASS
> NAME "Nutzungs-Grenzen"
> STYLE
> WIDTH 0.25
> ANTIALIAS false
> OUTLINECOLOR 0 130 0
> BACKGROUNDCOLOR 0 130 0
> END #end style
> END
> PROCESSING "CLOSE_CONNECTION=DEFER"
> END #end layer
>
>
> END #end map
>
>
>
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6973831.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: ***@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
sulu
2011-11-08 14:10:03 UTC
Permalink
Yewondwossen Assefa wrote:
>
> Hi,
>
> Multiple SRS is only valid for wfs 1.1 and higher.
> The support of it in MapServer was added only for MapServer 6.0 [1].
> Hope this helps.
>
> [1] http://trac.osgeo.org/mapserver/ticket/3227
>
> best regards,
>
> Y. Assefa
>
>
Thanks.
This answers it quite thoroughly i would say.
So next thing is to try out mapserver 6.xxx

Cheers Andy


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6974377.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
sulu
2011-11-08 14:17:24 UTC
Permalink
Jeff McKenna wrote:
>
> Hello,
>
> Some quick notes that may assist you as you travel down this path:
>
> - for any WMS/WFS/OGC mapfiles, I always
> - check my GetCapabilities response in a text editor for any
> "Warning" text, if any exist then change the mapfile until all warnings
> from GetCapabilities are gone
> - make sure that each layer has a PROJECTION object (the source
> projection for that layer)
> - make sure to have a MAP-level PROJECTION object
> - make sure the WEB object's METADATA parameter has a "wms_srs" or
> "wfs_srs" or "ows_srs" line that lists/advertises several different
> projections (as previously mentioned in another response)
>
> Hope that helps you through your travels.
>
> -jeff
>

Thanks for the hints.
I tried them all but as Yewondwossen ASSEFA points out there ist no avail
for multiple SRS and WFS with mapserver prior version 6.0.
But your posting gives me something akin of a checklist for my mapfiles.
btw. I had only some harmless warnings in my GetCapabiltities-XML.

-Andy



--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6974399.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
Rahkonen Jukka
2011-11-08 18:51:14 UTC
Permalink
Hi,

I am not sure. It is allowed to use vendor parameters in WFS 1.0.0 and therefore so why not also srsName? Geoserver and TinyOWS both support the use of srsName with WFS 1.0.0 and for users it can sometimes be very useful. You can have a try with OpenGEO demo server which is at http://demo.opengeo.org/geoserver/wfs?service=wfs&version=1.0.0&request=getcapabilities.

For TinyOWS I you can compare the default
http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway
and with srsName as vendor parameter
http://188.64.1.61/cgi-bin/tinyows?service=wfs&version=1.0.0&request=GetFeature&typename=lv:mml_railway&srsName=EPSG:2393

With http POST the situation is probably different. srsName does not belong to WFS xml schema and therefore TinyOWS which is validating requests strictly does not accept srsName in WFS 1.0.0 POST requests. However, I am remembering that Geoserver and probably also deegree WFS both accept srsName also in WFS 1.0.0 GetFeature with POST method.

I have been thinking that what is a real improvement in WFS 1.1.0 for majority of users is the support for srsName and what seems to be useful in WFS 2.0.0 is support for paging (use maxFeatures and offset for gathering WFS data in chunks). It would have been nice to add those two features into WFS 1.0.0 and let versions 1.1.0 and 2.0 for those who really love troubles.

-Jukka Rahkonen-



-Jukka Rahkonen-
________________________________________
Lähettäjä: mapserver-users-***@lists.osgeo.org [mapserver-users-***@lists.osgeo.org] käyttäjän Yewondwossen ASSEFA [***@dmsolutions.ca] puolesta
Lähetetty: 8. marraskuuta 2011 15:39
Vastaanottaja: sulu
Kopio: mapserver-***@lists.osgeo.org
Aihe: Re: [mapserver-users] WFS with several SRS?

Hi,

Multiple SRS is only valid for wfs 1.1 and higher.
The support of it in MapServer was added only for MapServer 6.0 [1].
Hope this helps.

[1] http://trac.osgeo.org/mapserver/ticket/3227

best regards,

Y. Assefa


On 11-11-08 05:37 AM, sulu wrote:
> I would like to offer a WFS-Service which supports several different
> projections.
>
> ("WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781")
>
> My mapserver is of version 5.6.6 on a Centos-Box
>
> MapServer version 5.6.6 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV
> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
> SUPPORTS=WFS_CLIENT SUPPORTS=FASTCGI INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
> INPUT=GDAL INPUT=SHAPEFILE
>
>
> As expected the default SRS is 31254.
>
> A GetFeature-Call with this EPSG works just fine:
> Example:
> http://vogis.cnv.at/cgi-bin/mapserv?map=wfs.map&SERVICE=WFS&VERSION=1.1.0&REQUEST=GetFeature&TYPENAME=nutzungs-grenzen&SRSNAME=epsg:31254
>
> But if i try a other SRS from the WFS_SRS (e.g. 4326) above i receive:
> ...
> msWFSGetFeature(): WFS server error. Invalid GetFeature Request: SRSNAME
> value should be valid for all the TYPENAMES. Please check the capabilities
> and reformulate your request.
> ...
>
> As you can see in the Mapfile below, i avoided specifying any projection in
> the layer section so i have to wonder what i am doing wrong?
>
> Thanks
> Andy
>
> ----------------------------------------------------------------------------------------------------
> MAPFILE
> ----------------------------------------------------------------------------------------------------
>
> MAP
>
> EXTENT -70000 180000 5000 280000 #for EPSG:31254
> FONTSET ./fontset
> IMAGETYPE png
> MAXSIZE 8000
> RESOLUTION 96
> SYMBOLSET ./etc/symbol/symbols.sym
>
>
> # Debugging
> CONFIG "MS_ERRORFILE" "/tmp/mapserver_wfs_error.txt"
> DEBUG 5
>
> WEB
>
> METADATA
> "WFS_TITLE" "DKM Vorarlberg"
> "WFS_SRS" "EPSG:31254 EPSG:3785 EPSG:4326 EPSG:31284
> EPSG:32632 EPSG:25832 EPSG:21781"
> "WFS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WFS"
>
> "WMS_SRS" "EPSG:4326 EPSG:31254 EPSG:31284 EPSG:32632
> EPSG:25832 EPSG:21781"
> "WMS_TITLE" "DKM Vorarlberg"
> "WMS_ABSTRACT" "Geodaten des Bundeslandes Vorarlberg als OGC-WMS"
> #"WMS_ONLINERESOURCE"
> "http://vogis.cnv.at/mapserver/mapserv?map=wfs.map&version=1.1.0"
> "WMS_FORMATLIST" "image/gif,image/png,image/jpeg,image/tif"
> "WMS_FEATURE_INFO_MIME_TYPE" "text/html"
>
> END
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpeg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME jpg
> DRIVER "GDAL/JPEG"
> MIMETYPE "image/jpg"
> IMAGEMODE RGB
> EXTENSION "jpg"
> END
>
> OUTPUTFORMAT
> NAME gif
> DRIVER "GD/GIF"
> MIMETYPE "image/gif"
> IMAGEMODE PC256
> EXTENSION "gif"
> END
>
> OUTPUTFORMAT
> NAME png
> # Driver AGG/PNG weil der GDAL-Driver Probleme bei der Transparenz hat
> DRIVER "AGG/PNG"
> MIMETYPE "image/png"
> IMAGEMODE RGBA
> EXTENSION "png"
> TRANSPARENT ON
> FORMATOPTION "INTERLACE=OFF"
> END
>
> OUTPUTFORMAT
> NAME wbmp
> DRIVER "GD/WBMP"
> MIMETYPE "image/wbmp"
> IMAGEMODE PC256
> EXTENSION "wbmp"
> END
>
> OUTPUTFORMAT
> NAME GTiff
> DRIVER "GDAL/GTiff"
> MIMETYPE "image/tiff"
> IMAGEMODE RGB
> EXTENSION "tif"
> END
>
>
> # Start of LAYER DEFINITIONS ---------------------------------------------
>
> # --------------------------------------------------
> # Layer: Nutzungs-Grenzen
> # --------------------------------------------------
> LAYER
> NAME "nutzungs-grenzen"
> #GROUP "nutzungs-grenzen"
> METADATA
> 'OWS_TITLE' 'Nutzungs-Grenzen'
> "WFS_TITLE" "Nutzungs-Grenzen"
>
> "GML_INCLUDE_ITEMS" "all"
> "GML_FEATUREID" "ID"
>
> END
>
> MAXFEATURES 1000
> EXTENT -70000 180000 -1000 280000 #for EPSG:31254
>
> DATA "/data/Geodaten/Grenzen/DKM/Vorarlberg/Nutzung/NFL"
>
> OPACITY 100
>
> TYPE polygon
> MINSCALEDENOM 100
> MAXSCALEDENOM 5001
> STATUS ON
> DUMP TRUE
>
> CLASS
> NAME "Nutzungs-Grenzen"
> STYLE
> WIDTH 0.25
> ANTIALIAS false
> OUTLINECOLOR 0 130 0
> BACKGROUNDCOLOR 0 130 0
> END #end style
> END
> PROCESSING "CLOSE_CONNECTION=DEFER"
> END #end layer
>
>
> END #end map
>
>
>
>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/WFS-with-several-SRS-tp6973831p6973831.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-***@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>


--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst

Email: ***@dmsolutions.ca
http://www.dmsolutions.ca/

Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
Loading...