com.esri.core.geometry.Geometry._getImpl()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(9.4k)|赞(0)|评价(0)|浏览(135)

本文整理了Java中com.esri.core.geometry.Geometry._getImpl()方法的一些代码示例,展示了Geometry._getImpl()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Geometry._getImpl()方法的具体详情如下:
包路径:com.esri.core.geometry.Geometry
类名称:Geometry
方法名:_getImpl

Geometry._getImpl介绍

暂无

代码示例

代码示例来源:origin: apache/drill

public static MultiVertexGeometry getVertexGeometry(Geometry geom){
  return (MultiVertexGeometry) geom._getImpl();
 }
}

代码示例来源:origin: Esri/geometry-api-java

RasterizedGeometry2DImpl(Geometry geom, double toleranceXY,
    int rasterSizeBytes) {
  // //_ASSERT(CanUseAccelerator(geom));
  init((MultiVertexGeometryImpl) geom._getImpl(), toleranceXY,
      rasterSizeBytes);
}

代码示例来源:origin: Esri/geometry-api-java

@Override
public void copyTo(Geometry dst) {
  m_impl.copyTo((Geometry) dst._getImpl());
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

@Override
public void copyTo(Geometry dst) {
  m_impl.copyTo((Geometry) dst._getImpl());
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

RasterizedGeometry2DImpl(Geometry geom, double toleranceXY,
    int rasterSizeBytes) {
  // //_ASSERT(CanUseAccelerator(geom));
  init((MultiVertexGeometryImpl) geom._getImpl(), toleranceXY,
      rasterSizeBytes);
}

代码示例来源:origin: Esri/geometry-api-java

@Override
public boolean accelerateGeometry(Geometry geometry,
    SpatialReference spatialReference,
    GeometryAccelerationDegree accelDegree) {
  if (!canAccelerateGeometry(geometry))
    return false;
  double tol = InternalUtils.calculateToleranceFromGeometry(spatialReference, geometry, false);
  boolean accelerated = ((MultiVertexGeometryImpl) geometry._getImpl())
      ._buildQuadTreeAccelerator(accelDegree);
  accelerated |= ((MultiVertexGeometryImpl) geometry._getImpl())
      ._buildRasterizedGeometryAccelerator(tol, accelDegree);
  return accelerated;
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

@Override
public boolean accelerateGeometry(Geometry geometry,
    SpatialReference spatialReference,
    GeometryAccelerationDegree accelDegree) {
  if (!canAccelerateGeometry(geometry))
    return false;
  double tol = InternalUtils.calculateToleranceFromGeometry(spatialReference, geometry, false);
  boolean accelerated = ((MultiVertexGeometryImpl) geometry._getImpl())
      ._buildQuadTreeAccelerator(accelDegree);
  accelerated |= ((MultiVertexGeometryImpl) geometry._getImpl())
      ._buildRasterizedGeometryAccelerator(tol, accelDegree);
  return accelerated;
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

@Override
public void copyTo(Geometry dst) {
  if (getType() != dst.getType())
    throw new IllegalArgumentException();
  m_impl.copyTo((Geometry) dst._getImpl());
}

代码示例来源:origin: Esri/geometry-api-java

@Override
public void copyTo(Geometry dst) {
  if (getType() != dst.getType())
    throw new IllegalArgumentException();
  m_impl.copyTo((Geometry) dst._getImpl());
}

代码示例来源:origin: Esri/geometry-api-java

private boolean checkStructure_() {
  MultiPathImpl multiPathImpl = (MultiPathImpl) m_geometry._getImpl();
  int minsize = multiPathImpl.m_bPolygon ? 3 : 2;
  for (int ipath = 0, npath = multiPathImpl.getPathCount(); ipath < npath; ipath++) {
    if (multiPathImpl.getPathSize(ipath) < minsize) {
      m_nonSimpleResult = new NonSimpleResult(
          NonSimpleResult.Reason.Structure, ipath, 0);
      return false;
    }
  }
  return true;
}

代码示例来源:origin: Esri/geometry-api-java

private boolean checkCracking_() {
  MultiVertexGeometryImpl multiVertexImpl = (MultiVertexGeometryImpl) m_geometry
      ._getImpl();
  int pointCount = multiVertexImpl.getPointCount();
  if (pointCount < 10)// use brute force for smaller polygons
  {
    return checkCrackingBrute_();
  } else {
    return checkCrackingPlanesweep_();
  }
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

private boolean checkStructure_() {
  MultiPathImpl multiPathImpl = (MultiPathImpl) m_geometry._getImpl();
  int minsize = multiPathImpl.m_bPolygon ? 3 : 2;
  for (int ipath = 0, npath = multiPathImpl.getPathCount(); ipath < npath; ipath++) {
    if (multiPathImpl.getPathSize(ipath) < minsize) {
      m_nonSimpleResult = new NonSimpleResult(
          NonSimpleResult.Reason.Structure, ipath, 0);
      return false;
    }
  }
  return true;
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

private boolean checkCracking_() {
  MultiVertexGeometryImpl multiVertexImpl = (MultiVertexGeometryImpl) m_geometry
      ._getImpl();
  int pointCount = multiVertexImpl.getPointCount();
  if (pointCount < 10)// use brute force for smaller polygons
  {
    return checkCrackingBrute_();
  } else {
    return checkCrackingPlanesweep_();
  }
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

static boolean accelerate_geometry(Geometry geometry,
    SpatialReference sr,
    Geometry.GeometryAccelerationDegree accel_degree) {
  if (!can_accelerate_geometry(geometry))
    return false;
  double tol = InternalUtils.calculateToleranceFromGeometry(sr,
      geometry, false);
  boolean bAccelerated = false;
  if (GeometryAccelerators.canUseRasterizedGeometry(geometry))
    bAccelerated |= ((MultiVertexGeometryImpl) geometry._getImpl())
        ._buildRasterizedGeometryAccelerator(tol, accel_degree);
  Geometry.Type type = geometry.getType();
  if ((type == Geometry.Type.Polygon || type == Geometry.Type.Polyline)
      && GeometryAccelerators.canUseQuadTree(geometry)
      && accel_degree != Geometry.GeometryAccelerationDegree.enumMild)
    bAccelerated |= ((MultiVertexGeometryImpl) geometry._getImpl())
        ._buildQuadTreeAccelerator(accel_degree);
  if ((type == Geometry.Type.Polygon || type == Geometry.Type.Polyline)
      && GeometryAccelerators.canUseQuadTreeForPaths(geometry)
      && accel_degree != Geometry.GeometryAccelerationDegree.enumMild)
    bAccelerated |= ((MultiPathImpl) geometry._getImpl())
        ._buildQuadTreeForPathsAccelerator(accel_degree);
  return bAccelerated;
}

代码示例来源:origin: Esri/geometry-api-java

public Object readResolve() throws ObjectStreamException {
  Geometry geometry = null;
  try {
    geometry = GeometryEngine.geometryFromEsriShape(
        esriShape, Geometry.Type.intToType(geometryType));
    
    if (Geometry.isMultiVertex(geometryType)) {
      MultiVertexGeometryImpl mvImpl = (MultiVertexGeometryImpl) geometry
          ._getImpl();
      if (!geometry.isEmpty()
          && Geometry.isMultiPath(geometryType)) {
        MultiPathImpl mpImpl = (MultiPathImpl) geometry._getImpl();
        AttributeStreamOfInt8 pathFlags = mpImpl
            .getPathFlagsStreamRef();
        for (int i = 0, n = mpImpl.getPathCount(); i < n; i++) {
          if (ogcFlags[i])
            pathFlags.setBits(i,
                (byte) PathFlags.enumOGCStartPolygon);
        }
      }
      mvImpl.setIsSimple(simpleFlag, tolerance, false);
    }
  } catch (Exception ex) {
    throw new InvalidObjectException("Cannot read geometry from stream");
  }
  return geometry;
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

/**
 * Removes accelerators from given geometry.
 * @param geometry The geometry instance to remove accelerators from.
 */
public static void deaccelerateGeometry(Geometry geometry) {
  Geometry.Type gt = geometry.getType();
  if (Geometry.isMultiVertex(gt.value()))
  {
    GeometryAccelerators accel = ((MultiVertexGeometryImpl) geometry
        ._getImpl())._getAccelerators();
    if (accel != null){
      accel._setRasterizedGeometry(null);
      accel._setQuadTree(null);
    }
  }
}

代码示例来源:origin: Esri/geometry-api-java

/**
 * Removes accelerators from given geometry.
 * @param geometry The geometry instance to remove accelerators from.
 */
public static void deaccelerateGeometry(Geometry geometry) {
  Geometry.Type gt = geometry.getType();
  if (Geometry.isMultiVertex(gt.value()))
  {
    GeometryAccelerators accel = ((MultiVertexGeometryImpl) geometry
        ._getImpl())._getAccelerators();
    if (accel != null){
      accel._setRasterizedGeometry(null);
      accel._setQuadTree(null);
    }
  }
}

代码示例来源:origin: Esri/geometry-api-java

Object readResolve() throws ObjectStreamException {
  Geometry geometry = null;
  try {
    geometry = GeometryEngine.geometryFromEsriShape(
        geometryData.esriShape, geometryData.geometryType);
    if (Geometry.isMultiVertex(geometry.getType().value())) {
      MultiVertexData mvd = (MultiVertexData) geometryData;
      MultiVertexGeometryImpl mvImpl = (MultiVertexGeometryImpl) geometry
          ._getImpl();
      if (!geometry.isEmpty()
          && Geometry.isMultiPath(geometry.getType().value())) {
        MultiPathData mpd = (MultiPathData) geometryData;
        MultiPathImpl mpImpl = (MultiPathImpl) geometry._getImpl();
        AttributeStreamOfInt8 pathFlags = mpImpl
            .getPathFlagsStreamRef();
        for (int i = 0, n = mpImpl.getPathCount(); i < n; i++) {
          if (mpd.ogcFlags[i])
            pathFlags.setBits(i,
                (byte) PathFlags.enumOGCStartPolygon);
        }
      }
      mvImpl.setIsSimple(mvd.simpleFlag, mvd.tolerance, false);
    }
  } catch (Exception ex) {
    throw new InvalidObjectException("Cannot read geometry from stream");
  }
  return geometry;
}

代码示例来源:origin: Esri/geometry-api-java

int multiPointIsSimpleAsFeature_() {
  MultiVertexGeometryImpl multiVertexImpl = (MultiVertexGeometryImpl) m_geometry
      ._getImpl();
  // sort lexicographically: by y,then by x, then by other attributes in
  // the order.
  // Go through the sorted list and make sure no points coincide exactly
  // (no tolerance is taken into account).
  int pointCount = multiVertexImpl.getPointCount();
  AttributeStreamOfInt32 indices = new AttributeStreamOfInt32(0);
  for (int i = 0; i < pointCount; i++) {
    indices.add(i);
  }
  indices.Sort(0, pointCount, new MultiPointVertexComparer(this));
  for (int i = 1; i < pointCount; i++) {
    if (compareVerticesMultiPoint_(indices.get(i - 1), indices.get(i)) == 0) {
      m_nonSimpleResult = new NonSimpleResult(
          NonSimpleResult.Reason.Clustering, indices.get(i - 1),
          indices.get(i));
      return 0;// points are coincident-simplify.
    }
  }
  return 2;
}

代码示例来源:origin: com.esri.geometry/esri-geometry-api

int multiPointIsSimpleAsFeature_() {
  MultiVertexGeometryImpl multiVertexImpl = (MultiVertexGeometryImpl) m_geometry
      ._getImpl();
  // sort lexicographically: by y,then by x, then by other attributes in
  // the order.
  // Go through the sorted list and make sure no points coincide exactly
  // (no tolerance is taken into account).
  int pointCount = multiVertexImpl.getPointCount();
  AttributeStreamOfInt32 indices = new AttributeStreamOfInt32(0);
  for (int i = 0; i < pointCount; i++) {
    indices.add(i);
  }
  indices.Sort(0, pointCount, new MultiPointVertexComparer(this));
  for (int i = 1; i < pointCount; i++) {
    if (compareVerticesMultiPoint_(indices.get(i - 1), indices.get(i)) == 0) {
      m_nonSimpleResult = new NonSimpleResult(
          NonSimpleResult.Reason.Clustering, indices.get(i - 1),
          indices.get(i));
      return 0;// points are coincident-simplify.
    }
  }
  return 2;
}

相关文章