Hi 
I'm digging into Developer docs and source code to find how to create
a custom GetFeatureInfo response that fits into my needs.
Looks like It's possible to add only custom GetMap renderers in a
separate plugin, and if I want to create a new GetFeatureInfo handler
I must add the code directly into the wms plugin.
I just want to create a separate plugin (like the community GeoJSON
example) that i could deploy into an existent GeoServer instance.
Any suggestion?
--
Diego Guidi
Diego Guidi ha scritto:
Hi 
I'm digging into Developer docs and source code to find how to create
a custom GetFeatureInfo response that fits into my needs.
Looks like It's possible to add only custom GetMap renderers in a
separate plugin, and if I want to create a new GetFeatureInfo handler
I must add the code directly into the wms plugin.
I just want to create a separate plugin (like the community GeoJSON
example) that i could deploy into an existent GeoServer instance.
Any suggestion?
Eh, GetFeatureInfo code is old and clunky, and as you noticed,
does not allow for pluggability like other output formats do,
you have to change the GeoServer code in order to register
a new output format.
The overhaul of GetFeatureInfo code has been in the plans
for... a very long time, but we never find enough reason
to spend the time needed to do so.
The quickest way to ensure that is really done would be
for you to look into how the wfs/wms output formats
are managed, and replicate the same for GetFeatureInfo,
and provide the patch as an attachment into jira.
Once you did that I can review, and if not too big
or problematic, I can commit it on the 1.6.x series
and trunk.
How does this sound?
Cheers
Andrea
Diego Guidi ha scritto:
Hi 
I'm digging into Developer docs and source code to find how to create
a custom GetFeatureInfo response that fits into my needs.
Looks like It's possible to add only custom GetMap renderers in a
separate plugin, and if I want to create a new GetFeatureInfo handler
I must add the code directly into the wms plugin.
I just want to create a separate plugin (like the community GeoJSON
example) that i could deploy into an existent GeoServer instance.
Any suggestion?
An oh, just to make sure I'm not missing anything, what kind of
output format are you planning to create? The HTML one can be
customized already using freemarker templates.
Cheers
Andrea
An oh, just to make sure I'm not missing anything, what kind of
output format are you planning to create? The HTML one can be
customized already using freemarker templates.
I need to resolve ArcSDE codelists:
I plan to manage a GetFeatureInfo request to a SDE db, then get the
codes (for attribute names and values) and get a direct connection to
my Oracle server (that hosts SDE DB) and manually resolve all the
codes to real values 
I've made thsi stuff via a "proxy" (a .NET service that query
GeoServer WMS and manually change the response) but I like to create a
GeoServer plugin.
Maybe I could extend GeoServer in another extension point to do the same work?
Diego Guidi ha scritto:
An oh, just to make sure I'm not missing anything, what kind of
output format are you planning to create? The HTML one can be
customized already using freemarker templates.
I need to resolve ArcSDE codelists:
I plan to manage a GetFeatureInfo request to a SDE db, then get the
codes (for attribute names and values) and get a direct connection to
my Oracle server (that hosts SDE DB) and manually resolve all the
codes to real values 
I've made thsi stuff via a "proxy" (a .NET service that query
GeoServer WMS and manually change the response) but I like to create a
GeoServer plugin.
Maybe I could extend GeoServer in another extension point to do the same work?
Well, yes, you could build a WFS output format that does something similar, GetFeatureInfo just builds a bbox filter around the coords
you passed. In fact, MapBuilder used to avoid GetFeatureInfo and use
GetFeature instead up until some time ago.
Did you also file a request for the ArcSDE datastore to directly support
codelists?
Cheers
Andrea
Well, yes, you could build a WFS output format that does something similar,
GetFeatureInfo just builds a bbox filter around the coords
you passed.
I'm not sure to understand what you say.
WMS-GetFeatureInfo uses WFS-GetFeature to obtain attribute names and values.
If so, I could extend WFS-GetFeature, as you say 
Diego Guidi ha scritto:
Well, yes, you could build a WFS output format that does something similar,
GetFeatureInfo just builds a bbox filter around the coords
you passed.
I'm not sure to understand what you say.
WMS-GetFeatureInfo uses WFS-GetFeature to obtain attribute names and values.
No no, it does not. It's just the code is somewhat similar, but the
request is different.
There is no dead easy way to do what you're looking for, afaik your
options are:
* patch geoserver so that GetFeatureInfo output format code is
actually pluggable and then write your own GetFeatureInfo
plugin
* change your requests into GetFeature ones, and write your
own GetFeature output format
* patch the ArcSDE data store (in GeoTools) to support
codeType natively
Cheers
Andrea
Thanks a lot for the clarifications, as usual 
On Thu, Jun 5, 2008 at 6:04 PM, Andrea Aime <aaime@anonymised.com> wrote:
Diego Guidi ha scritto:
Well, yes, you could build a WFS output format that does something
similar,
GetFeatureInfo just builds a bbox filter around the coords
you passed.
I'm not sure to understand what you say.
WMS-GetFeatureInfo uses WFS-GetFeature to obtain attribute names and
values.
No no, it does not. It's just the code is somewhat similar, but the
request is different.
There is no dead easy way to do what you're looking for, afaik your
options are:
* patch geoserver so that GetFeatureInfo output format code is
actually pluggable and then write your own GetFeatureInfo
plugin
* change your requests into GetFeature ones, and write your
own GetFeature output format
* patch the ArcSDE data store (in GeoTools) to support
codeType natively
Cheers
Andrea
--
Diego Guidi