[Geoserver-devel] Re: [Geoserver-users] Customizing services

Hi Chris,

Yes, you should be able to create a FeatureResponseDelegate for KML. Geoserver currently has two, GML2, and Shapefile. Here is a tutorial.

http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format

So as to your question are the interfaces in question significanly abstract enough, well yes they are for geoserver, but their extensiblity is limited. In this case you are lucky because they have been designed with an extensible output format in mind.

Also, the geoserver team is always looking for developers and contributors. If you do go ahead and develop a KML output format, we would be happy to take it as a contribution and make it part of the core. The benefit for you being a wider exposure to the community resulting in increased testing, robustness. It would also make maintenance easier has you will not have to resync with new versions of geoserver.

-Justin

Chris Logan wrote:

Justin,

I've used Spring in the past with much success, so that is good to hear. Back on my question, can you clarify this for me?

    * Does FeatureRequest represent a pure abstraction of a WFS request
      for a feature?
    * Does GetFeatureResults represent a pure abstraction of a WFS
      response for a feature?
    * If I wanted to return a response as KML instead of GML, can I
      create a new FeatureResponseDelegate implementation?
    * I realize that it would be a fair amount of work, but am I on the
      right track? We ARE going to do what I described, I just need to
      decide upon the best design approach: 1)Modify GeoServer and
      resynch with future code drops, 2)Create a web application that
      front-ends GeoServer and modifies WFS requests and GML responses.

Thanks,
Chris

On 12/13/05, *Justin Deoliveira* <jdeolive@anonymised.com <mailto:jdeolive@anonymised.com>> wrote:

    Hi Chris,

    Unfortunatley the way geoserver is set up right now to be able to do
    this could be a significant amount of work for you, and will probably
    not be easy.

    There is currently work going on right now to rearchitect geosever into
    something a bit more modular, so that you can do things like you
    mention. Also we plan on moving to a micro contrainer architecture
    (Spring) so adding these types of things becomes easier.

    -Justin

    Chris Logan wrote:
     > Hello,
     >
     > I am looking at customizing GeoServer so that I can modify a request
     > before being processed by the response handler and modifying the
     > response after it has been generated. I want to do things such as
     > change feature data depending upon scale and other such things.
     >
     > I have looked at doing such mods on the HTTP request and response,
     > perhaps even in a different app that forwards requests to GeoServer.
     > I'm also looking at modifying GeoServer to do this, which is why I am
     > sending this question.
     >
     > Is it practical to extend the Feature servlet and override the
     > getResponseHandler method to return my subclass which would
    extend the
     > FeatureReponse class? In my subclass of FeatureResponse, I would
     > override the execute method and put my pre and post handling code
    around
     > a call to the super.execute method.
     >
     > This sounds like a good design to me, but looking at the execute
    method
     > of the FeatureResponse makes me wonder if this will be feasible. Any
     > advice would be very helpful.
     >
     > Thanks,
     > Chris Logan

    --
    Justin Deoliveira
    The Open Planning Project
    http://topp.openplans.org

--

Thanks,
Chris

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira wrote:

Hi Chris,

Yes, you should be able to create a FeatureResponseDelegate for KML. Geoserver currently has two, GML2, and Shapefile. Here is a tutorial.

http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format

So as to your question are the interfaces in question significanly abstract enough, well yes they are for geoserver, but their extensiblity is limited. In this case you are lucky because they have been designed with an extensible output format in mind.

Um I think James Macgill already has this one covered ... not sure if it is on a branch or what...
Jody

On 12/14/05, Jody Garnett <jgarnett@anonymised.com> wrote:

Justin Deoliveira wrote:
> Hi Chris,
>
> Yes, you should be able to create a FeatureResponseDelegate for KML.
> Geoserver currently has two, GML2, and Shapefile. Here is a tutorial.
>
> http://docs.codehaus.org/display/GEOSDOC/Create+your+own+Output+Format
>
> So as to your question are the interfaces in question significanly
> abstract enough, well yes they are for geoserver, but their
> extensiblity is limited. In this case you are lucky because they have
> been designed with an extensible output format in mind.
Um I think James Macgill already has this one covered ... not sure if it
is on a branch or what...

It's on head, and I actually just QA'ed it last week. It even does
some decent SLD processing, I got the population style working on top
of google earth. The one bug I found was that you have to use 'kml'
or 'kml+xml' (or really anything that starts with kml) for the output
type. I have a fix that allows you to request the same
application/vnc.googleearth or whatever thing that is actually
returned in our caps document.

Also note that this is in the WMS, not the WFS. Why? Because KML is
all mixed up with presentation and data, so though it's an xml format,
it's really about display. So things like styles have a big impact.
The cool thing with geoserver is you can request different styles of
KML to be generated by specifying your SLD. I wouldn't be against
having a KML WFS output format, but it would be a very boring one,
just like black lines or some such. Having both would be a good idea
though.

Also we definitely recommend syncing up your changes with GeoServer
core. The KML output may need some improvements, for things like
min/max scale denominators, and it'd be great if you could implement
KMZ support. If you do this in GeoServer, contribute the code, then
you wouldn't have to manually sync up on every new GeoServer release,
the maintenance would be done by the community.

I'd also like to see GeoServer implement the actual Network link stuff
for google earth as well. This would end up a whole new service, and
begs Justin's new architecture, but it would be nice. I tried to have
google earth render LA Roads from tiger, ended up a 70 meg kml file
(which we didn't stream like we do GML, that would be a nice
improvement, to directly write it out, I think we must write it and
then send it or some such). GeoServer handled its production fine,
but it definitely brought down my google earth.

Chris

Jody

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel