Tabnine Logo
MultiPath.getPathCount
Code IndexAdd Tabnine to your IDE (free)

How to use
getPathCount
method
in
com.esri.core.geometry.MultiPath

Best Java code snippets using com.esri.core.geometry.MultiPath.getPathCount (Showing top 20 results out of 315)

origin: prestodb/presto

@SqlNullable
@Description("Returns TRUE if the LineString or Multi-LineString's start and end points are coincident")
@ScalarFunction("ST_IsClosed")
@SqlType(BOOLEAN)
public static Boolean stIsClosed(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_IsClosed", geometry, EnumSet.of(LINE_STRING, MULTI_LINE_STRING));
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  int pathCount = lines.getPathCount();
  for (int i = 0; i < pathCount; i++) {
    Point start = lines.getPoint(lines.getPathStart(i));
    Point end = lines.getPoint(lines.getPathEnd(i) - 1);
    if (!end.equals(start)) {
      return false;
    }
  }
  return true;
}
origin: Esri/geometry-api-java

public int numGeometries() {
  MultiPath mp = (MultiPath) getEsriGeometry();
  return mp.getPathCount();
}
origin: com.esri.geometry/esri-geometry-api

public int numGeometries() {
  MultiPath mp = (MultiPath) getEsriGeometry();
  return mp.getPathCount();
}
origin: Esri/geometry-api-java

public boolean isClosed() {
  MultiPath mp = (MultiPath) getEsriGeometry();
  for (int i = 0, n = mp.getPathCount(); i < n; i++) {
    if (!mp.isClosedPathInXYPlane(i))
      return false;
  }
  return true;
}
origin: com.esri.geometry/esri-geometry-api

public boolean isClosed() {
  MultiPath mp = (MultiPath) getEsriGeometry();
  for (int i = 0, n = mp.getPathCount(); i < n; i++) {
    if (!mp.isClosedPathInXYPlane(i))
      return false;
  }
  return true;
}
origin: com.esri.geometry/esri-geometry-api

@Override
public Geometry next() {
  if (m_geometry == null) {
    m_index = 0;
    m_geometry = m_geoms.next();
    if (m_geometry == null)
      return null;
  }
  MultiPath mp = (MultiPath) (m_geometry);
  if (m_index < mp.getPathCount()) {
    int ind = m_index;
    m_index++;
    return m_bufferer.bufferPolylinePath_((Polyline) m_geometry,
        ind, m_bfilter);
  }
  m_geometry = null;
  return next();
}
origin: Esri/geometry-api-java

@Override
public Geometry next() {
  if (m_geometry == null) {
    m_index = 0;
    m_geometry = m_geoms.next();
    if (m_geometry == null)
      return null;
  }
  MultiPath mp = (MultiPath) (m_geometry);
  if (m_index < mp.getPathCount()) {
    int ind = m_index;
    m_index++;
    return m_bufferer.bufferPolylinePath_((Polyline) m_geometry,
        ind, m_bfilter);
  }
  m_geometry = null;
  return next();
}
origin: Esri/geometry-api-java

private static boolean multiPathExactlyEqualsMultiPath_(
    MultiPath multipathA, MultiPath multipathB, double tolerance,
    ProgressTracker progress_tracker) {
  if (multipathA.getPathCount() != multipathB.getPathCount()
      || multipathA.getPointCount() != multipathB.getPointCount())
    return false;
  Point2D ptA = new Point2D(), ptB = new Point2D();
  boolean bAllPointsEqual = true;
  double tolerance_sq = tolerance * tolerance;
  for (int ipath = 0; ipath < multipathA.getPathCount(); ipath++) {
    if (multipathA.getPathEnd(ipath) != multipathB.getPathEnd(ipath)) {
      bAllPointsEqual = false;
      break;
    }
    for (int i = multipathA.getPathStart(ipath); i < multipathB
        .getPathEnd(ipath); i++) {
      multipathA.getXY(i, ptA);
      multipathB.getXY(i, ptB);
      if (Point2D.sqrDistance(ptA, ptB) > tolerance_sq) {
        bAllPointsEqual = false;
        break;
      }
    }
    if (!bAllPointsEqual)
      break;
  }
  if (!bAllPointsEqual)
    return false;
  return true;
}
origin: com.esri.geometry/esri-geometry-api

private static boolean multiPathExactlyEqualsMultiPath_(
    MultiPath multipathA, MultiPath multipathB, double tolerance,
    ProgressTracker progress_tracker) {
  if (multipathA.getPathCount() != multipathB.getPathCount()
      || multipathA.getPointCount() != multipathB.getPointCount())
    return false;
  Point2D ptA = new Point2D(), ptB = new Point2D();
  boolean bAllPointsEqual = true;
  double tolerance_sq = tolerance * tolerance;
  for (int ipath = 0; ipath < multipathA.getPathCount(); ipath++) {
    if (multipathA.getPathEnd(ipath) != multipathB.getPathEnd(ipath)) {
      bAllPointsEqual = false;
      break;
    }
    for (int i = multipathA.getPathStart(ipath); i < multipathB
        .getPathEnd(ipath); i++) {
      multipathA.getXY(i, ptA);
      multipathB.getXY(i, ptB);
      if (Point2D.sqrDistance(ptA, ptB) > tolerance_sq) {
        bAllPointsEqual = false;
        break;
      }
    }
    if (!bAllPointsEqual)
      break;
  }
  if (!bAllPointsEqual)
    return false;
  return true;
}
origin: com.facebook.presto/presto-geospatial

