RE: [Geoserver-users] KML output into GE via Geoserver

I just attached a zip containing the png output, sld and the kml to the
JIRA issue FYI

Chris

-----Original Message-----

This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this in error, please notify the author by Return email to the sender. Information in this message not relating to the official business of DLI shall be understood as neither given nor endorsed by it. While every care is taken, it is recommended that you scan any attachments for viruses. DLI liability is limited to re-supplying affected attachments.

**********************

PLEASE NOTE: All dola.wa.gov.au and vgo.wa.gov.au email addresses will soon be decommissioned. These have been replaced by dli.wa.gov.au addresses. Please ensure that your records are updated to reflect this change. Further information can be obtained by contacting our service desk on 92737533 or emailing Servicedesk@anonymised.com

**********************
    
From: Chris Holmes [mailto:cholmes@anonymised.com]
Sent: Thursday, 16 March 2006 12:32 PM
To: Chris Tweedie
Cc: Doug Fils; Geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] KML output into GE via Geoserver

Chris Tweedie wrote:

Hey guys,

Thanks for the patch Chris, there are still some niggling issues which

I

will try to look at soon.

I understand where you guys are coming from re: sponsorship of the KML
stuff so I'm a bit hesitant at logging too many bugs ..

Oh, don't hesitate to log bugs, having them in the bug tracker is most
always helpful. Just include good error reports, ideally with
information/data to exactly reproduce the error. Indeed if you can nail

down exactly how to replicate it then it eases the programmer's job, and

sometimes the answer will just jump right out. So add any and all bugs
you find to the tracker, there's no way it hurts, we may just not get to

it super soon.

1. ArcSDE datastores keep throwing "Error building SeFilter"

exceptions

when requesting KML no matter how simple the SLD is.

Weird. Try to get a stack trace from the logs, and include that in the
bug report.

2. The patch didn't fix all issues (See attached). I haven't looked at
the KML code but its pushing out duplicate geometry for each feature
(But hey, the labels work!) :slight_smile:

I'm not sure what I'm looking at in the attached? Is the KML _always_
pushing out duplicate geometries, or just when you have a label
declared?

This was a quick 2 minute test, so apologies on the lack of detail.

Has

Jorn taken over the KML stuff or is it still a free for all as far as
patches are concerned for the KML writer?

No, he was just evaluating GeoServer as an option to go for funding, and

fixed that bug along the way. If they get funding then he'll be able to

do real fixes. I really want to see this stuff in, so if I get spare
time I may just take a crack at it, especially if you have good bug
reports for me, with like data and sld's and whatnot. But lately I'm
super swamped and likely will remain so for awhile.

best regards,

Chris

Cheers,

Chris Tweedie

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of

Chris

Holmes
Sent: Thursday, 16 March 2006 12:26 AM
To: Doug Fils
Cc: Geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] KML output into GE via Geoserver

Doug Fils wrote:

All,

  Been mostly a lurker on the site but we (http://www.chronos.org)

have installed and set up Geoserver as our WMS/WFS solution.

  With the help of Chris Tweedie (thanks Chris) I got the URL to our

geoserver working with returning GE output.

ref:

http://services.chronos.org:9090/geoserver/wms?service=WMS&version=1.0.0

&request=GetMap&format=application/vnd.google-earth.kml+XML&width=500&he

ight=500&srs=EPSG:4326&layers=chronos:diatoms&styles=blue_point

When I run it I get the results.. but now I have some questions.

1) All the points are unlabeled, is there a way for me to pull some

data from a table in our postgis db and attach to a label name for

these points? Is this what entry:

http://jira.codehaus.org/browse/GEOS-537 regarding place names is

about?

I _think_ so. I just built geoserver with the patched file, could you

go to the issue again and download the attached geoserver.jar? Let me

know if it works...

2) How do I associate data from the database into a WFS or KML output?

In the attached screen shot from that feature setup in geoserver I see

all the genus and species data with a point. (This is ocean drilling

data). I would love to see that in the white pop box in GE. Is

there something I am missing, is that related to the schema base

entry? I assume there is a link between this question and the place

name issue in item (1)?

Yes, 1) must be working properly for this to display correctly. To

get

in to WFS you don't need to do anything, all attributes are returned

by

default. To get it in KML (which is generated by the WMS) you need to

make the appropriate 'label' in SLD. If you get the latest udig

(1.1M6)

