Hi Martin,

Simplest is best in this case I think...

        while (featureIterator.hasNext()) {
            SimpleFeature feature = featureIterator.next();
            MultiPolygon mp = (MultiPolygon) feature.getDefaultGeometry();
            int n = mp.getNumGeometries();
            for (int i = 0; i < n; i++) {
                Polygon poly = (Polygon) mp.getGeometryN(i);
                // feed poly into graph
            }
        }

Michael


On 24 November 2011 10:42, Martin Tomko <[email protected]> wrote:
> I was wondering what is currently the best way to achieve this?
> I saw  GeometryTypeConverter in the source code, but cannot find an example.
> We need to feed Polygons to the PolygonGraphBuilder and it chokes on
> Multipolygons :(
> Thanks,
> Martin
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
>

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to