Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?


share|improve this question
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 ( 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


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.