congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MultiPath.getPathStart
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using com.esri.core.geometry.MultiPath.getPathStart (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: com.esri.geometry/esri-geometry-api

  @Override
  public OGCPoint pointN(int n) {
    int nn;
    if (n == multiPath.getPathSize(0)) {
      nn = multiPath.getPathStart(0);
    } else
      nn = multiPath.getPathStart(0) + n;

    return (OGCPoint) OGCGeometry.createFromEsriGeometry(
        multiPath.getPoint(nn), esriSR);
  }
}
origin: Esri/geometry-api-java

  @Override
  public OGCPoint pointN(int n) {
    int nn;
    if (n == multiPath.getPathSize(0)) {
      nn = multiPath.getPathStart(0);
    } else
      nn = multiPath.getPathStart(0) + n;

    return (OGCPoint) OGCGeometry.createFromEsriGeometry(
        multiPath.getPoint(nn), esriSR);
  }
}
origin: Esri/geometry-api-java

/**
 * Returns the specified Point N in this LineString.
 * @param n The 0 based index of the Point.
 */
public OGCPoint pointN(int n) {
  int nn;
  if (multiPath.isClosedPath(0) && n == multiPath.getPathSize(0)) {
    nn = multiPath.getPathStart(0);
  } else
    nn = n + multiPath.getPathStart(0);
  return (OGCPoint) OGCGeometry.createFromEsriGeometry(
      multiPath.getPoint(nn), esriSR);
}
origin: com.esri.geometry/esri-geometry-api

/**
 * Returns the specified Point N in this LineString.
 * @param n The 0 based index of the Point.
 */
public OGCPoint pointN(int n) {
  int nn;
  if (multiPath.isClosedPath(0) && n == multiPath.getPathSize(0)) {
    nn = multiPath.getPathStart(0);
  } else
    nn = n + multiPath.getPathStart(0);
  return (OGCPoint) OGCGeometry.createFromEsriGeometry(
      multiPath.getPoint(nn), esriSR);
}
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.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 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/spatial-framework-for-hadoop

boolean rslt = true;
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

double length = 0.;
for (int ix = 0; ix < nPath; ix++) {
  int curPt = lines.getPathStart(ix);
  int pastPt = lines.getPathEnd(ix);
  Point fromPt = lines.getPoint(curPt);
origin: com.esri.geometry/esri-geometry-api

m_vertices_mp.add(multi_path, multi_path.getPathStart(ipath),
    mp_impl.getPathEnd(ipath));
m_xy_stream = (AttributeStreamOfDbl) m_vertices
origin: Esri/geometry-api-java

m_vertices_mp.add(multi_path, multi_path.getPathStart(ipath),
    mp_impl.getPathEnd(ipath));
m_xy_stream = (AttributeStreamOfDbl) m_vertices
origin: Esri/geometry-api-java

MultiPathImpl src_mp = (MultiPathImpl) src._getImpl();
int path_size = src.getPathSize(ipath);
int path_start = src.getPathStart(ipath);
for (int i = 0, n = src.getPathSize(ipath); i < n; i++) {
  src_mp.getXY(path_start + i, pt_1);
origin: com.esri.geometry/esri-geometry-api

MultiPathImpl src_mp = (MultiPathImpl) src._getImpl();
int path_size = src.getPathSize(ipath);
int path_start = src.getPathStart(ipath);
for (int i = 0, n = src.getPathSize(ipath); i < n; i++) {
  src_mp.getXY(path_start + i, pt_1);
origin: Esri/geometry-api-java

int path_b = intersector.getBlueElement();
pt_b = multipath_b.getXY(multipath_b.getPathStart(path_b));
env_a_inf.setCoords(intersector.getRedEnvelope());
env_a_inf.inflate(tolerance, tolerance);
origin: com.esri.geometry/esri-geometry-api

int path_b = intersector.getBlueElement();
pt_b = multipath_b.getXY(multipath_b.getPathStart(path_b));
env_a_inf.setCoords(intersector.getRedEnvelope());
env_a_inf.inflate(tolerance, tolerance);
origin: Esri/geometry-api-java

Point2D anyPoint = multi_path_b.getXY(multi_path_b.getPathStart(ipath));
int res = PointInPolygonHelper.isPointInPolygon(p_polygon_a, anyPoint, 0);
if (res == 0)
com.esri.core.geometryMultiPathgetPathStart

Javadoc

Returns the start index of the path.

Popular methods of MultiPath

  • getPoint
  • getPointCount
  • getPathCount
    Returns the number of paths in this multipath.
  • getPathEnd
    Returns the index immediately following the last 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

  • Updating database using SQL prepared statement
  • getContentResolver (Context)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JCheckBox (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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