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


Java CompoundCurve类代码示例

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


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

示例1: convertCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Test the CompoundCurve conversion
 * 
 * @param converter
 * @param compoundCurve
 */
private static void convertCompoundCurve(GoogleMapShapeConverter converter,
		CompoundCurve compoundCurve) {

	MultiPolylineOptions polylines = converter.toPolylines(compoundCurve);
	TestCase.assertNotNull(polylines);
	TestCase.assertFalse(polylines.getPolylineOptions().isEmpty());

	List<LineString> lineStrings = compoundCurve.getLineStrings();
	compareLineStringsAndPolylines(converter, lineStrings,
			polylines.getPolylineOptions());

	CompoundCurve compoundCurve2 = converter
			.toCompoundCurveWithOptions(polylines);
	compareLineStrings(lineStrings, compoundCurve2.getLineStrings());
}
 
开发者ID:ngageoint,项目名称:geopackage-android-map,代码行数:22,代码来源:GoogleMapShapeConverterUtils.java

示例2: toCompoundCurveFromList

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Convert a list of List<LatLng> to a {@link CompoundCurve}
 *
 * @param polylineList
 * @param hasZ
 * @param hasM
 * @return
 */
public CompoundCurve toCompoundCurveFromList(
        List<List<LatLng>> polylineList, boolean hasZ, boolean hasM) {

    CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM);

    for (List<LatLng> polyline : polylineList) {
        LineString lineString = toLineString(polyline);
        compoundCurve.addLineString(lineString);
    }

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

示例3: toCompoundCurveFromOptions

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Convert a {@link MultiPolylineOptions} to a {@link CompoundCurve}
 *
 * @param multiPolylineOptions
 * @param hasZ
 * @param hasM
 * @return
 */
public CompoundCurve toCompoundCurveFromOptions(
        MultiPolylineOptions multiPolylineOptions, boolean hasZ,
        boolean hasM) {

    CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM);

    for (PolylineOptions polyline : multiPolylineOptions
            .getPolylineOptions()) {
        LineString lineString = toLineString(polyline);
        compoundCurve.addLineString(lineString);
    }

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

示例4: toPolylines

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Convert a {@link CompoundCurve} to a {@link MultiPolylineOptions}
 *
 * @param compoundCurve
 * @return
 */
