[Geoserver-users] Support for TimeSpan in KML

Hi Everyone,
Is the TimeSpan attribute supported using Freemarker templates for KML? Now, the TimeStamp attribute seems to be supported.

Also, as a more general question, is there anyway that I can exert complete control all content of the KML reflection? There are a lot of attributes that I would like to use, but they do not seem to be accessible with the templates on offer (description, content, time, etc).

Thanks and best regards,
Jason

Jason Pickering wrote:

Hi Everyone,
Is the TimeSpan attribute supported using Freemarker templates for KML? Now, the TimeStamp attribute seems to be supported.

Yes, see the 'Specifying a Date Range' at the end of http://docs.codehaus.org/display/GEOSDOC/02-Time+Templates

I'm going to change it right now to say 'TimeSpan', because it's not obvious that it's going to that element.

Also, as a more general question, is there anyway that I can exert complete control all content of the KML reflection? There are a lot of attributes that I would like to use, but they do not seem to be accessible with the templates on offer (description, content, time, etc).

Write some code? If you're really wanting complete control then that's the best way. We try to find the line between a lot of control and ease of use, but if you truly need complete control you probably need to do something custom.

But what other attributes would you like to use? How would you imagine being able to control them? If we can come up with an easy to use method of allowing that control I'd be happy to hear it and maybe implement. But already I think there a bit too many templates...

thanks,

Chris

Thanks and best regards,
Jason

!DSPAM:4005,472b04c4136081030819293!

------------------------------------------------------------------------

-------------------------------------------------------------------------
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,472b04c4136081030819293!

------------------------------------------------------------------------

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

!DSPAM:4005,472b04c4136081030819293!

Hi Chris,
Thanks for the quick response. I will have a look at the document. I should have noticed that previously.

As for the second request, what I am envisioning is the ability to have a single Freemarker template that would allow complete control over the KML output. For instance, suppose I want to change the following

<LookAt>
            <longitude>70.20848439999999</longitude>
            <latitude>34.72996113953816</latitude>
            <range>700</range>
            <tilt>
10.0</tilt>
            <heading>10.0</heading>

</LookAt>

Can I change the and tags?

Another problem is that I would like to be able to use the tag to better organize my data for my users. I can think of how to do this in Freemarker pretty easily, since I have an attribute in my data that I can group elements by into different folders, but it is not obvious how to do this at the moment.
Where is this in the code BTW. I have not been able to find the relevant section yet. :wink:

Best regards,
Jason

On 11/2/07, Chris Holmes <cholmes@anonymised.com> wrote:

Jason Pickering wrote:

Hi Everyone,
Is the TimeSpan attribute supported using Freemarker templates for KML?
Now, the TimeStamp attribute seems to be supported.

Yes, see the ‘Specifying a Date Range’ at the end of
http://docs.codehaus.org/display/GEOSDOC/02-Time+Templates

I’m going to change it right now to say ‘TimeSpan’, because it’s not
obvious that it’s going to that element.

Also, as a more general question, is there anyway that I can exert
complete control all content of the KML reflection? There are a lot of
attributes that I would like to use, but they do not seem to be
accessible with the templates on offer (description, content, time, etc).

Write some code? If you’re really wanting complete control then that’s
the best way. We try to find the line between a lot of control and ease
of use, but if you truly need complete control you probably need to do
something custom.

But what other attributes would you like to use? How would you imagine
being able to control them? If we can come up with an easy to use
method of allowing that control I’d be happy to hear it and maybe
implement. But already I think there a bit too many templates…

thanks,

Chris

Thanks and best regards,
Jason

!DSPAM:4005,472b04c4136081030819293!



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,472b04c4136081030819293!



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

!DSPAM:4005,472b04c4136081030819293!

