-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi List,
I have a raster layer of old scanned maps. The
default GeoServer GetFeatureInfo for this layer will return you the
raster value for the coordinate you clicked on. This is
not very useful if it is just an RGB triplet (it might be useful if you
have a DEM stored as raster of cause).
What I want to get as FeatureInfo instead is some Metadata I store in a
second layer of type vector. In my case it would contain the bounding
box of the original paper map and the year of publishing.
Is there any way to realize this with GeoServer? The only thing that
came to my mind was to build a compound layer and style the raster layer
with an empty HTML template. That would solve my problem with HTML
GetFeatureInfo requests, but if the user requests type text or xml, the
raster FeatureInfo is still in the response.
Do you have any other ideas of how to realize this?
Thanks,
Björn
- --
Dipl.-Inf. Björn Höfling
Software Developer (GIS, Java)
http://www.bjoernhoefling.de/
USt-IdNr: DE275885245
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlEYqeMACgkQvyhstlk+X/3AoQCeM7rYg3t7QRQhsBHKP/h7vBeD
I0oAnjXChB3Br6CI7i62F8GBkCM/XZ/b
=YYCr
-----END PGP SIGNATURE-----
On Mon, Feb 11, 2013 at 9:20 AM, Björn Höfling <bjoern.hoefling@anonymised.com> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi List,
I have a raster layer of old scanned maps. The
default GeoServer GetFeatureInfo for this layer will return you the
raster value for the coordinate you clicked on. This is
not very useful if it is just an RGB triplet (it might be useful if you
have a DEM stored as raster of cause).
What I want to get as FeatureInfo instead is some Metadata I store in a
second layer of type vector. In my case it would contain the bounding
box of the original paper map and the year of publishing.
Is there any way to realize this with GeoServer? The only thing that
came to my mind was to build a compound layer and style the raster layer
with an empty HTML template. That would solve my problem with HTML
GetFeatureInfo requests, but if the user requests type text or xml, the
raster FeatureInfo is still in the response.
Do you have any other ideas of how to realize this?
There is no “configuration” you can do to perform what you’re looking for, but
if you up to programming, you can build a plugin implenetation, called a DispatcherCallback,
in which you replace on the fly the name of the raster layer with the name of the vector layer
in both the layers and query_layers portion of the request.
Or, if you like, you can do the same with a Servlet filter, if that’s a way more suitable with
your programming experience
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
I have several instances where the layer I do a query one is different
from the one I am using for display purposes. (The most common reason
being that display is based on a pretty raw geometry table and queries
use a complex view instead). However, I deal with that at the OL client
end. Is this an option?
Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
On 02/11/2013 01:12 PM, Andrea Aime wrote:
On Mon, Feb 11, 2013 at 9:20 AM, Björn Höfling
<bjoern.hoefling@anonymised.com
<mailto:bjoern.hoefling@anonymised.com>> wrote:
[..]
What I want to get as FeatureInfo instead is some Metadata I store in a
second layer of type vector. In my case it would contain the bounding
box of the original paper map and the year of publishing.
Is there any way to realize this with GeoServer? The only thing that
came to my mind was to build a compound layer and style the raster layer
with an empty HTML template. That would solve my problem with HTML
GetFeatureInfo requests, but if the user requests type text or xml, the
raster FeatureInfo is still in the response.
Do you have any other ideas of how to realize this?
There is no "configuration" you can do to perform what you're looking
for, but
if you up to programming, you can build a plugin implenetation, called a
DispatcherCallback,
in which you replace on the fly the name of the raster layer with the
name of the vector layer
in both the layers and query_layers portion of the request.
Or, if you like, you can do the same with a Servlet filter, if that's a
way more suitable with
your programming experience
Thanks. I will look into the DispatcherCallback approach.
Björn
--
Dipl.-Inf. Björn Höfling
Software Developer (GIS, Java)
http://www.bjoernhoefling.de/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/11/2013 09:21 PM, Phil Scadden wrote:
I have several instances where the layer I do a query one is
different from the one I am using for display purposes. (The most
common reason being that display is based on a pretty raw geometry
table and queries use a complex view instead). However, I deal with
that at the OL client end. Is this an option?
No, there is no fixed client: The WMS is public and the end user
chooses whichever client he wants. Will try to investigate the
programmative (on the server side) path further.
Björn
- --
Dipl.-Inf. Björn Höfling
Software Developer (GIS, Java)
http://www.bjoernhoefling.de/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlEZjE0ACgkQvyhstlk+X/0okACfZHxXlxIvDKAmYnlwGptOPQsR
uFsAnA+SyhbDN9r4R7cu5dgWc535GYHF
=W4np
-----END PGP SIGNATURE-----
On 02/11/2013 01:12 PM, Andrea Aime wrote:
On Mon, Feb 11, 2013 at 9:20 AM, Björn Höfling <
bjoern.hoefling@anonymised.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi List,
I have a raster layer of old scanned maps. The default GeoServer
GetFeatureInfo for this layer will return you the raster value
for the coordinate you clicked on. This is not very useful if it
is just an RGB triplet (it might be useful if you have a DEM
stored as raster of cause).
What I want to get as FeatureInfo instead is some Metadata I
store in a second layer of type vector. In my case it would
contain the bounding box of the original paper map and the year
of publishing.
Is there any way to realize this with GeoServer? The only thing
that came to my mind was to build a compound layer and style the
raster layer with an empty HTML template. That would solve my
problem with HTML GetFeatureInfo requests, but if the user
requests type text or xml, the raster FeatureInfo is still in the
response.
Do you have any other ideas of how to realize this?
There is no "configuration" you can do to perform what you're
looking for, but if you up to programming, you can build a plugin
implenetation, called a DispatcherCallback, in which you replace on
the fly the name of the raster layer with the name of the vector
layer in both the layers and query_layers portion of the request.
Just to be sure, is it really that simple (OK, this is more
pseudocode, check for NPE, etc):
public class FeatureInfoDispatcherCb implements DispatcherCallback {
@Override
public Request init(Request request) {
Map kvp = request.getKvp();
String layers=(String) kvp.get("LAYERS");
layers = layers.replace("_raster", "_vector");
//...
kvp = request.getRawKvp();
//...
return request;
What's the difference between getKvp and getRawKvp? It seams as if I
have to manipulate at least the raw version, otherwise I get back the
original FeatureInfo.
Björn
--
Dipl.-Inf. Björn Höfling
Software Developer (GIS, Java)
http://www.bjoernhoefling.de/
On Thu, Feb 14, 2013 at 12:19 AM, Björn Höfling <bjoern.hoefling@anonymised.com> wrote:
Just to be sure, is it really that simple (OK, this is more
pseudocode, check for NPE, etc):
public class FeatureInfoDispatcherCb implements DispatcherCallback {
@Override
public Request init(Request request) {
Map kvp = request.getKvp();
String layers=(String) kvp.get(“LAYERS”);
layers = layers.replace(“_raster”, “_vector”);
//…
kvp = request.getRawKvp();
//…
return request;
What’s the difference between getKvp and getRawKvp? It seams as if I
have to manipulate at least the raw version, otherwise I get back the
original FeatureInfo.
The raw KVP is a string to string or String map (if the layers parameter is repeated),
the kvp is a parsed map, e.g., if we are talking bgcolor you’ll find a Color as the
value, no more the string
Cheers
Andrea
–
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it