[mapserver-users] Re: WFS with several SRS?

Jörg Thomsen jt at mapmedia.de
Tue Nov 8 08:23:04 EST 2011


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


More information about the mapserver-users mailing list