[Geoserver-users] fetching a wms map with specific POI's overlayed on it ???

Hi,

How can I fetch a wms map of an area with two layers, a road layer as base map and specific point of interest (POI’s) overlayed on it. The poi’s fid are known. This is the
query I tried but the result returned only 3 poi’s. The road map was not returned.

http://localhost:8080/geoserver/wms?request=GetMap&layers=topp:lagos_roads2,topp:lagos_poi2&styles=simple_roads,mypoi&bbox=3.3210,6.5109,3.3932,6.5426&Format=image/png&width=550&height=250&srs=EPSG:4326&featureid=lagos_poi2.20,lagos_poi2.50,lagos_poi2.60

What i expected as a response was a wms map with the road layer as base and only specified poi’s overlayed on it. When I run the wms query without the featureid condition

http://localhost:8080/geoserver/wms?request=GetMap&layers=topp:lagos_roads2,topp:lagos_poi2&styles=simple_roads,mypoi&bbox=3.3210,6.5109,3.3932,6.5426&Format=image/png&width=550&height=250&srs=EPSG:4326

The query returns all features that fall in that extent from the two layers as expected.

am I missing something here ? How do i specify specific poi’s to be returned ?
Or do I need to specify the coordinates of the POI using geoserver’s an inline feature request ? or do I need to use spatial filters or CQL ?

a sample query will really help.

Thanks,

Roman.

— On Mon, 5/25/09, Roman Isitua romanisitua@anonymised.com wrote:

From: Roman Isitua romanisitua@anonymised.com
Subject: [Geoserver-users] fetching a wms map of an area with a road layer as base and specific POI’s overlayed on it ?
To: geoserver-users@anonymised.come.net
Date: Monday, May 25, 2009, 1:34 AM

Hi,

How can I fetch a wms map of an area with two layers, a road layer as base map and specific point of interest (POI’s) overlayed on it. The poi’s fid are known. This is the
query I tried but the result returned only 3 poi’s. The road map was not returned.

http://localhost:8080/geoserver/wms?request=GetMap&layers=topp:lagos_roads2,topp:lagos_poi2&styles=simple_roads,mypoi&bbox=3.3210,6.5109,3.3932,6.5426&Format=image/png&width=550&height=250&srs=EPSG:4326&featureid=lagos_poi2.20,lagos_poi2.50,lagos_poi2.60

What i expected as a response was a wms map with the road layer as base and only specified poi’s overlayed on it. When I run the wms query without the featureid condition

http://localhost:8080/geoserver/wms?request=GetMap&layers=topp:lagos_roads2,topp:lagos_poi2&styles=simple_roads,mypoi&bbox=3.3210,6.5109,3.3932,6.5426&Format=image/png&width=550&height=250&srs=EPSG:4326

The query returns all features that fall in that extent from the two layers as expected.

am I missing something here ? How do i specify specific poi’s to be returned ?
Or do I need to specify the coordinates of the POI using geoserver’s an inline feature request ? or do I need to use spatial filters or CQL ?

a sample query will really help.

Thanks,

Roman.

-----Inline Attachment Follows-----


Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com

-----Inline Attachment Follows-----


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Roman Isitua ha scritto:

Hi,

How can I fetch a wms map of an area with two layers, a road layer as base map and specific point of interest (POI's) overlayed on it. The poi's fid are known. This is the
query I tried but the result returned only 3 poi's. The road map was not returned.

http://localhost:8080/geoserver/wms?request=GetMap&layers=topp:lagos_roads2,topp:lagos_poi2&styles=simple_roads,mypoi&bbox=3.3210,6.5109,3.3932,6.5426&Format=image/png&width=550&height=250&srs=EPSG:4326&featureid=lagos_poi2.20,lagos_poi2.50,lagos_poi2.60

Of course it does not, you asked specifically for features
with a certain ids: lagos_poi2.20,lagos_poi2.50,lagos_poi2.60,
I guess none of the roads has such fid. You won't be able
to get what you want with a single request with a fid filter.

You either make two separate requests and overlay them in
the client, or if it's possible, can you use any other
attribute to identify the features? In that case you
can use CQL filters, along the lines of:

&CQL_FILTER=INCLUDE;att = v1 or att = v2 or att = v3

Unfortunately CQL does not have a notion of the ID so
you cannot use fids.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.