[Geoserver-devel] KML2 module: a WFS output format too

Hi,
I’ve just written a KML WFS output format leveraging the same machinery used by the WMS output format, the output format generates the geometries and the attributes using the extended data construct, and embeds in the KML document also a schema, e.g.:

<?xml version="1.0" encoding="UTF-8"?> AggregateGeoFeature description-f005 name-f005 2012.78 Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. BK030 70.83,29.86 68.87,31.08 71.96,32.19

The output format automatically skips the extra geometry attributes (which we cannot encode) and forces the output in wgs84 lon/lat as that’s how KML is defined.

While not as fast as GML2, it’s still quite a bit faster than GML3 (tops at around 20MB/s on my machine, while GML2 goes up to 25MB/s and GML3… err… 2MB/s only…)

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

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


Nice! I’ve always wanted that - wfs output that just removes the style.

I’m curious, are you doing schema / extended data for the wms kml output? Or are they an option people can add? So you can have the styled kml with all the data? I haven’t looked at KML in awhile, but I remember wanting that option or something like it.

···

On Thu, Jun 20, 2013 at 10:04 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

Hi,
I’ve just written a KML WFS output format leveraging the same machinery used by the WMS output format, the output format generates the geometries and the attributes using the extended data construct, and embeds in the KML document also a schema, e.g.:

<?xml version="1.0" encoding="UTF-8"?> AggregateGeoFeature description-f005 name-f005 2012.78 Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. BK030 70.83,29.86 68.87,31.08 71.96,32.19

The output format automatically skips the extra geometry attributes (which we cannot encode) and forces the output in wgs84 lon/lat as that’s how KML is defined.

While not as fast as GML2, it’s still quite a bit faster than GML3 (tops at around 20MB/s on my machine, while GML2 goes up to 25MB/s and GML3… err… 2MB/s only…)

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

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



This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev


Geoserver-devel mailing list
Geoserver-devel@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

On Thu, Jun 20, 2013 at 4:09 PM, Chris Holmes <cholmes@anonymised.com> wrote:

Nice! I've always wanted that - wfs output that just removes the style.

It removes more than just the styles:
* no description, GE will use the extended data to create popups if one
loads the file in Google Earth
* no time and elevation templates (this could be added back if needs be)
* no geosearch related stuff (self links and the like)

I've tried to re-create a GML like experience, but with KML syntax

I'm curious, are you doing schema / extended data for the wms kml output?
Or are they an option people can add? So you can have the styled kml with
all the data? I haven't looked at KML in awhile, but I remember wanting
that option or something like it.

Yes, just add extendeddata=true in your kml reflector request and they will
be generated in WMS too

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

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

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

You’re bringing me back to my KML thoughts, things that I wanted to be better. Some responses inline.

(attachments)

placemark-html.jpg

···

On Thu, Jun 20, 2013 at 10:16 AM, Andrea Aime <andrea.aime@anonymised.com> wrote:

On Thu, Jun 20, 2013 at 4:09 PM, Chris Holmes <cholmes@anonymised.com> wrote:

Right, this was what I thought we should do by default even in the WMS. Like in the previous one we generated a weird html table, since when we wrote it that’s all you could do. Then they came out with the extended data concept, which seemed way cleaner. So seems like we should have extended data as the default for WMS, and then ‘description’ ftl would over write it (and can add extendeddata=true if you want both). Is that how you did it? Or does it still generate the super lame html table:
Inline image 1

So the time and elevation templates are just lame now, since GeoServer is now time and elevation aware, thanks to all the amazing work GeoSolutions did. Like even with vectors you can set your time and elevation field directly in the admin GUI. The only reason we had those lame templates is because we had no way to do that. So it seems like the ideal thing to do is to have KML just hook directly in to the time and elevation configuration of GeoServer, and drop the silly .ftl’s. Thoughts? Or plans to do this? Or did you already do it?

Very cool, that’s great.

Cool. That’s great it’s there. Like I mentioned above would love for that to be the default instead of our lame description html table default. And then people could fill out a description.ftl if they wanted to surpress the extended data.

Nice! I’ve always wanted that - wfs output that just removes the style.

It removes more than just the styles:

  • no description, GE will use the extended data to create popups if one loads the file in Google Earth

  • no time and elevation templates (this could be added back if needs be)

  • no geosearch related stuff (self links and the like)

I’ve tried to re-create a GML like experience, but with KML syntax

