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


Java GeometryEnvelope.isHasM方法代码示例

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


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

示例1: validateGeometryIndex

import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
 * Validate a Geometry Index result
 *
 * @param featureTableIndex
 * @param geometryIndex
 */
private static void validateGeometryIndex(
        FeatureTableIndex featureTableIndex, GeometryIndex geometryIndex) {
    FeatureRow featureRow = featureTableIndex.getFeatureRow(geometryIndex);
    TestCase.assertNotNull(featureRow);
    TestCase.assertEquals(featureTableIndex.getTableName(),
            geometryIndex.getTableName());
    TestCase.assertEquals(geometryIndex.getGeomId(), featureRow.getId());
    GeoPackageGeometryData geometryData = featureRow.getGeometry();
    GeometryEnvelope envelope = geometryData.getEnvelope();
    if (envelope == null) {
        Geometry geometry = geometryData.getGeometry();
        if (geometry != null) {
            envelope = GeometryEnvelopeBuilder.buildEnvelope(geometry);
        }
    }

    TestCase.assertNotNull(envelope);

    TestCase.assertEquals(envelope.getMinX(), geometryIndex.getMinX());
    TestCase.assertEquals(envelope.getMaxX(), geometryIndex.getMaxX());
    TestCase.assertEquals(envelope.getMinY(), geometryIndex.getMinY());
    TestCase.assertEquals(envelope.getMaxY(), geometryIndex.getMaxY());
    if (envelope.isHasZ()) {
        TestCase.assertEquals(envelope.getMinZ(), geometryIndex.getMinZ());
        TestCase.assertEquals(envelope.getMaxZ(), geometryIndex.getMaxZ());
    } else {
        TestCase.assertNull(geometryIndex.getMinZ());
        TestCase.assertNull(geometryIndex.getMaxZ());
    }
    if (envelope.isHasM()) {
        TestCase.assertEquals(envelope.getMinM(), geometryIndex.getMinM());
        TestCase.assertEquals(envelope.getMaxM(), geometryIndex.getMaxM());
    } else {
        TestCase.assertNull(geometryIndex.getMinM());
        TestCase.assertNull(geometryIndex.getMaxM());
    }
}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:44,代码来源:FeatureTableIndexUtils.java

示例2: validateGeometryIndex

import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
 * Validate a Geometry Index result
 * 
 * @param featureTableIndex
 * @param geometryIndex
 */
private static void validateGeometryIndex(
		FeatureTableIndex featureTableIndex, GeometryIndex geometryIndex) {
	FeatureRow featureRow = featureTableIndex.getFeatureRow(geometryIndex);
	TestCase.assertNotNull(featureRow);
	TestCase.assertEquals(featureTableIndex.getTableName(),
			geometryIndex.getTableName());
	TestCase.assertEquals(geometryIndex.getGeomId(), featureRow.getId());
	GeoPackageGeometryData geometryData = featureRow.getGeometry();
	GeometryEnvelope envelope = geometryData.getEnvelope();
	if (envelope == null) {
		Geometry geometry = geometryData.getGeometry();
		if (geometry != null) {
			envelope = GeometryEnvelopeBuilder.buildEnvelope(geometry);
		}
	}

	TestCase.assertNotNull(envelope);

	TestCase.assertEquals(envelope.getMinX(), geometryIndex.getMinX());
	TestCase.assertEquals(envelope.getMaxX(), geometryIndex.getMaxX());
	TestCase.assertEquals(envelope.getMinY(), geometryIndex.getMinY());
	TestCase.assertEquals(envelope.getMaxY(), geometryIndex.getMaxY());
	if (envelope.isHasZ()) {
		TestCase.assertEquals(envelope.getMinZ(), geometryIndex.getMinZ());
		TestCase.assertEquals(envelope.getMaxZ(), geometryIndex.getMaxZ());
	} else {
		TestCase.assertNull(geometryIndex.getMinZ());
		TestCase.assertNull(geometryIndex.getMaxZ());
	}
	if (envelope.isHasM()) {
		TestCase.assertEquals(envelope.getMinM(), geometryIndex.getMinM());
		TestCase.assertEquals(envelope.getMaxM(), geometryIndex.getMaxM());
	} else {
		TestCase.assertNull(geometryIndex.getMinM());
		TestCase.assertNull(geometryIndex.getMaxM());
	}
}
 
开发者ID:ngageoint,项目名称:geopackage-java,代码行数:44,代码来源:FeatureTableIndexUtils.java

示例3: validateFeatureRow

import mil.nga.wkb.geom.GeometryEnvelope; //导入方法依赖的package包/类
/**
 * Validate a Feature Row result
 *
 * @param featureIndexManager
 * @param featureRow
 * @param queryEnvelope
 */
private static void validateFeatureRow(
        FeatureIndexManager featureIndexManager, FeatureRow featureRow, GeometryEnvelope queryEnvelope) {
    TestCase.assertNotNull(featureRow);
    GeoPackageGeometryData geometryData = featureRow.getGeometry();
    GeometryEnvelope envelope = geometryData.getEnvelope();
    if (envelope == null) {
        Geometry geometry = geometryData.getGeometry();
        if (geometry != null) {
            envelope = GeometryEnvelopeBuilder.buildEnvelope(geometry);
        }
    }

    TestCase.assertNotNull(envelope);

    if (queryEnvelope != null) {
        TestCase.assertTrue(envelope.getMinX() <= queryEnvelope.getMaxX());
        TestCase.assertTrue(envelope.getMaxX() >= queryEnvelope.getMinX());
        TestCase.assertTrue(envelope.getMinY() <= queryEnvelope.getMaxY());
        TestCase.assertTrue(envelope.getMaxY() >= queryEnvelope.getMinY());
        if (envelope.isHasZ()) {
            if (queryEnvelope.hasZ()) {
                TestCase.assertTrue(envelope.getMinZ() <= queryEnvelope.getMaxZ());
                TestCase.assertTrue(envelope.getMaxZ() >= queryEnvelope.getMinZ());
            }
        } else {
            TestCase.assertFalse(queryEnvelope.hasZ());
            TestCase.assertNull(queryEnvelope.getMinZ());
            TestCase.assertNull(queryEnvelope.getMaxZ());
        }
        if (envelope.isHasM()) {
            if (queryEnvelope.hasM()) {
                TestCase.assertTrue(envelope.getMinM() <= queryEnvelope.getMaxM());
                TestCase.assertTrue(envelope.getMaxM() >= queryEnvelope.getMinM());
            }
        } else {
            TestCase.assertFalse(queryEnvelope.hasM());
            TestCase.assertNull(queryEnvelope.getMinM());
            TestCase.assertNull(queryEnvelope.getMaxM());
        }
    }
}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:49,代码来源:FeatureIndexManagerUtils.java


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