3

This question already has an answer here:

I am using WMS and WFS services on GeoServer. My WMS query returns the image result for features:

http://localhost:8080/geoserver/wms?service=WMS&request=GetMap&layers=Gis:Poi&version=1.1.1&useCors=false&height=256&width=256&srs=EPSG:3067&&BBOX=316600,6838986,316605,6838991&

But I am using same BBOX and SRS values for WFS service but does not return any value.

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&srsName=EPSG:3067&typeName=Gis:Poi&BBOX=316600,6838986,316605,6838991&service=WFS&

marked as duplicate by Ian Turton Jan 24 '17 at 12:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Five by five meter box? Are you sure that you have any POI inside your BBOX? – user30184 Jan 24 '17 at 11:55
2

See my other reply about difference between WMS and WFS: WFS and WMS query SRS parameter and BBOX usage

You did not specify what's the SRS for the BBOX (if you don't, GeoServer assumes it's the native SRS of the data).

  • I use same parameters (bbox and srs) but data comes wit wms and does not come with wfs. my question is so clear. – barteloma Jan 24 '17 at 13:28
  • Did you read carefully the linked answer? In WFS 1.1.0 and higher you must define the SRS for output and for BBOX separately if you do not use the default SRS for both. Use BBOX=316600,6838986,316605,6838991,EPSG:3067 and it should work. – user30184 Jan 24 '17 at 14:44
1

You need to specify what the return format is e.g. outputFormat=application/json&

You also need to specify which service you want! e.g. service=WFS&

http://localhost:8080/geoserver/wfs?request=GetFeature&version=1.1.0&srsName=EPSG:3067&typeName=Gis:Poi&BBOX=316600,6838986,316605,6838991&outputFormat=application/json&service=WFS&
  • outputFromat returns no result {"type":"FeatureCollection","totalFeatures":0,"features":[]}. but there is some data here. I can see with wms. – barteloma Jan 24 '17 at 10:32
  • what format is the source layer? what geometry type? – George of all trades Jan 24 '17 at 10:34
  • Source is EPSG:4326 in database. But wfs service getting data. – barteloma Jan 24 '17 at 10:39
  • OK, and what sort of data? .shp .geojson? point, line, polygon, multi? – George of all trades Jan 24 '17 at 10:41
  • Data geometry is point. But is does not metter, no data returns. Geoserver connects to postgis and get data. – barteloma Jan 24 '17 at 10:57

Not the answer you're looking for? Browse other questions tagged or ask your own question.