3

I am just figuring out how to use GeoServer and PostGIS. I am using the States.shp example that came with GeoServer, and I have uploaded that into a table into the PostGIS database. I have created a new layer, and can make WFS requests to get back GML. For example:

http://localhost:8080/geoserver/mine/ows?service=WFS&version=1.0.0&request=GetFeature&typeName= mine:usa_view&maxFeatures=1&

This returns a GML of the top 1 state (which happens to be Illinois). I use a view, and aside from the geometric data, I also get all the fields I have exposed in the view, which happen to be “name” and “abbreviation”.

If I add a second table, say a list of cities within each state, is it possible to return this information within the GML? Is there an easy way to do this using the setup I have described?

4

The simple answer is no.

The complex answer is may be but you'll need to understand and use the complex feature extension (http://docs.geoserver.org/stable/en/user/data/app-schema/complex-features.html). This is non trivial so you might want to think about other ways of doing this like making a second request using the boundary of the state polygon as a filter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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