I also would like to have the ability to have more 'complete' control over
the entire KML returned by GeoServer. The description and time templates
are wonderful (and easy to use), but there are many more interesting things
that could be done with KML such as:
- extrusions
- rollovers to visualize data pairings (see
http://www.thetimoneygroup.com/sa/SA_trade.kmz for an example)
... and probably others that haven't been invented yet.

It would be great if there were some way (freemarker template or otherwise)
to allow for more flexible KML generation of the data coming out of
geoserver.

- Tyler

jpickeri wrote:

Hi Chris,
Thanks for the quick response. I will have a look at the document. I
should
have noticed that previously.

As for the second request, what I am envisioning is the ability to have a
single Freemarker template that would allow complete control over the KML
output. For instance, suppose I want to change the following

<LookAt>
            <longitude>70.20848439999999</longitude>
            <latitude>34.72996113953816</latitude>
            <range>700</range>
            <tilt>10.0</tilt>
            <heading>10.0</heading>

</LookAt>

Can I change the <Tilt> and <heading> tags?

Another problem is that I would like to be able to use the *<Folder>* tag
to better organize my data for my users. I can think of how to do this in
Freemarker pretty easily, since I have an attribute in my data that I can
group elements by into different folders, but it is not obvious how to do
this at the moment.
Where is this in the code BTW. I have not been able to find the relevant
section yet. :wink:

Best regards,
Jason

On 11/2/07, Chris Holmes <cholmes@anonymised.com> wrote:

Jason Pickering wrote:
> Hi Everyone,
> Is the TimeSpan attribute supported using Freemarker templates for KML?
> Now, the TimeStamp attribute seems to be supported.

Yes, see the 'Specifying a Date Range' at the end of
http://docs.codehaus.org/display/GEOSDOC/02-Time+Templates

I'm going to change it right now to say 'TimeSpan', because it's not
obvious that it's going to that element.

>
> Also, as a more general question, is there anyway that I can exert
> complete control all content of the KML reflection? There are a lot of
> attributes that I would like to use, but they do not seem to be
> accessible with the templates on offer (description, content, time,
etc).
>
Write some code? If you're really wanting complete control then that's
the best way. We try to find the line between a lot of control and ease
of use, but if you truly need complete control you probably need to do
something custom.

But what other attributes would you like to use? How would you imagine
being able to control them? If we can come up with an easy to use
method of allowing that control I'd be happy to hear it and maybe
implement. But already I think there a bit too many templates...

thanks,

Chris

> Thanks and best regards,
> Jason
>
>
> !DSPAM:4005,472b04c4136081030819293!
>
>
>
------------------------------------------------------------------------
>
>
-------------------------------------------------------------------------
> 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,472b04c4136081030819293!
>
>
>
------------------------------------------------------------------------
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> !DSPAM:4005,472b04c4136081030819293!

-------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
View this message in context: http://www.nabble.com/Support-for-TimeSpan-in-KML-tf4736706.html#a13553051
Sent from the GeoServer - User mailing list archive at Nabble.com.

So the problem is that the approach we have now is more than a freemarker template. It should theoretically be possible to just have a big freemarker template that does KML output, our openlayers output is just done with a freemarker template. That's not the approach we've taken though, so it's not super easy right now.

I think the one downside of that approach is it probably would not scale all that well. We do a lot of really nice streaming stuff, making very low memory overhead, and I'm not sure that a freemarker template would take advantage of that. I could be wrong though.

If someone wanted to play with making a new output format - kml-template or something, we'd definitely welcome the contribution. We could make a community module for people to play with. I don't think it should be all that hard to do the basics.

As for specifics, I definitely want to get extrusions in relatively soon.

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

Tyler Erickson wrote:

I also would like to have the ability to have more 'complete' control over
the entire KML returned by GeoServer. The description and time templates
are wonderful (and easy to use), but there are many more interesting things
that could be done with KML such as:
- extrusions
- rollovers to visualize data pairings (see
http://www.thetimoneygroup.com/sa/SA_trade.kmz for an example)
... and probably others that haven't been invented yet.

It would be great if there were some way (freemarker template or otherwise)
to allow for more flexible KML generation of the data coming out of
geoserver.

- Tyler

jpickeri wrote:

Hi Chris,
Thanks for the quick response. I will have a look at the document. I
should
have noticed that previously.

As for the second request, what I am envisioning is the ability to have a
single Freemarker template that would allow complete control over the KML
output. For instance, suppose I want to change the following

<LookAt>
            <longitude>70.20848439999999</longitude>
            <latitude>34.72996113953816</latitude>
            <range>700</range>
            <tilt>10.0</tilt>
            <heading>10.0</heading>

</LookAt>

Can I change the <Tilt> and <heading> tags?

Another problem is that I would like to be able to use the *<Folder>* tag
to better organize my data for my users. I can think of how to do this in
Freemarker pretty easily, since I have an attribute in my data that I can
group elements by into different folders, but it is not obvious how to do
this at the moment.
Where is this in the code BTW. I have not been able to find the relevant
section yet. :wink:

Best regards,
Jason

On 11/2/07, Chris Holmes <cholmes@anonymised.com> wrote:

Jason Pickering wrote:

Hi Everyone,
Is the TimeSpan attribute supported using Freemarker templates for KML?
Now, the TimeStamp attribute seems to be supported.

Yes, see the 'Specifying a Date Range' at the end of
http://docs.codehaus.org/display/GEOSDOC/02-Time+Templates

I'm going to change it right now to say 'TimeSpan', because it's not
obvious that it's going to that element.

Also, as a more general question, is there anyway that I can exert
complete control all content of the KML reflection? There are a lot of
attributes that I would like to use, but they do not seem to be
accessible with the templates on offer (description, content, time,

etc).
Write some code? If you're really wanting complete control then that's
the best way. We try to find the line between a lot of control and ease
of use, but if you truly need complete control you probably need to do
something custom.

But what other attributes would you like to use? How would you imagine
being able to control them? If we can come up with an easy to use
method of allowing that control I'd be happy to hear it and maybe
implement. But already I think there a bit too many templates...

thanks,

Chris

Thanks and best regards,
Jason

------------------------------------------------------------------------

-------------------------------------------------------------------------

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,472b04c4136081030819293!

------------------------------------------------------------------------

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

!DSPAM:4005,472b04c4136081030819293!

-------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

The link from the last post (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
Sent from the GeoServer - User mailing list archive at Nabble.com.

Nice example of rollovers. I had not seen that one before. :slight_smile:

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> wrote:

Here is a link on how to code a rollover in KML. is the key tag.
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)
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
Sent from the GeoServer - User mailing list archive at 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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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/

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. :slight_smile:

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>> 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&gt;

    The link from the last post
    (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
    Sent from the GeoServer - User mailing list archive at 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>
    https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,472b7ded61942143011171!

------------------------------------------------------------------------

-------------------------------------------------------------------------
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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,472b7ded61942143011171!

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. :slight_smile: 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.

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.

I would be happy to describe my proposed use case for the tag, but maybe I can sumbit a request to JIRA instead?

Best regards,
Jason

On 11/2/07, Chris Holmes <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/

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. :slight_smile:

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. 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>

The link from the last post
( 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
Sent from the GeoServer - User mailing list archive at 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 >
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,472b7ded61942143011171!



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
https://lists.sourceforge.net/lists/listinfo/geoserver-users

!DSPAM:4005,472b7ded61942143011171!

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. :slight_smile: 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/&gt;

    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. :slight_smile:
     >
     > 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&gt;
     > <
    http://code.google.com/apis/kml/documentation/kml_tut.html#custom_styles&gt;
     >
     > The link from the last post
     > ( http://www.thetimoneygroup.com/sa/SA_trade.kmz
    <http://www.thetimoneygroup.com/sa/SA_trade.kmz&gt;\)
     > 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&gt;
     > 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&gt;
     >
    ------------------------------------------------------------------------
     >
    -------------------------------------------------------------------------
     > 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!

I am including a filter on a WFS call that includes the test:

ogc:PropertyIsEqualTo
ogc:PropertyNamevagis:from_jurisdiction_cd</ogc:PropertyName>
ogc:Literal042</ogc:Literal>
</ogc:PropertyIsEqualTo>

The field is a text field, but the value “042” is being converted to “42” then the field is being compared. This causes the filter to fail. Is there a way I can tell the filter to treat “042” as a string and not a number?

Thanks, David Robison

David Robison ha scritto:

I am including a filter on a WFS call that includes the test:

<ogc:PropertyIsEqualTo>
  <ogc:PropertyName>vagis:from_jurisdiction_cd</ogc:PropertyName>
  <ogc:Literal>042</ogc:Literal>
</ogc:PropertyIsEqualTo>

The field is a text field, but the value "042" is being converted to "42" then the field is being compared. This causes the filter to fail. Is there a way I can tell the filter to treat "042" as a string and not a number?

Long story short, no, you can't. Unfortunately the filter executing
code in all GeoServer versions before 1.6 is just this silly, it
does not know about the actual type of the property and tries
to guess one by parsing the literal you provide as a number, as a
date and so on and keeps it as a string only if everything else
fails...

The good news is, this has been fixed in GeoServer 1.6. I suggest
you go grab beta4 and try out
(only one warning, beta4 still has a nasty rendering
bug for multilayer maps with labels that has been fixed after the beta4 release, see http://jira.codehaus.org/browse/GEOS-1445)

Cheers
Andrea

I am running 1.6.0-beta4 but still experiencing the same problem. Am I doing something wrong? The back end is a PostGIS database and the field is defined as "character varying".
Thanks, David

Andrea Aime wrote:

David Robison ha scritto:

I am including a filter on a WFS call that includes the test:

<ogc:PropertyIsEqualTo>
  <ogc:PropertyName>vagis:from_jurisdiction_cd</ogc:PropertyName>
  <ogc:Literal>042</ogc:Literal>
</ogc:PropertyIsEqualTo>

The field is a text field, but the value "042" is being converted to "42" then the field is being compared. This causes the filter to fail. Is there a way I can tell the filter to treat "042" as a string and not a number?

Long story short, no, you can't. Unfortunately the filter executing
code in all GeoServer versions before 1.6 is just this silly, it
does not know about the actual type of the property and tries
to guess one by parsing the literal you provide as a number, as a
date and so on and keeps it as a string only if everything else
fails...

The good news is, this has been fixed in GeoServer 1.6. I suggest
you go grab beta4 and try out
(only one warning, beta4 still has a nasty rendering
bug for multilayer maps with labels that has been fixed after the beta4 release, see http://jira.codehaus.org/browse/GEOS-1445)

Cheers
Andrea

--

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: drrobison@anonymised.com
web: http://openroadsconsulting.com
blog: http://therobe.blogspot.com
book: http://www.xulonpress.com/book_detail.php?id=2579

Sorry… it is working in RC1. Thanks, David

David R Robison wrote:

···
-- 

David R Robison
Open Roads Consulting, Inc.
708 S. Battlefield Blvd., Chesapeake, VA 23322
phone: (757) 546-3401
e-mail: [drrobison@anonymised.com](mailto:drrobison@anonymised.com)
web: [http://openroadsconsulting.com](http://openroadsconsulting.com)
blog: [http://therobe.blogspot.com](http://therobe.blogspot.com)
book: [http://www.xulonpress.com/book_detail.php?id=2579](http://www.xulonpress.com/book_detail.php?id=2579)

 

David R Robison ha scritto:

Sorry... it is working in RC1. Thanks, David

Pheew... you got me worried there :slight_smile:
Cheers
Andrea