[Chameleon] Extract WFS Data

Dave Findlay dfindlay_ at hotmail.com
Wed Jul 27 10:27:30 EDT 2005


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

 

 

 




More information about the Chameleon mailing list