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


Java MultiPolygon.getPolygons方法代码示例

本文整理汇总了Java中mil.nga.wkb.geom.MultiPolygon.getPolygons方法的典型用法代码示例。如果您正苦于以下问题:Java MultiPolygon.getPolygons方法的具体用法?Java MultiPolygon.getPolygons怎么用?Java MultiPolygon.getPolygons使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mil.nga.wkb.geom.MultiPolygon的用法示例。


在下文中一共展示了MultiPolygon.getPolygons方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toPolygons

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Convert a {@link MultiPolygon} to a {@link MultiPolygonOptions}
 *
 * @param multiPolygon
 * @return
 */
public MultiPolygonOptions toPolygons(MultiPolygon multiPolygon) {

    MultiPolygonOptions polygons = new MultiPolygonOptions();

    for (Polygon polygon : multiPolygon.getPolygons()) {
        PolygonOptions polygonOptions = toPolygon(polygon);
        polygons.add(polygonOptions);
    }

    return polygons;
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:18,代码来源:GoogleMapShapeConverter.java

示例2: convertMultiPolygon

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Test the MultiPolygon conversion
 * 
 * @param converter
 * @param multiPolygon
 */
private static void convertMultiPolygon(GoogleMapShapeConverter converter,
		MultiPolygon multiPolygon) {

	MultiPolygonOptions mapPolygons = converter.toPolygons(multiPolygon);
	TestCase.assertNotNull(mapPolygons);
	TestCase.assertFalse(mapPolygons.getPolygonOptions().isEmpty());

	List<Polygon> polygons = multiPolygon.getPolygons();
	comparePolygonsAndMapPolygons(converter, polygons, mapPolygons.getPolygonOptions());

	MultiPolygon multiPolygon2 = converter
			.toMultiPolygonFromOptions(mapPolygons);
	comparePolygons(polygons, multiPolygon2.getPolygons());
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:21,代码来源:GoogleMapShapeConverterUtils.java

示例3: validateMultiPolygon

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Validate Multi Polygon
 * 
 * @param topGeometry
 * @param multiPolygon
 */
private static void validateMultiPolygon(Geometry topGeometry,
		MultiPolygon multiPolygon) {

	TestCase.assertEquals(GeometryType.MULTIPOLYGON,
			multiPolygon.getGeometryType());

	validateZAndM(topGeometry, multiPolygon);

	for (Polygon polygon : multiPolygon.getPolygons()) {
		validatePolygon(topGeometry, polygon);
	}

}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:20,代码来源:FeatureUtils.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: addMultiPolygonMessage

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Add MultiPolygon
 * 
 * @param envelope
 * @param multiPolygon
 */
private static void addMultiPolygonMessage(GeometryEnvelope envelope,
		MultiPolygon multiPolygon) {

	updateHasZandM(envelope, multiPolygon);

	List<Polygon> polygons = multiPolygon.getPolygons();
	for (Polygon polygon : polygons) {
		addPolygonMessage(envelope, polygon);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:17,代码来源:GeometryEnvelopeBuilder.java

示例6: addMultiPolygonMessage

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Add MultiPolygon message
 * 
 * @param message
 * @param multiPolygon
 */
private static void addMultiPolygonMessage(StringBuilder message,
		MultiPolygon multiPolygon) {
	message.append(Polygon.class.getSimpleName() + "s: "
			+ multiPolygon.numPolygons());
	List<Polygon> polygons = multiPolygon.getPolygons();
	for (int i = 0; i < polygons.size(); i++) {
		Polygon polygon = polygons.get(i);
		message.append("\n\n");
		message.append(Polygon.class.getSimpleName() + " " + (i + 1));
		message.append("\n");
		addPolygonMessage(message, polygon);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:20,代码来源:GeometryPrinter.java

示例7: getMultiPolygon

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Get MultiPolygon object
 * 
 * @param multiPolygon
 * @return multi polygon object
 */
private static Object getMultiPolygon(MultiPolygon multiPolygon) {
	List<Object> jsonObject = new ArrayList<>();
	List<Polygon> polygons = multiPolygon.getPolygons();
	for (int i = 0; i < polygons.size(); i++) {
		Polygon polygon = polygons.get(i);
		jsonObject.add(getPolygon(polygon));
	}
	return jsonObject;
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:16,代码来源:GeometryJSONCompatible.java

示例8: writeMultiPolygon

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Write a Multi Polygon
 * 
 * @param writer
 * @param multiPolygon
 * @throws IOException
 */
public static void writeMultiPolygon(ByteWriter writer,
		MultiPolygon multiPolygon) throws IOException {

	writer.writeInt(multiPolygon.numPolygons());

	for (Polygon polygon : multiPolygon.getPolygons()) {
		writeGeometry(writer, polygon);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:17,代码来源:WkbGeometryWriter.java

示例9: minimize

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Minimize the multi polygon
 * 
 * @param multiPolygon
 *            multi polygon
 * @param maxX
 *            max positive x value in the geometry projection
 */
private static void minimize(MultiPolygon multiPolygon, double maxX) {

	List<Polygon> polygons = multiPolygon.getPolygons();
	for (Polygon polygon : polygons) {
		minimize(polygon, maxX);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:16,代码来源:GeometryUtils.java

示例10: normalize

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Normalize the multi polygon
 * 
 * @param multiPolygon
 *            multi polygon
 * @param maxX
 *            max positive x value in the geometry projection
 */
private static void normalize(MultiPolygon multiPolygon, double maxX) {

	List<Polygon> polygons = multiPolygon.getPolygons();
	for (Polygon polygon : polygons) {
		normalize(polygon, maxX);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:16,代码来源:GeometryUtils.java

示例11: toPolygons

import mil.nga.wkb.geom.MultiPolygon; //导入方法依赖的package包/类
/**
 * Convert a {@link MultiPolygon} to a {@link Polygon}
 *
 * @param multiPolygon
 * @return
 */
public List<org.osmdroid.views.overlay.Polygon> toPolygons(MultiPolygon multiPolygon) {

    List<org.osmdroid.views.overlay.Polygon> polygons = new ArrayList<>();


    for (Polygon polygon : multiPolygon.getPolygons()) {
        org.osmdroid.views.overlay.Polygon polygonOptions = toPolygon(polygon);
        polygons.add(polygonOptions);
    }

    return polygons;
}
 
开发者ID:osmdroid,项目名称:osmdroid,代码行数:19,代码来源:OsmMapShapeConverter.java


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