I’m curious, are you doing schema / extended data for the wms kml output? Or are they an option people can add? So you can have the styled kml with all the data? I haven’t looked at KML in awhile, but I remember wanting that option or something like it.

Yes, just add extendeddata=true in your kml reflector request and they will be generated in WMS too

Cheers

Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

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


On Thu, Jun 20, 2013 at 5:04 PM, Chris Holmes <cholmes@anonymised.com> wrote:

Right, this was what I thought we should do by default even in the WMS.
Like in the previous one we generated a weird html table, since when we
wrote it that's all you could do. Then they came out with the extended data
concept, which seemed way cleaner. So seems like we should have extended
data as the default for WMS, and then 'description' ftl would over write it
(and can add extendeddata=true if you want both). Is that how you did it?
Or does it still generate the super lame html table:
!extendedData.jpg|467x376

The current output looks nicer, and imho, it's actually nicer than what GE
does with the extended data. See here, standard output with our built-in
template:

!placemark-html.jpg|347x171

and the output with the extended data, and disabling our description popup
(kmattr=false&extendeddata=true):

!standard.jpg|560x439

* no time and elevation templates (this could be added back if needs be)

So the time and elevation templates are just lame now, since GeoServer is
now time and elevation aware, thanks to all the amazing work GeoSolutions
did. Like even with vectors you can set your time and elevation field
directly in the admin GUI. The only reason we had those lame templates is
because we had no way to do that. So it seems like the ideal thing to do is
to have KML just hook directly in to the time and elevation configuration
of GeoServer, and drop the silly .ftl's. Thoughts? Or plans to do this? Or
did you already do it?

I haven't done it yet, we are considering doing it for the time dimension,
as that would make most sense.
Easy to do with vector data, more complicated with raster, where I'd have
to generate a sequence of ground overlays.

Elevation instead does not fit in my opinion: the height template is really
an extrusion template, whilst the wms elevation
is (often, but not always) the altimetric height of the feature/raster. And
often it's a bathimetry, something that I believe
GE would not show as the object would end up below the ground.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

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

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

On Thu, Jun 20, 2013 at 1:28 PM, Andrea Aime
<andrea.aime@anonymised.com>wrote:

On Thu, Jun 20, 2013 at 5:04 PM, Chris Holmes <cholmes@anonymised.com> wrote:

Right, this was what I thought we should do by default even in the WMS.
Like in the previous one we generated a weird html table, since when we
wrote it that's all you could do. Then they came out with the extended data
concept, which seemed way cleaner. So seems like we should have extended
data as the default for WMS, and then 'description' ftl would over write it
(and can add extendeddata=true if you want both). Is that how you did it?
Or does it still generate the super lame html table:
!standard.jpg|560x439

The current output looks nicer, and imho, it's actually nicer than what GE
does with the extended data. See here, standard output with our built-in
template:

!placemark-html.jpg|347x171

and the output with the extended data, and disabling our description popup
(kmattr=false&extendeddata=true):

!extendedData.jpg|467x376

Oh cool, yeah, our new one does look better. Funny that their extended data
one looks more like our lame looking old one. Nice work. Could be good to
update the screenshot.

* no time and elevation templates (this could be added back if needs be)

So the time and elevation templates are just lame now, since GeoServer is
now time and elevation aware, thanks to all the amazing work GeoSolutions
did. Like even with vectors you can set your time and elevation field
directly in the admin GUI. The only reason we had those lame templates is
because we had no way to do that. So it seems like the ideal thing to do is
to have KML just hook directly in to the time and elevation configuration
of GeoServer, and drop the silly .ftl's. Thoughts? Or plans to do this? Or
did you already do it?

I haven't done it yet, we are considering doing it for the time dimension,
as that would make most sense.
Easy to do with vector data, more complicated with raster, where I'd have
to generate a sequence of ground overlays.

Cool. Yeah, vector time is my primary use case, thing that got me thinking
on it. Raster would be nice too.

Elevation instead does not fit in my opinion: the height template is
really an extrusion template, whilst the wms elevation
is (often, but not always) the altimetric height of the feature/raster.
And often it's a bathimetry, something that I believe
GE would not show as the object would end up below the ground.

Ah right, I didn't think that much about it. I could see it being nice for
just vector, do an extrude through the web admin instead of having to go to
the .ftl. But raster does make less sense as you point out.

Thanks Andrea.

Cheers
Andrea

--

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.

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

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