from http://udig.refractions.net you can use it to customize your SLD

with a nice gui, and then export it and upload it to GeoServer. The

lable should then be rendered in WMS, and in KML if that patch works.

Note I could only get the label working with one field at a time, but

I

think it's supposed to support more.

All the data now is Ocean based, but soon we will have GSSP markers

and asteroid impact data on-line as well, so it would be great to be

able to get this data into GE for example.

Cool. The GE support is still young, and there are some concrete

things

that need to be fixed. We've estimated about 8 days work to get the

KML

stuff up to snuff, and streaming with KMZ, which we're not planning to

do immediately unless we can scare up a bit of funding. But reporting

bugs like this helps us know what needs to be done.

best regards,

Chris

thanks everyone!

doug

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

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com

Ok, just had almost an hour of hacking, may have made some progress, at least looking at the kml output. It's still hacky though, will do different things depending on the order you put your symbolizers in. I think we'll have to store some stack of the options to put on when we're ready to write out the geometry or some such...

But try out the latest jar, just uploaded it to the bug. It's #2 geoserver.jar, the one that's not greyed out.

My problem in my testing, however, is that I can never actually see the name labels. Like even in your attached KML file. Is there some option I need to turn on in google earth to see them?

thanks!

Chris

Chris Tweedie wrote:

I just attached a zip containing the png output, sld and the kml to the
JIRA issue FYI

Chris

-----Original Message-----

This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this in error, please notify the author by Return email to the sender. Information in this message not relating to the official business of DLI shall be understood as neither given nor endorsed by it. While every care is taken, it is recommended that you scan any attachments for viruses. DLI liability is limited to re-supplying affected attachments.

**********************

PLEASE NOTE: All dola.wa.gov.au and vgo.wa.gov.au email addresses will soon be decommissioned. These have been replaced by dli.wa.gov.au addresses. Please ensure that your records are updated to reflect this change. Further information can be obtained by contacting our service desk on 92737533 or emailing Servicedesk@anonymised.com

**********************
    
From: Chris Holmes [mailto:cholmes@anonymised.com] Sent: Thursday, 16 March 2006 12:32 PM
To: Chris Tweedie
Cc: Doug Fils; Geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] KML output into GE via Geoserver

Chris Tweedie wrote:

Hey guys,

Thanks for the patch Chris, there are still some niggling issues which

I

will try to look at soon.

I understand where you guys are coming from re: sponsorship of the KML
stuff so I'm a bit hesitant at logging too many bugs ..

Oh, don't hesitate to log bugs, having them in the bug tracker is most always helpful. Just include good error reports, ideally with information/data to exactly reproduce the error. Indeed if you can nail

down exactly how to replicate it then it eases the programmer's job, and

sometimes the answer will just jump right out. So add any and all bugs you find to the tracker, there's no way it hurts, we may just not get to

it super soon.

1. ArcSDE datastores keep throwing "Error building SeFilter"

exceptions

when requesting KML no matter how simple the SLD is.

Weird. Try to get a stack trace from the logs, and include that in the bug report.

2. The patch didn't fix all issues (See attached). I haven't looked at
the KML code but its pushing out duplicate geometry for each feature
(But hey, the labels work!) :slight_smile:

I'm not sure what I'm looking at in the attached? Is the KML _always_ pushing out duplicate geometries, or just when you have a label
declared?

This was a quick 2 minute test, so apologies on the lack of detail.

Has

Jorn taken over the KML stuff or is it still a free for all as far as
patches are concerned for the KML writer?

No, he was just evaluating GeoServer as an option to go for funding, and

fixed that bug along the way. If they get funding then he'll be able to

do real fixes. I really want to see this stuff in, so if I get spare time I may just take a crack at it, especially if you have good bug reports for me, with like data and sld's and whatnot. But lately I'm super swamped and likely will remain so for awhile.

best regards,

Chris

Cheers,

Chris Tweedie

-----Original Message-----
From: geoserver-users-admin@lists.sourceforge.net
[mailto:geoserver-users-admin@lists.sourceforge.net] On Behalf Of

Chris

Holmes
Sent: Thursday, 16 March 2006 12:26 AM
To: Doug Fils
Cc: Geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] KML output into GE via Geoserver

Doug Fils wrote:

All,

