[mapserver-users] uDig and MapServer WFS
Barend Köbben
kobben at itc.nl
Tue Nov 3 10:59:03 PST 2009
Hi,
I have found that a uDig/Mapserver combination is especially picky on data
that has no clear extent. Try explicitely mentioning the extent, by
including
"ows_extent" "xmin ymin xmax ymax"
or
"wfs_extent" "xmin ymin xmax ymax"
in the METADATA section of each LAYER definition
Hope this helps,
--
Barend Köbben
International Institute for Geo-Information
Sciences and Earth Observation (ITC)
PO Box 6, 7500AA Enschede, The Netherlands
+31 (0)53 4874253
On 03-11-09 18:36, "graham_allan" <graham.allan at crowderconsult.co.uk> wrote:
> Dear All,
>
> I¹m trying to use uDig in connection with MapServer¹s WFS capability. I have
> set up a .map file that contains all the information needed for a WFS
> according to the instructions in the MapServer user guide
> <http://mapserver.org/ogc/wfs_server.html> and can get the XML in response to
> a get capabilities:
>
> http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/labuan/mapfiles/labuan_wfs
> .map&SERVICE=wfs&VERSION=1.0.0&REQUEST=GetCapabilities
>
> But if I open the service using uDig although I can select layers and they
> apper in the layers view, no data is displayed and the table view contains 0
> records and the layer count is 0.
>
> If I use the same map file and open the layers as a WMS then I can see the
> data
>
> Does anybody have any suggestion regarding what I¹m doing wrong?
>
>
> Thanks
>
>
> Graham
>
>
>
> # objects.
> MAP
> NAME LABUAN_WFS
> STATUS ON
> IMAGETYPE PNG
> EXTENT 607726.651900 578442.812605 630101.446005 597763.786700
> SIZE 800 600
> IMAGECOLOR 255 255 255
>
> # PROJECTION
> # "proj=omerc"
> # "lat_0=4"
> # "lonc=115"
> # "alpha=53.31582047222222"
> # "k=0.99984"
> # "x_0=590476.87"
> # "y_0=442857.65"
> # "ellps=evrstSS"
> # "units=m"
> # "no_defs"
> # END
>
> PROJECTION
> "init=epsg:29873"
> END
>
>
> #
> # Start of web interface definition
> #
> WEB
> #
> # On Windows systems, /tmp and /tmp/ms_tmp/ should be created at
> the root
> # of the drive where the .MAP file resides.
> #
> IMAGEPATH "C:/ms4w/tmp/ms_tmp/"
> IMAGEURL "/ms_tmp/"
> METADATA
> "wfs_title" "Labuan_WMS"
> "wfs_onlineresource"
> "http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:/ms4w/apps/labuan/mapfiles/labuan_
> wfs.map"
> "wfs_srs" "EPSG:29873"
> "wfs_schemas_location"
> "http://schemas.opengeospatial.net"
> END
> END
>
> # Layer objects are defined beneath the map object. You need at least one
> # layer defined in your map file before you can display a map... You can
> # define as many layers as you'd like although a limit is typically
> hard-coded
> # in map.h in the MapServer source. The default limit is set at 100. You'd
> # have to have a very specialized application to need more than 100 layers
> in
> # your application.
> # Start of LAYER DEFINITIONS ---------------------------------------------
> LAYER
> NAME DMA
> METADATA
> "wfs_title" "DMA"
> "gml_include_items" "all"
> "gml_featureid" "OBJECTID"
> END
> TYPE POLYGON
> CONNECTIONTYPE ogr
> CONNECTION "C:\ms4w\apps\labuan\labuan.mdb"
> DATA "DMA"
> STATUS ON
> DUMP TRUE
> CLASS
> NAME "dma"
> STYLE
> COLOR 255 204 255
> OUTLINECOLOR 153 000 153
> END
> END
> END
>
> LAYER
> NAME Pipeline
> METADATA
> "wfs_title" "Pipeline"
> "gml_include_items" "all"
> "gml_featureid" "OBJECTID"
> END
> TYPE LINE
> CONNECTIONTYPE ogr
> CONNECTION "C:\ms4w\apps\labuan\labuan.mdb"
> DATA "Pipeline"
> STATUS ON
> PROJECTION
> "init=epsg:42304"
> END
>
> DUMP TRUE
> CLASS
> NAME "Pipeline"
> STYLE
> COLOR 051 153 255
> END
> END
> END
>
> LAYER
> NAME Meter
> METADATA
> "wfs_title" "Meter"
> "gml_include_items" "all"
> "gml_featureid" "OBJECTID"
> END
> TYPE POINT
> CONNECTIONTYPE ogr
> CONNECTION "C:\ms4w\apps\labuan\labuan.mdb"
> DATA "Meter"
> STATUS ON
> DUMP TRUE
> CLASS
> NAME "Meter"
> STYLE
> COLOR 051 000 153
> END
> SIZE 10
> END
> END
>
> LAYER
> NAME DMA
> TYPE LINE
> CONNECTIONTYPE ogr
> CONNECTION "C:\ms4w\apps\labuan\labuan.mdb"
> DATA "DMA"
> STATUS OFF
> CLASS
> NAME "dma"
> STYLE
> COLOR 153 000 153
> END
> END
> END
>
>
> END # All map files must come to an end just as all other things must come
> to...
>
> Crowder & Co Ltd, Registered Office: Post Office House, 99-105 Argyle Street,
> Birkenhead, Merseyside, CH41 6AD.
> Telephone: 0151 647 7772
> Registered in England and Wales, No. 3003604. VAT No. GB618952020
> This e-mail is confidential and intended solely for the use of the individual
> to whom it is addressed. Any views or opinions presented are solely those of
> the author and do not necessarily represent those of Crowder & Co Ltd. If you
> are not the intended recipient of this e-mail you may not copy, use, forward
> or disclose its contents to any other person ; please delete the message and
> attachments from your system.
>
> For more information visit our web site at http://www.crowderconsult.co.uk
>
International Institute for Geo-Information Science and Earth Observation (ITC)
Chamber of Commerce: 410 27 560
E-mail disclaimer
The information in this e-mail, including any attachments, is intended for the addressee only. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or action in relation to the content of this information is strictly prohibited. If you have received this e-mail by mistake, please delete the message and any attachment and inform the sender by return e-mail. ITC accepts no liability for any error or omission in the message content or for damage of any kind that may arise as a result of e-mail transmission.
More information about the MapServer-users
mailing list