getFeature: Results are not correct

Eijnden, B. van den (Bart) b.vdeijnden at AGI.RWS.MINVENW.NL
Tue May 16 03:41:58 PDT 2006


This is most likely because OGR cannot determine a primary key on your
table. It needs a primary key to operate queries (not for a map display).

A few questions:
1) which version of GDAL?
2) which version of Mapserver?
3) you can try to use CONFIG "OGR_FID" "name_of_your_primary_key" at your
MAP object if automatic detection of the primary key fails

Best regards,
Bart

-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens Christian Wilmes
Verzonden: dinsdag 16 mei 2006 12:29
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: [UMN_MAPSERVER-USERS] getFeature: Results are not correct


Hello,

first of all sorry for cross posting, but I've got no idea where I have to
search the mistake so I post it to the GDAL and the Mapserver Mailinglist.

I'm trying to publish a WFS-Server. The Data (only Point-Data) are in a
PostgreSQL-Database (no PostGIS!). So the connection to the data is over
"Virtual Spatial Data". The getCapabilities and DescribeFeatureType request
both work very well. Only the GML-Document getting with the getFeature
request is not correct. The number of features in the GML-Document are
correct too every time, but the features are not in the Bounding Box. The
features in the GML-Document are always the feature which are on the top of
the table they come from. Only the number of feature is correct. The MBR
(Minimum Boundig Rectangle) on the top of the GML-Document amasingly the
correct one. So it don't fit to the features in the document. Testing the
connection with "ogrinfo" and a Boundig-Box is working correct. If I'm
trying to make a WMS-Server with the same Data and the same OGR-file it
works very well.

So here is my Mapfile:

MAP
	NAME WFS_Server
	STATUS ON
	WEB
		METADATA
			"wfs_title"            "WFS Server" 
			"wfs_onlineresource"
"http://127.0.0.1/cgi-bin/mapserv.exe?"
			"wfs_srs"               "EPSG:4326"
		END
	END

	PROJECTION
		"init=EPSG:4326"
	END

	
	LAYER
		NAME myWFS
		METADATA
			"wfs_title"    "myWFS"
			"gml_include_items" "all"  
		END
		TYPE POINT
		STATUS ON
		CONNECTIONTYPE OGR
		CONNECTION "test.ovf"
		PROJECTION
			"init=EPSG:4326"
		END
		DUMP TRUE

	END
END





and the OGR-File test.ovf:

<OGRVRTDataSource>
    <OGRVRTLayer name="feature">
        <SrcDataSource>PG:host=192.168.5.86 user=cwilmes dbname=rosoapcw
password=xxx</SrcDataSource> 
 	<SrcLayer>feature</SrcLayer> 
	<GeometryType>wkbPoint</GeometryType> 
        <LayerSRS>EPSG:4326</LayerSRS>
	<GeometryField encoding="PointFromColumns" x="lat" y="lon"/> 
    </OGRVRTLayer>
</OGRVRTDataSource>


Here is a URL which I used for testing
the
WFS
getFeature-Request:
http://localhost/cgi-bin/mapserv.exe?&REQUEST=GetFeature&VERSION=1.0.0&SERVI
CE=WFS&TYPENAME=myWFS&&BBox=9.98,7.98,10,8


....and here is the result:
  <?xml version="1.0" encoding="ISO-8859-1"
?>

-
<wfs:FeatureCollection
xmlns:ms="http://mapserver.gis.umn.edu/mapserver"
xmlns:wfs="http://www.opengis.net/wfs"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengeospatial.net/wfs/1.0.0/WFS-basic.xsd
http://mapserver.gis.umn.edu/mapserver
http://127.0.0.1/cgi-bin/mapserv.exe?SERVICE=WFS&VERSION=1.0.0&REQUEST=Descr
ibeFeatureType&TYPENAME=myWFS&OUTPUTFORMAT=XMLSCHEMA">
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
  <gml:coordinates>9.980700,7.984220 9.997500,7.995010</gml:coordinates> 
  </gml:Box>
  </gml:boundedBy>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
  <gml:coordinates>9.682230,7.653260 9.682230,7.653260</gml:coordinates> 
  </gml:Box>
  </gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
  <gml:coordinates>9.682230,7.653260</gml:coordinates> 
  </gml:Point>
  </ms:msGeometry>
  <ms:id>16</ms:id> 
  </ms:myWFS>
  </gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
  <gml:coordinates>9.768800,7.835870 9.768800,7.835870</gml:coordinates> 
  </gml:Box>
  </gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
  <gml:coordinates>9.768800,7.835870</gml:coordinates> 
  </gml:Point>
  </ms:msGeometry>
  <ms:id>17</ms:id> 
  </ms:myWFS>
  </gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
  <gml:coordinates>9.296530,7.426330 9.296530,7.426330</gml:coordinates> 
  </gml:Box>
  </gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
  <gml:coordinates>9.296530,7.426330</gml:coordinates> 
  </gml:Point>
  </ms:msGeometry>
  <ms:id>18</ms:id> 
  </ms:myWFS>
  </gml:featureMember>
- <gml:featureMember>
- <ms:myWFS>
- <gml:boundedBy>
- <gml:Box srsName="EPSG:4326">
  <gml:coordinates>9.111500,7.645390 9.111500,7.645390</gml:coordinates> 
  </gml:Box>
  </gml:boundedBy>
- <ms:msGeometry>
- <gml:Point srsName="EPSG:4326">
  <gml:coordinates>9.111500,7.645390</gml:coordinates> 
  </gml:Point>
  </ms:msGeometry>
  <ms:id>20</ms:id> 
  </ms:myWFS>
  </gml:featureMember>
  </wfs:FeatureCollection>




I will be very thankful for every idea where the mistake could!

Please excuse my bad english!



Best Regards
Christian



-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail


-- 
Mobile Internet - E-Mail und Internet immer und überall!
GMX zum Mitnehmen: http://www.gmx.net/de/go/pocketweb



Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
informeren. Wij adviseren u om bij twijfel over de juistheid of de 
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060516/9c73b36e/attachment.htm>


More information about the MapServer-users mailing list