当前位置: 首页>>代码示例>>Java>>正文


Java MultiPolygon.addPolygon方法代码示例

本文整理汇总了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;
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:23,代码来源:GoogleMapShapeConverter.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:20,代码来源:GoogleMapShapeConverter.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:22,代码来源:GoogleMapShapeConverter.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-core-java,代码行数:19,代码来源:GeometryProjectionTransform.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:24,代码来源:WkbGeometryReader.java

示例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;
	}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:13,代码来源:GeometryUtilsTest.java

示例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;
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:20,代码来源:WKBTestUtils.java


注:本文中的mil.nga.wkb.geom.MultiPolygon.addPolygon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。