[Geoserver-devel] KML linestring and polygons

Hi,

I'm investigating Geoserver's KML capabilities.
For Google Earth and KML, it seems that I have to use KML MultiGeometry with a
Point and Polygon/LineString, to point a icon and name-label at a
polygon/linestring in
the GE 3D viewer.

I want to implement this dynamic in Geoserver so the icon is always visible
and readable when zooming in/out, panning, etc. Google Earth doesn't seems to
handle this.

I hope someone can give me a hint about the classes in the API and some
sample code (for example how this is done for PNG).
Any hints are appreciated.

Thanks

cheers
Jorn

KML sample:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Placemark>
  <name>Linestring with icon and name</name>
  <LookAt>
    <longitude>-77.15580139178142</longitude>
    <latitude>38.970832443487</latitude>
    <range>742.0552506670548</range>
    <tilt>48.09646074797388</tilt>
    <heading>59.88865561738225</heading>
  </LookAt>
  <MultiGeometry>
  <LineString>
        <coordinates>-77.15788457660967,38.97253259892824,0
  -78,39,0
    </coordinates>
  </LineString>
  <Point>
      <coordinates>-77.15788457660967,38.97253259892824,100</coordinates>
    </Point>
  </MultiGeometry>
</Placemark>
</kml>

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

This would be a great contribution, just create patches for the improvements you make. I think the class to look at for inspiration is: http://svn.geotools.org/geotools/branches/2.1.x/module/main/src/org/geotools/renderer/lite/LiteRenderer.java

This is what does the rendering for png, jpeg, and gif, turns the styles in to the output elements. I believe the KML output was inspired by it. James may be able to tell you a bit more, as he was the one who started it.

best regards,

Chris

Jørn Vegard Røsnes wrote:

Hi,

I'm investigating Geoserver's KML capabilities.
For Google Earth and KML, it seems that I have to use KML MultiGeometry with a Point and Polygon/LineString, to point a icon and name-label at a polygon/linestring in
the GE 3D viewer.

I want to implement this dynamic in Geoserver so the icon is always visible and readable when zooming in/out, panning, etc. Google Earth doesn't seems to handle this.

I hope someone can give me a hint about the classes in the API and some
sample code (for example how this is done for PNG).
Any hints are appreciated.

Thanks

cheers
Jorn

KML sample:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Placemark>
  <name>Linestring with icon and name</name>
  <LookAt>
    <longitude>-77.15580139178142</longitude>
    <latitude>38.970832443487</latitude>
    <range>742.0552506670548</range>
    <tilt>48.09646074797388</tilt>
    <heading>59.88865561738225</heading>
  </LookAt>
  <MultiGeometry>
  <LineString>
        <coordinates>-77.15788457660967,38.97253259892824,0
  -78,39,0
    </coordinates>
  </LineString>
  <Point>
      <coordinates>-77.15788457660967,38.97253259892824,100</coordinates>
    </Point>
  </MultiGeometry>
</Placemark>
</kml>

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

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