Been mostly a lurker on the site but we (http://www.chronos.org)

have installed and set up Geoserver as our WMS/WFS solution.

With the help of Chris Tweedie (thanks Chris) I got the URL to our

geoserver working with returning GE output.

ref:

http://services.chronos.org:9090/geoserver/wms?service=WMS&version=1.0.0

&request=GetMap&format=application/vnd.google-earth.kml+XML&width=500&he

ight=500&srs=EPSG:4326&layers=chronos:diatoms&styles=blue_point

When I run it I get the results.. but now I have some questions.

1) All the points are unlabeled, is there a way for me to pull some

data from a table in our postgis db and attach to a label name for

these points? Is this what entry:

http://jira.codehaus.org/browse/GEOS-537 regarding place names is

about?

I _think_ so. I just built geoserver with the patched file, could you

go to the issue again and download the attached geoserver.jar? Let me

know if it works...

2) How do I associate data from the database into a WFS or KML output?

In the attached screen shot from that feature setup in geoserver I see

all the genus and species data with a point. (This is ocean drilling

data). I would love to see that in the white pop box in GE. Is

there something I am missing, is that related to the schema base

entry? I assume there is a link between this question and the place

name issue in item (1)?

Yes, 1) must be working properly for this to display correctly. To

get

in to WFS you don't need to do anything, all attributes are returned

by

default. To get it in KML (which is generated by the WMS) you need to

make the appropriate 'label' in SLD. If you get the latest udig

(1.1M6)

from http://udig.refractions.net you can use it to customize your SLD

with a nice gui, and then export it and upload it to GeoServer. The

lable should then be rendered in WMS, and in KML if that patch works.

Note I could only get the label working with one field at a time, but

I

think it's supposed to support more.

All the data now is Ocean based, but soon we will have GSSP markers

and asteroid impact data on-line as well, so it would be great to be

able to get this data into GE for example.

Cool. The GE support is still young, and there are some concrete

things

that need to be fixed. We've estimated about 8 days work to get the

KML

stuff up to snuff, and streaming with KMZ, which we're not planning to

do immediately unless we can scare up a bit of funding. But reporting

bugs like this helps us know what needs to be done.

best regards,

Chris

thanks everyone!

doug

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

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com

On Thursday 16 March 2006 18:16, Chris Holmes wrote:

Ok, just had almost an hour of hacking, may have made some progress, at
least looking at the kml output. It's still hacky though, will do
different things depending on the order you put your symbolizers in. I
think we'll have to store some stack of the options to put on when we're
ready to write out the geometry or some such...

But try out the latest jar, just uploaded it to the bug. It's #2
geoserver.jar, the one that's not greyed out.

My problem in my testing, however, is that I can never actually see the
name labels. Like even in your attached KML file. Is there some option
I need to turn on in google earth to see them?

Just a note based on my experience, only Point's name is visible in Google
Earth. So if you want to label a Polygon you have to put a Point and the
Polygon inside a MultiGeometry, for example:

<Folder>
<Placemark>
    <name>Carl S Park</name>
    <description>Some Descriptive text.</description>
    <LookAt>
      <longitude>-90.86879847669974</longitude>
      <latitude>48.25330383601299</latitude>
      <range>440.8490922646644</range>
      <tilt>8.39474026454335</tilt>
      <heading>2.701112047774894</heading>
    </LookAt>

   <MultiGeometry>
    <Point>
      <coordinates> -73.9431,40.7776,0</coordinates>
    </Point>

    <Polygon xmlns:gml="http://www.opengis.net/gml&quot;&gt;
<outerBoundaryIs>
<LinearRing>
<coordinates xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs="," ts="">
-73.9447,40.7734,0 -73.9459,40.7739,0 -73.9455,40.7745,0 -73.945,40.7752,0
-73.94 45,40.7758,0 -73.944,40.7763,0 -73.9435,40.777,0 -73.9431,40.7776,0
-73.9431,40.7773,0 -73.9425,40.7782,0 -73.9422,40.7779,0 -73.9442,40.773,0
-73.9447,40.7734,0</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>
</Placemark>
</Folder>

Ah, interesting. Does it ever _hurt_ if there's an extra point in the geometry collection? I'm thinking it could make sense for us to always include a point that's the centroid of the polygon or something, to attach the label to.

Jørn Vegard Røsnes wrote:

On Thursday 16 March 2006 18:16, Chris Holmes wrote:

Ok, just had almost an hour of hacking, may have made some progress, at
least looking at the kml output. It's still hacky though, will do
different things depending on the order you put your symbolizers in. I
think we'll have to store some stack of the options to put on when we're
ready to write out the geometry or some such...

