I expect the code is returning what KML provides; taking that and wrapping it
up into a style that can be used may as you indicate take some work?
KML is not really a feature format; I usually think of it as an image format
(in that it defines shapes along with the colors used to render them).
I think I was doing this I would try and render it more like a CAD format;
store some of the style information as a fake attribute on each feature; and
then have a single SLD Style that would map the fake attribute to the
appropriate setting (line width, color whatever).
However the idea of creating a Rule for each FeatureType is pretty common; you
are just up against two different rendering models.
Jody
--
Jody Garnett
On Thursday, 16 June 2011 at 4:36 AM, Eric Axley wrote:
> I have seen those examples though I wasn't able to find them easily.
>
> My problem was that when I tried to render the feature collection, nothing
> would be drawn on the map unless I re-created the style. The parser would
> actually create the FeatureTypeStyle, but there was (apparently) no rule
> telling the renderer to use it for the Line. If you look at the latter part
> of my for loop, you can see where I would pull out the stroke and add it to a
> new style with a filter indicating to use the style for that feature id. It
> seems that I would have to add this code for each style type that I need to
> be able to support, which just seems wrong.
>
> -Eric
>
> On Tue, Jun 14, 2011 at 3:23 AM, Jody Garnett <[email protected]
> (mailto:[email protected])> wrote:
> > You may of found it already but there were some KML examples in the
> > documentation.
> >
> > - http://docs.geotools.org/latest/userguide/library/xml/geometry.html#kml
> > - http://docs.geotools.org/latest/userguide/extension/xsd/kml.html
> >
> > My understanding is that KML records both feature and style information in
> > one go; the streaming parser example shows how to grab style information.
> >
> > (not sure if they are any good - perhaps you can tell me?)
> >
> > Jody
> >
>
> ------------------------------------------------------------------------------
> EditLive Enterprise is the world's most technically advanced content
> authoring tool. Experience the power of Track Changes, Inline Image
> Editing and ensure content is compliant with Accessibility Checking.
> http://p.sf.net/sfu/ephox-dev2dev
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users