Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

Thanks

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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