WFS GetFeature with multiple levels and different property names

Suppose I have a Geoserver working with two layers open by WFS (with properties):

StreetLayer (geom, StreetName, Lanes, Length) HouseLayer (geom, Address) 

Now, if I want to request a StreetLayer for all streets, but only get the StreetName and Lanes properties, I would send a GET request:

 http://geoserver/wfs?REQUEST=GetFeature&VERSION=1.1.0&typename=StreetLayer&propertyname=StreetName,Lanes 

But what if now I want to request both HouseLayer and StreetLayer? This does not work:

 http://geoserver/wfs?REQUEST=GetFeature&VERSION=1.1.0&typename=StreetLayer,HouseLayer&propertyname=StreetName,Lanes,Address 

I get an exception that says StreetName and Lanes are not in HouseLayer and vice versa. Do I need to make some requests?

EDIT:

So what I want to do is something like this:

 http://geoserver/wfs?REQUEST=GetFeature&VERSION=1.1.0&typename=StreetLayer,HouseLayer&propertyname=(StreetName,Lanes),(Address) 
+4
source share
1 answer

Almost you have an extra comma in propertyName. This works against installing GeoServer vanilla:

 http://localhost:8087/gswps/topp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=topp:tasmania_cities,topp:tasmania_roads&propertyName=(ADMIN_NAME,CITY_NAME)(TYPE) 

Cm? There is no command between them) and (

+9
source

Source: https://habr.com/ru/post/1416556/


All Articles