[Geoserver-users] KML/Google Earth : Rotating a Point Symbolizer using SLD

Gary,

  I don't know if you need the points to be vector points in the KML
(where you can click on the feature and get attribute field info
returned), but if you just need to show the features as-symbolized
within Google Earth, you could force the KLM to write out a raster,
which should give you your rotated point symbols.

  Just tack on " &superoverlay_mode=raster " to the end of the KML
reflector request.

  I had this issue when trying to show curving street name labels
aligned with the streets being labeled, where everything rendered fine
in OpenLayers, but the labels defaulted to straight horizontal text in
Google Earth (or else not drawing at all). The above fixed it for me,
as I was only drawing the labels in my SLD, and no other info needed
to be returned.

An example from our Geoserver instance:

http://lat.lib.virginia.edu:8080/geoserver/wms/kml_reflect?layers=Charlottesville:Centerline&styles=label_streetnames_50K_by_NAME&superoverlay_mode=raster

- Dave Richardson
Dept. of Envi. Sci. & The Scholars' Lab, Uva Library
University of Virginia

From: Gary Winfield <gary@anonymised.com>
Subject: [Geoserver-users] KML/Google Earth : Rotating a Point
       Symbolizer using SLD

Is it possible to get a Point Symbolizer icon to rotate in Google Earth?

I have managed to use SLD and a dynamic parameter out of my PostGIS DB to
rotate a Point Symbolizer when viewing it in Openlayers. However, when
viewing the same points in Google Earth the rotation is not visible, in fact
it usually just defaults to the same circle icon all the time. ?
Does anyone have any pointers on how to make this work in Google Earth?

Thanks Dave,

Your suggestion did what you described it would, and I was able to get a rendering of my point in it’s rotated form.

However, as you suggested, I do need to have my points to be “vectors” as you describe below. I want my users to be able to click on the point and show the attributes I’ve specified in a tld description file.
I can make it do everything I want EXCEPT the rotation of the point/icon.

N.B. I’m doing this to track vessels offshore, and as you might imagine, the orientation/heading of the vessel is quite relevant. I think it’s possible to create a rotated point in KML, but it seems that Geoserver doesn’t support this?

Anyone else got any suggestions?

Thanks,

Gary

On Mon, Mar 1, 2010 at 9:25 AM, David Richardson <dlr2n@anonymised.com> wrote:

Gary,

I don’t know if you need the points to be vector points in the KML
(where you can click on the feature and get attribute field info
returned), but if you just need to show the features as-symbolized
within Google Earth, you could force the KLM to write out a raster,
which should give you your rotated point symbols.

Just tack on " &superoverlay_mode=raster " to the end of the KML
reflector request.

I had this issue when trying to show curving street name labels
aligned with the streets being labeled, where everything rendered fine
in OpenLayers, but the labels defaulted to straight horizontal text in
Google Earth (or else not drawing at all). The above fixed it for me,
as I was only drawing the labels in my SLD, and no other info needed
to be returned.

An example from our Geoserver instance:

http://lat.lib.virginia.edu:8080/geoserver/wms/kml_reflect?layers=Charlottesville:Centerline&styles=label_streetnames_50K_by_NAME&superoverlay_mode=raster

  • Dave Richardson
    Dept. of Envi. Sci. & The Scholars’ Lab, Uva Library
    University of Virginia

From: Gary Winfield <gary@anonymised.com7…>
Subject: [Geoserver-users] KML/Google Earth : Rotating a Point
Symbolizer using SLD

Is it possible to get a Point Symbolizer icon to rotate in Google Earth?

I have managed to use SLD and a dynamic parameter out of my PostGIS DB to
rotate a Point Symbolizer when viewing it in Openlayers. However, when
viewing the same points in Google Earth the rotation is not visible, in fact
it usually just defaults to the same circle icon all the time. ?
Does anyone have any pointers on how to make this work in Google Earth?


Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev


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

On Mar 1, 2010, at 11:24 AM, Gary Winfield wrote:

N.B. I'm doing this to track vessels offshore, and as you might imagine, the orientation/heading of the vessel is quite relevant. I think it's possible to create a rotated point in KML, but it seems that Geoserver doesn't support this?

Coincidentally, I recently tried to use GeoServer to output KML for this exact same use case. I didn't look too deeply into it, but on a cursory examination, GeoServer does not support setting a value for the KML heading element.

In accordance with the FreeMarker template approach (i.e., description.ftl, height.ftl, time.ftl), I suspect that the path of least resistance would be to modify GeoServer to support a separate template file for the IconStyle heading element. Or, perhaps modify it to pass along the Rotation value from the PointSymbolizer -- however, in general, icon rotation doesn't really mean the same thing as heading.

Cheers,
Ryan