Francisco Moura ha scritto: > Hi, > > I´m having problems to render MultiPolygon features when threre are 2 or > more Polygons inside a Multipolygon and using a simple PolygonSymbolizer. > > I´ve tracked all the execution path and everythings looks ok to me, but > a detail called my attention. > > When i have a GeometryCollection as the geometry of a feature, the > StreamingRenderer internally creates a LiteShape2 to use in the java 2d > graphics "fill" method. I noticed that the PathIterator returned by the > LiteShape2, as anyone would expect, iterates over all the > GeometryCollection coordinates, actually concatenating all the > geometries. (all the polygons in my example) > > I think that java 2D graphics don´t know how to fill a geometry like > that ( a lot of concateneted polygons ). Another fact that helps me > think that is that in my example feature source, all the geometries are > MultiPolygons, but there are some that has only one Polygon inside, and > all of these renders with no problems. > > Has anyone experienced something like this?
Nope. GeoServer is using the same code and we're definitely rendering multi-polygons (every state/country is a multipolygon) and we see no ill effects. See this: http://geo.openplans.org:8080/geoserver/wms?bbox=-127.61950064999999,23.7351786,-64.08177035,50.592523400000005&styles=&Format=application/openlayers&request=GetMap&version=1.1.1&layers=topp:states&width=800&height=317&srs=EPSG:4326 If you zoom towards Florida you'll distinctly see it's made of multipolygons, yet the rendering looks fine. Maybe there is something special about your data? Cheers Andrea -- Andrea Aime OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
