Codota Logo
MultiPath.getPathEnd
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain MultiPath
private void myMethod () {
MultiPath m =
  • Codota Iconnew Polyline()
  • Codota IconOGCGeometry oGCGeometry;(MultiPath) oGCGeometry.getEsriGeometry()
  • Smart code suggestions by Codota
}
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

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: Esri/geometry-api-java

void shiftPath(MultiPath inputGeom, int iPath, double shift) {
  MultiVertexGeometryImpl vertexGeometryImpl = (MultiVertexGeometryImpl) inputGeom
      ._getImpl();
  AttributeStreamOfDbl xyStream = (AttributeStreamOfDbl) vertexGeometryImpl
      .getAttributeStreamRef(VertexDescription.Semantics.POSITION);
  int i1 = inputGeom.getPathStart(iPath);
  int i2 = inputGeom.getPathEnd(iPath);
  Point2D pt = new Point2D();
  while (i1 < i2) {
    xyStream.read(i1, pt);
    pt.x += shift;
    xyStream.write(i1, pt);
    i1++;
  }
}
origin: com.esri.geometry/esri-geometry-api

void shiftPath(MultiPath inputGeom, int iPath, double shift) {
  MultiVertexGeometryImpl vertexGeometryImpl = (MultiVertexGeometryImpl) inputGeom
      ._getImpl();
  AttributeStreamOfDbl xyStream = (AttributeStreamOfDbl) vertexGeometryImpl
      .getAttributeStreamRef(VertexDescription.Semantics.POSITION);
  int i1 = inputGeom.getPathStart(iPath);
  int i2 = inputGeom.getPathEnd(iPath);
  Point2D pt = new Point2D();
  while (i1 < i2) {
    xyStream.read(i1, pt);
    pt.x += shift;
    xyStream.write(i1, pt);
    i1++;
  }
}
origin: com.esri.geometry/esri-geometry-api

void _OffsetPath(MultiPath multiPath, int pathIndex, MultiPath resultingPath) {
  int startVertex = multiPath.getPathStart(pathIndex);
  int endVertex = multiPath.getPathEnd(pathIndex);
origin: Esri/geometry-api-java

void _OffsetPath(MultiPath multiPath, int pathIndex, MultiPath resultingPath) {
  int startVertex = multiPath.getPathStart(pathIndex);
  int endVertex = multiPath.getPathEnd(pathIndex);
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/spatial-framework-for-hadoop

for (int ix = 0; rslt && ix < nPaths; ix++) {
  Point p0 = lines.getPoint(lines.getPathStart(ix));
  Point pf = lines.getPoint(lines.getPathEnd(ix)-1);
origin: Esri/spatial-framework-for-hadoop

for (int ix = 0; ix < nPath; ix++) {
  int curPt = lines.getPathStart(ix);
  int pastPt = lines.getPathEnd(ix);
  Point fromPt = lines.getPoint(curPt);
  Point toPt = null;
com.esri.core.geometryMultiPathgetPathEnd

Javadoc

Returns the index immediately following the last index of the path.

Popular methods of MultiPath

  • getPoint
  • getPointCount
  • getPathCount
    Returns the number of paths in this multipath.
  • 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
  • getSupportFragmentManager (FragmentActivity)
  • compareTo (BigDecimal)
  • getSharedPreferences (Context)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Reference (javax.naming)
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • JLabel (javax.swing)
  • LogFactory (org.apache.commons.logging)
    A minimal incarnation of Apache Commons Logging's LogFactory API, providing just the common Log look
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now