GuiCheBZH ha scritto:
> Hi,
> I need help with a weird behaviour of my application.
> My problem is when I use a kml file with lines and polygons.
> 
> When I create the geometry from the file with that, the display is perfect: 
> SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
> typeBuilder.setName("Geometry");
> typeBuilder.add("the_geom", geom);
> 
> But when I use that:
> SimpleFeatureTypeBuilder typeBuilder = new SimpleFeatureTypeBuilder();
> typeBuilder.setName("Geometry");
> typeBuilder.add("the_geom", geom);
> typeBuilder.add("name", String.class);
> 
> All the lines become sort of polygons with the extremities joined.
> Perhaps I have missed something but I don't understand why adding a name can
> break the geometry.

I don't know. Mind one thing though, the SLD specification clearly 
states that if you apply a polygon symbolizer to a line, it will be
closed and filled. Which is what you're seeing.

Are you sure you're not applying a polygon symbolizer to line data?

If your data is mixed you can use geometry functions in your filters
to selectively apply the right symbolizer to the right geometry:
http://docs.geoserver.org/2.0.x/en/user/styling/sld-tipstricks/mixed-geometries.html

Cheers
Andrea

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to