@SqlNullable
@Description("Returns TRUE if the LineString or Multi-LineString's start and end points are coincident")
@ScalarFunction("ST_IsClosed")
@SqlType(BOOLEAN)
public static Boolean stIsClosed(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_IsClosed", geometry, EnumSet.of(LINE_STRING, MULTI_LINE_STRING));
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  int pathCount = lines.getPathCount();
  for (int i = 0; i < pathCount; i++) {
    Point start = lines.getPoint(lines.getPathStart(i));
    Point end = lines.getPoint(lines.getPathEnd(i) - 1);
    if (!end.equals(start)) {
      return false;
    }
  }
  return true;
}
origin: prestosql/presto

@SqlNullable
@Description("Returns TRUE if the LineString or Multi-LineString's start and end points are coincident")
@ScalarFunction("ST_IsClosed")
@SqlType(BOOLEAN)
public static Boolean stIsClosed(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_IsClosed", geometry, EnumSet.of(LINE_STRING, MULTI_LINE_STRING));
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  int pathCount = lines.getPathCount();
  for (int i = 0; i < pathCount; i++) {
    Point start = lines.getPoint(lines.getPathStart(i));
    Point end = lines.getPoint(lines.getPathEnd(i) - 1);
    if (!end.equals(start)) {
      return false;
    }
  }
  return true;
}
origin: Esri/geometry-api-java

private Geometry Generalize(Geometry geom) {
  Geometry.Type gt = geom.getType();
  if (Geometry.isPoint(gt.value()))
    return geom;
  if (gt == Geometry.Type.Envelope) {
    Polygon poly = new Polygon(geom.getDescription());
    poly.addEnvelope((Envelope) geom, false);
    return Generalize(poly);
  }
  if (geom.isEmpty())
    return geom;
  MultiPath mp = (MultiPath) geom;
  MultiPath dstmp = (MultiPath) geom.createInstance();
  Line line = new Line();
  for (int ipath = 0, npath = mp.getPathCount(); ipath < npath; ipath++) {
    GeneralizePath((MultiPathImpl) mp._getImpl(), ipath,
        (MultiPathImpl) dstmp._getImpl(), line);
  }
  return dstmp;
}
origin: com.esri.geometry/esri-geometry-api

private Geometry Generalize(Geometry geom) {
  Geometry.Type gt = geom.getType();
  if (Geometry.isPoint(gt.value()))
    return geom;
  if (gt == Geometry.Type.Envelope) {
    Polygon poly = new Polygon(geom.getDescription());
    poly.addEnvelope((Envelope) geom, false);
    return Generalize(poly);
  }
  if (geom.isEmpty())
    return geom;
  MultiPath mp = (MultiPath) geom;
  MultiPath dstmp = (MultiPath) geom.createInstance();
  Line line = new Line();
  for (int ipath = 0, npath = mp.getPathCount(); ipath < npath; ipath++) {
    GeneralizePath((MultiPathImpl) mp._getImpl(), ipath,
        (MultiPathImpl) dstmp._getImpl(), line);
  }
  return dstmp;
}
origin: Esri/spatial-framework-for-hadoop

case ST_MULTILINESTRING:
  MultiPath lines = (MultiPath)(ogcGeometry.getEsriGeometry());
  int nPaths = lines.getPathCount();
  boolean rslt = true;
  for (int ix = 0; rslt && ix < nPaths; ix++) {
origin: Esri/spatial-framework-for-hadoop

default:
  MultiPath lines = (MultiPath)(esriGeom);
  int nPath = lines.getPathCount();
  double length = 0.;
  for (int ix = 0; ix < nPath; ix++) {
origin: com.esri.geometry/esri-geometry-api

int n = pp.getPathCount(); // rings or paths
origin: Esri/geometry-api-java

int n = pp.getPathCount(); // rings or paths
origin: Esri/geometry-api-java

for (int ipath = 0, npath = multi_path_b.getPathCount(); ipath < npath; ipath++)
      if (PointInPolygonHelper.quadTreeWillHelp(polygon_a, multi_path_b.getPathCount() - 1) && (polygon_impl_a._getAccelerators() == null || polygon_impl_a._getAccelerators().getQuadTree() == null)) {
        pa = new Polygon();
        polygon_a.copyTo(pa);
origin: Esri/geometry-api-java

if (PointInPolygonHelper.quadTreeWillHelp(polygon_a, multipath_b.getPathCount() - 1) && (multi_path_impl_a._getAccelerators() == null || multi_path_impl_a._getAccelerators().getQuadTree() == null)) {
  pa = new Polygon();
  polygon_a.copyTo(pa);
origin: com.esri.geometry/esri-geometry-api

if (PointInPolygonHelper.quadTreeWillHelp(polygon_a, multipath_b.getPathCount() - 1) && (multi_path_impl_a._getAccelerators() == null || multi_path_impl_a._getAccelerators().getQuadTree() == null)) {
  pa = new Polygon();
  polygon_a.copyTo(pa);
com.esri.core.geometryMultiPathgetPathCount

Javadoc

Returns the number of paths in this multipath.

Popular methods of MultiPath

  • getPoint
  • getPointCount
  • getPathEnd
    Returns the index immediately following the last index of the path.
  • getPathStart
    Returns the start index of the path.
  • lineTo
    Adds a Line Segment to the given end point.
  • startPath
    Starts a new path at a point.
  • addSegment
    Adds a new segment to this multipath.
  • calculateLength2D
  • _getImpl
  • add
    Appends all paths from another multipath.
  • addPath
    Adds a new path to this multipath.
  • closePathWithLine
    Closes the last path of this multipath with a line segment. The closing segment is a segment that co
  • addPath,
  • closePathWithLine,
  • createInstance,
  • estimateMemorySize,
  • getBoundary,
  • getDescription,
  • getPathSize,
  • getPointByVal,
  • getSegmentCount

Popular in Java

  • Finding current android device location
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JTable (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Runner (org.openjdk.jmh.runner)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now