[mapserver-users] Re: WFS GetFeature on Mapserver doesn't work

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Apr 15 07:56:36 EDT 2010


Hi,

I am sorry but I need to encourage you to do some homework.  Your actual problem right now is most probably somewhere in your source data that comes from PostGIS.  Mapserver works, but it does not find any data and therefore the resulting dataset is empty. I cannot say what you should do in order to make your PostGIS layer work. If you want to see how a successfull GetFeature looks like, read once again the document http://mapserver.org/ogc/wfs_server.html and click the sample GetFeature request http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERSION=1.0.0&REQUEST=getfeature&TYPENAME=park

You will see that the result set contains the geometry and attributes, but it does also include a reference to DescribeFeatureType request. I copy that part for you here under:

wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://www2.dmsolutions.ca/cgi-bin/mswfs_gmap?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=park&OUTPUTFORMAT=XMLSCHEMA">

The meaning of the part containing "DescribeFeatureType" is that the xml schema document that describes your feature type can be obtained by running that certain query.  It is how WFS is planned to work.  Try copy-paste with your browser and this url and you should get something interesting reading back:

http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_postgres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=delhi_district&OUTPUTFORMAT=XMLSCHEMA

-Jukka-

sunny74 wrote:

> 
> Hi Rahkonen,
> 
> Thanks for your reply.
> You are right again.The Getcapabilities is showing the layer 
> and there is
> one layer only.
> But Getfeature is showing the same thing it had shown earlier 
> i.e it is NOT
> showing the features and the details of those features.
> 
> GetFeatures O/p
> 
> <wfs:FeatureCollection xsi:schemaLocation="http://www.opengis.net/wfs
> http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd            
>             
> http://mapserver.gis.umn.edu/mapserver
> http://localhost:81/cgi-bin/mapserv.exe?map=d:/Delhi1_wfs_post
> gres.map&SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType
> &TYPENAME=delhi_district&OUTPUTFORMAT=XMLSCHEMA">
>> <gml:boundedBy>
> <gml:null>missing</gml:null>
> </gml:boundedBy>
> </wfs:FeatureCollection>
> 
> Another interesting thing.Although I have given REQUEST=GetFeature the
> output is showing REQUEST=DescribeFeatureType.
> Is it because mapserver is unable to find the features within 
> the layer and
> so it is changing the type of request?
> What changes do I make so as to get GetFeatures working?
> 
> Thanks for your continued support.
> 
> 
> -- 
> View this message in context: 
> http://n2.nabble.com/WFS-GetFeature-on-Mapserver-doesn-t-work-
> tp4905757p4906583.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> 


More information about the mapserver-users mailing list