But try out the latest jar, just uploaded it to the bug. It's #2
geoserver.jar, the one that's not greyed out.

My problem in my testing, however, is that I can never actually see the
name labels. Like even in your attached KML file. Is there some option
I need to turn on in google earth to see them?

Just a note based on my experience, only Point's name is visible in Google Earth. So if you want to label a Polygon you have to put a Point and the Polygon inside a MultiGeometry, for example:

<Folder>
<Placemark>
    <name>Carl S Park</name>
    <description>Some Descriptive text.</description>
    <LookAt>
      <longitude>-90.86879847669974</longitude>
      <latitude>48.25330383601299</latitude>
      <range>440.8490922646644</range>
      <tilt>8.39474026454335</tilt>
      <heading>2.701112047774894</heading>
    </LookAt>

   <MultiGeometry>
    <Point>
      <coordinates> -73.9431,40.7776,0</coordinates>
    </Point>

    <Polygon xmlns:gml="http://www.opengis.net/gml&quot;&gt;
<outerBoundaryIs>
<LinearRing>
<coordinates xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs="," ts="">
-73.9447,40.7734,0 -73.9459,40.7739,0 -73.9455,40.7745,0 -73.945,40.7752,0 -73.94 45,40.7758,0 -73.944,40.7763,0 -73.9435,40.777,0 -73.9431,40.7776,0 -73.9431,40.7773,0 -73.9425,40.7782,0 -73.9422,40.7779,0 -73.9442,40.773,0 -73.9447,40.7734,0</coordinates>
</LinearRing>
</outerBoundaryIs>
</Polygon>
</MultiGeometry>
</Placemark>
</Folder>

--
Chris Holmes
The Open Planning Project
thoughts at: http://cholmes.wordpress.com

On Thursday 16 March 2006 19:38, Chris Holmes wrote:

Ah, interesting. Does it ever _hurt_ if there's an extra point in the
geometry collection? I'm thinking it could make sense for us to always
include a point that's the centroid of the polygon or something, to
attach the label to.

In most cases I think it's ok.
Maybe it could be configure/SLD dependent...

Jørn Vegard Røsnes wrote:
> On Thursday 16 March 2006 18:16, Chris Holmes wrote:
>>Ok, just had almost an hour of hacking, may have made some progress, at
>>least looking at the kml output. It's still hacky though, will do
>>different things depending on the order you put your symbolizers in. I
>>think we'll have to store some stack of the options to put on when we're
>>ready to write out the geometry or some such...
>>
>>But try out the latest jar, just uploaded it to the bug. It's #2
>>geoserver.jar, the one that's not greyed out.
>>
>>My problem in my testing, however, is that I can never actually see the
>>name labels. Like even in your attached KML file. Is there some option
>>I need to turn on in google earth to see them?
>
> Just a note based on my experience, only Point's name is visible in
> Google Earth. So if you want to label a Polygon you have to put a Point
> and the Polygon inside a MultiGeometry, for example:
>
> <Folder>
> <Placemark>
> <name>Carl S Park</name>
> <description>Some Descriptive text.</description>
> <LookAt>
> <longitude>-90.86879847669974</longitude>
> <latitude>48.25330383601299</latitude>
> <range>440.8490922646644</range>
> <tilt>8.39474026454335</tilt>
> <heading>2.701112047774894</heading>
> </LookAt>
>
> <MultiGeometry>
> <Point>
> <coordinates> -73.9431,40.7776,0</coordinates>
> </Point>
>
> <Polygon xmlns:gml="http://www.opengis.net/gml&quot;&gt;
> <outerBoundaryIs>
> <LinearRing>
> <coordinates xmlns:gml="http://www.opengis.net/gml&quot; decimal="." cs=","
> ts=""> -73.9447,40.7734,0 -73.9459,40.7739,0 -73.9455,40.7745,0
> -73.945,40.7752,0 -73.94 45,40.7758,0 -73.944,40.7763,0 -73.9435,40.777,0
> -73.9431,40.7776,0 -73.9431,40.7773,0 -73.9425,40.7782,0
> -73.9422,40.7779,0 -73.9442,40.773,0 -73.9447,40.7734,0</coordinates>
> </LinearRing>
> </outerBoundaryIs>
> </Polygon>
> </MultiGeometry>
> </Placemark>
> </Folder>