本文整理汇总了Java中mil.nga.wkb.geom.MultiPolygon.addPolygon方法的典型用法代码示例。如果您正苦于以下问题:Java MultiPolygon.addPolygon方法的具体用法?Java MultiPolygon.addPolygon怎么用?Java MultiPolygon.addPolygon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类mil.nga.wkb.geom.MultiPolygon
的用法示例。
在下文中一共展示了MultiPolygon.addPolygon方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toMultiPolygon
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Convert a list of {@link com.google.android.gms.maps.model.Polygon} to a
* {@link MultiPolygon}
*
* @param polygonList
* @param hasZ
* @param hasM
* @return
*/
public MultiPolygon toMultiPolygon(
List<com.google.android.gms.maps.model.Polygon> polygonList,
boolean hasZ, boolean hasM) {
MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);
for (com.google.android.gms.maps.model.Polygon mapPolygon : polygonList) {
Polygon polygon = toPolygon(mapPolygon);
multiPolygon.addPolygon(polygon);
}
return multiPolygon;
}
示例2: createMultiPolygon
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Convert a list of {@link Polygon} to a {@link MultiPolygon}
*
* @param polygonList
* @param hasZ
* @param hasM
* @return
*/
public MultiPolygon createMultiPolygon(List<Polygon> polygonList,
boolean hasZ, boolean hasM) {
MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);
for (Polygon polygon : polygonList) {
multiPolygon.addPolygon(polygon);
}
return multiPolygon;
}
示例3: toMultiPolygonFromOptions
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Convert a list of {@link PolygonOptions} to a {@link MultiPolygon}
*
* @param multiPolygonOptions
* @param hasZ
* @param hasM
* @return
*/
public MultiPolygon toMultiPolygonFromOptions(
MultiPolygonOptions multiPolygonOptions, boolean hasZ, boolean hasM) {
MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);
for (PolygonOptions mapPolygon : multiPolygonOptions
.getPolygonOptions()) {
Polygon polygon = toPolygon(mapPolygon);
multiPolygon.addPolygon(polygon);
}
return multiPolygon;
}
示例4: transform
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Transform the projected multi polygon
*
* @param multiPolygon
* @return projected multi polygon
*/
public MultiPolygon transform(MultiPolygon multiPolygon) {
MultiPolygon to = new MultiPolygon(multiPolygon.hasZ(),
multiPolygon.hasM());
for (Polygon polygon : multiPolygon.getPolygons()) {
Polygon toPolygon = transform(polygon);
to.addPolygon(toPolygon);
}
return to;
}
示例5: readMultiPolygon
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Read a Multi Polygon
*
* @param reader
* @param hasZ
* @param hasM
* @return multi polygon
*/
public static MultiPolygon readMultiPolygon(ByteReader reader,
boolean hasZ, boolean hasM) {
MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);
int numPolygons = reader.readInt();
for (int i = 0; i < numPolygons; i++) {
Polygon polygon = readGeometry(reader, Polygon.class);
multiPolygon.addPolygon(polygon);
}
return multiPolygon;
}
示例6: createMultiPolygon
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
private static MultiPolygon createMultiPolygon() {
MultiPolygon multiPolygon = new MultiPolygon();
int num = 1 + ((int) (Math.random() * 5));
for (int i = 0; i < num; i++) {
multiPolygon.addPolygon(createPolygon());
}
return multiPolygon;
}
示例7: createMultiPolygon
import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
* Create a random multi polygon
*
* @param hasZ
* @param hasM
* @return
*/
public static MultiPolygon createMultiPolygon(boolean hasZ, boolean hasM) {
MultiPolygon multiPolygon = new MultiPolygon(hasZ, hasM);
int num = 1 + ((int) (Math.random() * 5));
for (int i = 0; i < num; i++) {
multiPolygon.addPolygon(createPolygon(hasZ, hasM));
}
return multiPolygon;
}