MULTIPOLYGON(((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2)),((6 3,9 2,9 4,6 3)))类似这样的面数据有Java API转为地理对象吗?
下面是.NET的
GeoRegion geoRegion = new GeoRegion();
Point2DCollection p2Collection = null;
if (pGeometry != null){
ESRI.ArcGIS.Client.Geometry.Polygon gon = pGeometry as ESRI.ArcGIS.Client.Geometry.Polygon;
foreach (ESRI.ArcGIS.Client.Geometry.PointCollection pCollection in gon.Rings){
p2Collection = new Point2DCollection();
foreach (MapPoint mp in pCollection){
p2Collection.Add(new Point2D(mp.X, mp.Y));
}
geoRegion.Parts.Add(p2Collection);
}
}