Jason Pickering wrote:
Hi Chris,
First off, sorry for any misinterpretation of my last mail. Funding and development time are certainly things that we can discuss, perhaps offline, otherwise I would not have brought this up.
However, before I start hitting up donors for money for development, I want to be sure that this is something that is feasible and worthwhile.
Ok, cool. I apologize for misinterpreting.
I will take a look at the code and see what I can come up with. I would be very interested to hear why you decided to go the way that you have however, before I allocate any resources to trying to implement this.
Oh, there was no real conscious decision to go the way that we did, and if we had done a full evaluation of alternatives, like we do for other initiatives, we may well have gone another route. KML support came about in GeoServer with James MacGill implementing the basics. And then we got a bit of funding to extend his work, and what he had seemed to be pretty decent.
So we took the same route we did with our other output formats, like GML - just transform from the java objects to the output stream. Our GML stuff is really efficient, able to stream out gigabytes of data with little memory overhead. Of course it turns out that Google Earth kind of falls over when you try to give it more than 30 or 40 megs at once, so the huge scalability isn't as necessary, but doesn't hurt.
I think we also weren't quite aware of the vast array of tags and how many different things people wanted to do. The first version was geared around the idea that you should be able to just configure your styling once, that KML should portray the SLD in the same way as your 2d maps. I think we didn't quite understand how many different things people would want to do with KML output, and indeed how high the bar is for most KML, because a majority of it is edited by hand or very custom scripts.
So recently we've put a lot of energy in to providing the customizations and features that people want, leading to a fairly diverse set of configuration - 3 template files, SLD files, KMScore params, ect. And put time in to getting default behaviors right, so if you just put your data on it looks pretty good - with LookAt and default size of icons, ect.
And obviously we're still not meeting all the use cases. So I think it's definitely worthwhile to investigate going the route of controlling the full KML output through a template, that others can customize. I'm not positive that it would eliminate the need for the current one, but it could.
I don't personally know the template engine stuff that well, so there may be reasons it won't work. Hopefully someone else more knowledgeable will sound in. But I'd say it's definitely worth investing a bit of time to experiment, I'm not sure that anyone could give a definitive answer.
The one thing I think may be lost is the ability to get the styling information from the SLD. There may be a way to get at the java object that contains the style information and stick that in to the template. But it may just be that the styling information also needs to be controlled in the template. So by default it'd have a pretty boring style. But people would be able to customize it much more than we allow, since they'd have exact control over the tags. Which probably is the route to go for this - an alternate way for advanced users, that sacrifices all the automatic defaults in favor of a much higher degree of control. After that's done maybe it can eventually fuse with the existing one and get the best of both worlds.
I would be happy to describe my proposed use case for the <Folders> tag, but maybe I can sumbit a request to JIRA instead?
Sounds great.
best regards,
Chris
Best regards,
Jason
On 11/2/07, * Chris Holmes* <cholmes@anonymised.com <mailto:cholmes@anonymised.com>> wrote:
First off, contributions are more than welcome, and we will certainly
incorporate them in to the code base. Arguing things 'should' be
implemented without offering help, in your time or funding, isn't an
argument that works well in open source projects. The WMS was
implemented because people like you felt it should be a part of
GeoServer.
If you're comfortable with freemarker templates then I'd highly
recommend doing some experiments with them. The openlayers output
format has an example of how you can use one to output information with
a template. See
http://svn.codehaus.org/geoserver/trunk/geoserver/wms/src/main/java/org/vfny/geoserver/wms/responses/map/openlayers/
You could just make a template of a standard KML document, that inserts
the relevant information from GeoServer. The results of a successful
experiment could get picked up by other developers. The existing kml
code is at
http://svn.codehaus.org/geoserver/trunk/geoserver/wms/src/main/java/org/vfny/geoserver/wms/responses/map/kml/
<http://svn.codehaus.org/geoserver/trunk/geoserver/wms/src/main/java/org/vfny/geoserver/wms/responses/map/kml/>
At the time we started our KML work freemarker wasn't a part of the
codebase, so there wasn't the possibility of allowing the full
flexibility in the way you want. I think the other downside of it
is it
wouldn't be able to automatically derive styles in the way our KML
output does, and there could be other limitations. I'm sorry we didn't
do things that way, so we don't have a nice side effect that makes
it so
the whole thing is templated and customizable. We made a design
decision, but if there's a better alternative I don't think we're wedded
to it. But it obviously depends on resources.
I personally do want geoserver to have the best KML support of any GIS
server. But I am not convinced that aiming for full control at the
expense of ease of use is the way. GeoServer's philosophy has always
been to focus on handling the majority of use cases in the easiest way
possible.
So for now my approach is to continue to handle the needs as they arise.
Extrudes will be in soon. I'd like to hear more about your folder use
case and how you imagine being able to configure it. You can make a
feature request in the task tracker if you'd like. I could perhaps see
a template that lets people stick arbitrary content in to each feature,
but I'm not sure how to architect something fully customizable unless
the whole output is built on a template. And I don't _really_ want to
make every user who wants to change something figure out a template
language. If you have a great idea I'd love to hear it, indeed KML
Time
support exists because Tyler had a really simple idea of how to
implement it.
I'm not sure that your ability to buy more pizza boxes outweighs the
needs of the number of people who can't just afford to buy more server
capacity. If our KML output is slow and a memory hog it won't matter if
it can handle anything.
best regards,
Chris
Jason Pickering wrote:
> Nice example of rollovers. I had not seen that one before. 
>
> Although the issue of scalability is one to consider, so is the
issue of
> pizza boxes. I can buy more pizza boxes and put in my server
rack, but I
> cannot get Geoserver to do what I want at the moment!
>
> I see some limitation with Geoserver in terms of what I can achieve
> with dynamic KML output, simply because there have been a limited
range
> of tags that have been chosen to be implemented. For me, the use
of the
> Folders tag is an absolute must. I have manage to accomplish this
> another way, with CQL filters and a KML file, but it seems like a
bit of
> a hack to me. This thread started with the TimeSpan tag, but
there are
> others such as Folders and Extrusion that would be very nice to
have.
>
> I would argue as well, that as has been done with the
implementation of
> the WMS spec with Geoserver, a complete and robust implementation
that
> fully supports KML should also be implemented, as opposed to
selective
> portions.
>
> /JPP
>
> On 11/2/07, *Tyler Erickson* < tyler.erickson@anonymised.com
<mailto:tyler.erickson@anonymised.com>
> <mailto:tyler.erickson@anonymised.com>>
wrote:
>
> Here is a link on how to code a rollover in KML. <StyleMap>
is the
> key tag.
> http://code.google.com/apis/kml/documentation/kml_tut.html#custom_styles
<http://code.google.com/apis/kml/documentation/kml_tut.html#custom_styles>
> <
http://code.google.com/apis/kml/documentation/kml_tut.html#custom_styles>
>
> The link from the last post
> ( http://www.thetimoneygroup.com/sa/SA_trade.kmz
<http://www.thetimoneygroup.com/sa/SA_trade.kmz>\)
> uses this technique to interactively visualize trade between
> countries in
> South America. You roll over the placemark for a country, and it
> graphically displays the exports to the surrounding
> countries. Basically,
> the rollover action toggles the visibility of the placemark
geometry
> tags.
>
> I certainly wouldn't characterize this as a 'common' use of
KML tags
> that
> users would want... it's just an example of an advanced use
of KML for
> visualization.
>
> - Tyler
>
> Chris Holmes wrote:
> >
> > ...
> >
> > How do you specify rollovers in KML? What's the name of
the tag
> that is
> > used? Can you give an example?
> >
> > I think it makes sense to try to get the most common tags
people
> want to
> > use in the main KML thing, which will scale to huge
datasets. And if
> > people are motivated the freemarker KML can be an alternative
> with more
> > control, and if it performs as well we could have it
replace the
> main
> > one. Or just have it like SVG where there are different
rendering
> > options for different purposes.
> >
> > Chris
> >
>
> --
> View this message in context:
> http://www.nabble.com/Support-for-TimeSpan-in-KML-tf4736706.html#a13553838
<http://www.nabble.com/Support-for-TimeSpan-in-KML-tf4736706.html#a13553838>
> Sent from the GeoServer - User mailing list archive at
Nabble.com <http://Nabble.com>
> < http://Nabble.com>.
>
> -------------------------------------------------------------------------
>
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and
a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
> <mailto: Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>>
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
<https://lists.sourceforge.net/lists/listinfo/geoserver-users>
>
------------------------------------------------------------------------
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems? Stop.
> Now Search log events and configuration files using AJAX and a
browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
>
> !DSPAM:4005,472b7ded61942143011171!
>
------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
<mailto:Geoserver-users@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
> !DSPAM:4005,472b7ded61942143011171!
!DSPAM:4005,472c228419541137850744!