[Chameleon] Extract WFS Data

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Thu Jul 28 11:18:45 EDT 2005


Hi Dave,

it would be best practice to use 2 MAP files for this. Maybe theoretically it is possible to use the same MAP file.

"The way I understand is: I point the sample_roi.phtml file to the client mapfile which contains the CONNECTIONTYPE WFS and CONNNECTION <url> and that mapfile inturn points to the server mapfile that knows the physical location of the files.  Is this correct or am I just way off.  "

This is exactly correct.

Hope you get it to work.

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> "Dave Findlay" <dfindlay_ at hotmail.com> 07/28/05 03:02pm >>>

Hi Bart/List,
Prior to posting to the list I tried to read all the material I could.  I guess the one thing that I'm not too sure of is the WFS Server Mapfile/WFS Client Mapfile.  Right now I'm doing all this setup on my local machine.  Do I need two mapfiles?  The way I understand is:
I point the sample_roi.phtml file to the client mapfile which contains the CONNECTIONTYPE WFS and CONNNECTION <url> and that mapfile inturn points to the server mapfile that knows the physical location of the files.  Is this correct or am I just way off.
Thanks again,
Dave Findlay

>From: "Bart van den Eijnden" <BEN at Syncera-ITSolutions.NL>
>
>
>Your second option won't work.
>
>Your first option should, but you are missing the CONNECTION with a URL to the WFS service. There should be a CONNECTION but no DATA in your LAYER definition. And then you need to make sure you set up a WFS service with Mapserver on your data which you link in using the CONNECTION.
>
>Why do you say with 4.6 the connection is not used anymore?
>
>Read the WFS Server HOWTO and the WFS Client HOWTO for more info. Chameleon will be the WFS client to a Mapserver WFS service.
>
>Hope this helps.
>
>Best regards,
>Bart
>
>Bart van den Eijnden
>Syncera IT Solutions
>Postbus 270
>2600 AG  DELFT
>
>tel.nr.: 015-7512436
>email: BEN at Syncera-ITSolutions.nl 
> >>> "Dave Findlay" <dfindlay_ at hotmail.com> 07/27/05 16:30 PM >>>
>Hi Bart,
>
>Thanks for the advice.  I've tried things two ways in my mapfile
>
>1.
>
>##########################################
>MAP
>
>
>WEB
>
>   METADATA
> "wfs_title"     "WMS Demo Server"
> "wfs_onlineresource" "http://127.0.0.1/cgi-bin/mapserv.exe?"
> "wfs_srs"               "NAD83:401"
>   END
>END
>
>LAYER #  Start of Boundaries Layer
>
>     NAME Boundaries
>     CONNECTIONTYPE WFS
>     METADATA
>
> "wfs_title"    "Boundaries"
> "wfs_service"           "WFS"
> "wfs_typename"          "Boundaries"
> "wfs_version"           "1.0.0"
> "wfs_request_method"    "GET"
> "wfs_connectiontimeout" "60"
> "wfs_maxfeatures"       "1"
>
>     END
>
>     TYPE LINE
>     STATUS ON
>     DATA "./base_info_boundaries"
>     PROJECTION
>       "init=nad83:401"
>     END
>     DUMP TRUE
>     CLASS
>       NAME "Boundaries"
>       COLOR 80 80 80
>       OUTLINECOLOR 80 80 80
>     END
>   END # End of Boundaries Layer
>########################################
>
>AND
>
>2.
>
>########################################
>MAP
>
>
>WEB
>
>   METADATA
> "wfs_title"     "WMS Demo Server"
>   END
>END
>
>LAYER #  Start of Boundaries Layer
>
>     NAME Boundaries
>     METADATA
>
> "wfs_title"    "Boundaries"
>
>     END
>
>     TYPE LINE
>     STATUS ON
>     DATA "./base_info_boundaries"
>     PROJECTION
>       "init=nad83:401"
>     END
>     DUMP TRUE
>     CLASS
>       NAME "Boundaries"
>       COLOR 80 80 80
>       OUTLINECOLOR 80 80 80
>     END
>   END # End of Boundaries Layer
>####################################
>
>Both of these result in the same error and a zero string length in the
>$szWFSConnection variable.  Oh and I'm using Mapserver 4.6 so the CONNECTION
>is no longer used.  Any ideas?
>
>Thanks,
>Dave Findlay
>
>
>
>-----Original Message-----
>From: Bart van den Eijnden [mailto:BEN at Syncera-ITSolutions.NL] 
>
>
>Hi Dave,
>
>is your layer a WMS or WFS connectiontype of layer?
>
>If it is a WMS, the widget performs a DescribeLayer request to get the WFS
>URL and the name of a typename, something like:
>
>service=WMS&request=DescribeLayer&layers=blabla&version=1.1.1
>
>So if your layer is WMS, can you check this request?
>
>Best regards,
>Bart
>
>Bart van den Eijnden
>Syncera IT Solutions
>Postbus 270
>2600 AG  DELFT
>
>tel.nr.: 015-7512436
>email: BEN at Syncera-ITSolutions.nl 
> >>> "Dave Findlay" <dfindlay_ at hotmail.com> 07/26/05 22:56 PM >>>
>Hello all,
>
>
>
>I'm having a bit of a problem with the sample_roi.  When I try and extract
>wfs data I get :
>
>
>
>"Invalid layer or none selected. Please ensure that the selected layer is a
>WFS or WMS layer."
>
>
>
>Now the layer I'm trying to extract seems to be configured fine in the
>mapfile and if I do a straight:
>
>
>
>http://localhost/cgi-bin/mapserv.exe?MAP=ex2.map 
><http://localhost/cgi-bin/mapserv.exe?MAP=ex2.map&SERVICE=WFS&VERSION=1.0.0& 
>REQUEST=GetFeature&TYPENAME=Boundaries>
>&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=Boundaries
>
>
>
>I get the complete gml in my browser.  I noticed that in the
>ExtractWFSData.php file right around line 247 where it checks for a
>connection the $szWFSConnection
>
>actually has a length of zero.  I'm assuming this is the problem but I'm not
>sure exactly how to fix it.  Any suggestions would be appreciated.
>
>
>
>Cheers,
>
>
>
>Dave Findlay
>
>
>
>
>
>
>
>
>_______________________________________________
>Chameleon mailing list
>Chameleon at lists.maptools.org 
>http://lists.maptools.org/mailman/listinfo/chameleon 
>





More information about the Chameleon mailing list