David here is the thing we use slightly different words so I am not exactly 
sure what you mean. 

So *yes* it can be done easily (now what is it?).

Well a multi-polygon offers a collection of the individual polygons, so use a 
for loop to convert them if you like?

for( int i=0; i< multipolygon.getNumGeometries(); i++ ){
     Polygon polygon = (Polygon) multipolygon.getGeometryN( i );
}

For more info: 
http://tsusiatsoftware.net/jts/javadoc/com/vividsolutions/jts/geom/MultiPolygon.html
 

-- 
Jody Garnett


On Monday, 3 December 2012 at 10:16 PM, David Shi wrote:

> Dear Jody,
> 
> I just wonder whether a single multi-polygon can be converted to individual 
> polygons.
> 
> Can this be done easily?
> 
> It is very easy in ESRI ArcGIS.
> 
> Regards.
> 
> David
> 
> 
> From: Jody Garnett <[email protected] (mailto:[email protected])>
> To: David Shi <[email protected] (mailto:[email protected])> 
> Cc: geotools users <[email protected] 
> (mailto:[email protected])> 
> Sent: Monday, 3 December 2012, 11:27
> Subject: Re: [Geotools-devel] Feature to polygon
> 
> Hey David, we should keep communication on the geotools user list (if you 
> would like to email questions to me privately, my employer LISAsoft can 
> arrange a support contract). Plus this way you get a wide range of feedback, 
> incase I am no the wrong track myself. 
> > What happens when many polygons are digitised as one polygon.
> 
> That is called a MultiPolygon. You may want to look at the standards side of 
> the street (rather than ESRI) in order to get a hold
> of the functionality (and language) we use. 
> 
> The geometry support follows the "Simple Features for SQL" standard, if you 
> download that document from the OGC you will be able to answer many of your 
> questions.
> 
> Our feature comes from the OGC "General Feature Model", the specific project 
> > ESRI's feature to polygon function can convert features into polygons.
> 
> If you would like to combine individual polygons (or multi-polygons) into a 
> single multi-polygon you can use lookup how to do "union".
> - http://docs.geotools.org/latest/userguide/library/jts/combine.html
> > 
> > Can Geotools do the same?
> If it cannot, you as a developer can do the rest :-)
> 
> Cheers,
> Jody
> 
> 
> 

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
BUILD Helping you discover the best ways to construct your parallel projects.
http://goparallel.sourceforge.net
_______________________________________________
GeoTools-GT2-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to