Hi, My postgis database is composed of street maps of different states. Each state is represented by a table. How can i fetch a wms map of an area whose geometries overlap two or more states (tables) . will creating a layer group in geoserver be the answer ? How would the WMS query be written ? thanks, Roman. |
---|
Roman Isitua ha scritto:
Hi,
My postgis database is composed of street maps of different states. Each state is represented by a table. How can i fetch a wms map of an area whose geometries overlap two or more states (tables) .
will creating a layer group in geoserver be the answer ? How would the WMS query be written ?
You just create a layer group that lists all of the separate types
and then use it as if it was a normal layer.
However, that does not seem the most efficient way of proceeding,
if you have 20 states you'll end up doing 20 queries.
I believe it will be better for you to build a view in the database
that unions all the tables into a single entity, and register
the view instead (remember to specify all the spatial metadata
for the view as well).
By using a view you'll loose the ability to work with FID
filters thought (views lack primary key, so not stable/usable
feature id is generated out of them).
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.