public MultiPolylineOptions toPolylines(CompoundCurve compoundCurve) {

    MultiPolylineOptions polylines = new MultiPolylineOptions();

    for (LineString lineString : compoundCurve.getLineStrings()) {
        PolylineOptions polyline = toPolyline(lineString);
        polylines.add(polyline);
    }

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

示例5: toCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Convert a list of {@link Polyline} to a {@link CompoundCurve}
 *
 * @param polylineList
 * @param hasZ
 * @param hasM
 * @return
 */
public CompoundCurve toCompoundCurve(List<Polyline> polylineList,
                                     boolean hasZ, boolean hasM) {

    CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM);

    for (Polyline polyline : polylineList) {
        LineString lineString = toLineString(polyline);
        compoundCurve.addLineString(lineString);
    }

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

示例6: toCompoundCurveWithOptions

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Convert a {@link MultiPolylineOptions} to a {@link CompoundCurve}
 *
 * @param multiPolylineOptions
 * @param hasZ
 * @param hasM
 * @return
 */
public CompoundCurve toCompoundCurveWithOptions(
        MultiPolylineOptions multiPolylineOptions, boolean hasZ,
        boolean hasM) {

    CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM);

    for (PolylineOptions polyline : multiPolylineOptions
            .getPolylineOptions()) {
        LineString lineString = toLineString(polyline);
        compoundCurve.addLineString(lineString);
    }

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

示例7: compareCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Compare the two compound curves for equality
 *
 * @param expected
 * @param actual
 * @parma delta
 */
private static void compareCompoundCurve(CompoundCurve expected,
										 CompoundCurve actual, double delta) {

	compareBaseGeometryAttributes(expected, actual);
	TestCase.assertEquals(expected.numLineStrings(),
			actual.numLineStrings());
	for (int i = 0; i < expected.numLineStrings(); i++) {
		compareLineString(expected.getLineStrings().get(i), actual
				.getLineStrings().get(i), delta);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:19,代码来源:GeoPackageGeometryDataUtils.java

示例8: transform

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Transform the projected compound curve
 * 
 * @param compoundCurve
 * @return projected compound curve
 */
public CompoundCurve transform(CompoundCurve compoundCurve) {

	CompoundCurve to = new CompoundCurve(compoundCurve.hasZ(),
			compoundCurve.hasM());

	for (LineString lineString : compoundCurve.getLineStrings()) {
		LineString toLineString = transform(lineString);
		to.addLineString(toLineString);
	}

	return to;
}
 
开发者ID:ngageoint,项目名称:geopackage-core-java,代码行数:19,代码来源:GeometryProjectionTransform.java

示例9: compareCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Compare the two compound curves for equality
 * 
 * @param expected
 * @param actual
 * @parma delta
 */
private static void compareCompoundCurve(CompoundCurve expected,
		CompoundCurve actual, double delta) {

	compareBaseGeometryAttributes(expected, actual);
	TestCase.assertEquals(expected.numLineStrings(),
			actual.numLineStrings());
	for (int i = 0; i < expected.numLineStrings(); i++) {
		compareLineString(expected.getLineStrings().get(i), actual
				.getLineStrings().get(i), delta);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-java,代码行数:19,代码来源:GeoPackageGeometryDataUtils.java

示例10: addCompoundCurveMessage

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Add CompoundCurve
 * 
 * @param envelope
 * @param compoundCurve
 */
private static void addCompoundCurveMessage(GeometryEnvelope envelope,
		CompoundCurve compoundCurve) {

	updateHasZandM(envelope, compoundCurve);

	List<LineString> lineStrings = compoundCurve.getLineStrings();
	for (LineString lineString : lineStrings) {
		addLineStringMessage(envelope, lineString);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:17,代码来源:GeometryEnvelopeBuilder.java

示例11: add

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Add a curve based dimension 1 geometry to the centroid total. Ignores
 * dimension 0 geometries.
 * 
 * @param geometry
 *            geometry
 */
public void add(Geometry geometry) {

	GeometryType geometryType = geometry.getGeometryType();
	switch (geometryType) {
	case LINESTRING:
	case CIRCULARSTRING:
		add((LineString) geometry);
		break;
	case MULTILINESTRING:
		MultiLineString multiLineString = (MultiLineString) geometry;
		addLineStrings(multiLineString.getLineStrings());
		break;
	case COMPOUNDCURVE:
		CompoundCurve compoundCurve = (CompoundCurve) geometry;
		addLineStrings(compoundCurve.getLineStrings());
		break;
	case GEOMETRYCOLLECTION:
		@SuppressWarnings("unchecked")
		GeometryCollection<Geometry> geomCollection = (GeometryCollection<Geometry>) geometry;
		List<Geometry> geometries = geomCollection.getGeometries();
		for (Geometry subGeometry : geometries) {
			add(subGeometry);
		}
		break;
	case POINT:
	case MULTIPOINT:
		// Doesn't contribute to curve dimension
		break;
	default:
		throw new WkbException("Unsupported "
				+ this.getClass().getSimpleName() + " Geometry Type: "
				+ geometryType);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:42,代码来源:CentroidCurve.java

示例12: addCompoundCurveMessage

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Add CompoundCurve message
 * 
 * @param message
 * @param compoundCurve
 */
private static void addCompoundCurveMessage(StringBuilder message,
		CompoundCurve compoundCurve) {
	message.append(LineString.class.getSimpleName() + "s: "
			+ compoundCurve.numLineStrings());
	List<LineString> lineStrings = compoundCurve.getLineStrings();
	for (int i = 0; i < lineStrings.size(); i++) {
		LineString lineString = lineStrings.get(i);
		message.append("\n\n");
		message.append(LineString.class.getSimpleName() + " " + (i + 1));
		message.append("\n");
		addLineStringMessage(message, lineString);
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:20,代码来源:GeometryPrinter.java

示例13: getCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Get CompoundCurve object
 * 
 * @param compoundCurve
 * @return compound curve object
 */
private static Object getCompoundCurve(CompoundCurve compoundCurve) {
	List<Object> jsonObject = new ArrayList<>();
	List<LineString> lineStrings = compoundCurve.getLineStrings();
	for (int i = 0; i < lineStrings.size(); i++) {
		LineString lineString = lineStrings.get(i);
		jsonObject.add(getLineString(lineString));
	}
	return jsonObject;
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:16,代码来源:GeometryJSONCompatible.java

示例14: writeCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Write a Compound Curve
 * 
 * @param writer
 * @param compoundCurve
 * @throws IOException
 */
public static void writeCompoundCurve(ByteWriter writer,
		CompoundCurve compoundCurve) throws IOException {

	writer.writeInt(compoundCurve.numLineStrings());

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

示例15: compareCompoundCurve

import mil.nga.wkb.geom.CompoundCurve; //导入依赖的package包/类
/**
 * Compare the two compound curves for equality
 * 
 * @param expected
 * @param actual
 */
public static void compareCompoundCurve(CompoundCurve expected,
		CompoundCurve actual) {

	compareBaseGeometryAttributes(expected, actual);
	TestCase.assertEquals(expected.numLineStrings(),
			actual.numLineStrings());
	for (int i = 0; i < expected.numLineStrings(); i++) {
		compareLineString(expected.getLineStrings().get(i), actual
				.getLineStrings().get(i));
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-wkb-java,代码行数:18,代码来源:WKBTestUtils.java


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