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

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

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

origin: prestodb/presto

@SqlNullable
@Description("Returns the last point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_EndPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stEndPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_EndPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(lines.getPointCount() - 1), reference));
}
origin: Esri/geometry-api-java

public int numPoints() {
  if (multiPath.isEmpty())
    return 0;
  return multiPath.getPointCount() + 1;
}
origin: com.esri.geometry/esri-geometry-api

public int numPoints() {
  if (multiPath.isEmpty())
    return 0;
  return multiPath.getPointCount() + 1;
}
origin: Esri/geometry-api-java

/**
 * The number of Points in this LineString.
 */
public int numPoints() {
  if (multiPath.isEmpty())
    return 0;
  int d = multiPath.isClosedPath(0) ? 1 : 0;
  return multiPath.getPointCount() + d;
}
origin: com.esri.geometry/esri-geometry-api

/**
 * The number of Points in this LineString.
 */
public int numPoints() {
  if (multiPath.isEmpty())
    return 0;
  int d = multiPath.isClosedPath(0) ? 1 : 0;
  return multiPath.getPointCount() + d;
}
origin: aseldawy/spatialhadoop2

 return;
int[] xpoints = new int[path.getPointCount()];
int[] ypoints = new int[path.getPointCount()];
for (int i = 0; i < path.getPointCount(); i++) {
 double px = path.getPoint(i).getX();
 double py = path.getPoint(i).getY();
 g.drawPolygon(xpoints, ypoints, path.getPointCount());
else if (path instanceof Polyline)
 g.drawPolyline(xpoints, ypoints, path.getPointCount());
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 the last point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_EndPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stEndPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_EndPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(lines.getPointCount() - 1), reference));
}
origin: prestosql/presto

@SqlNullable
@Description("Returns the last point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_EndPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stEndPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_EndPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(lines.getPointCount() - 1), reference));
}
origin: Esri/spatial-framework-for-hadoop

  pn = lines.getPoint(idx);
} catch (Exception e) {
  LogUtils.Log_InvalidIndex(LOG, idx+1, 1, lines.getPointCount());
  return null;
origin: Esri/spatial-framework-for-hadoop

    spatialReference = SpatialReference.create(wkid);
  return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(lines.getPoint(lines.getPointCount()-1),
                                               spatialReference));
} else {
origin: Esri/spatial-framework-for-hadoop

  break;
default:
  resultInt.set(((MultiPath)(esriGeom)).getPointCount());
  break;
origin: Esri/geometry-api-java

if (((MultiPath) geometryA).getPointCount() > ((MultiPath) geometryB)
    .getPointCount())
  return bruteForceMultiPathMultiPath_((MultiPath) geometryA,
      (MultiPath) geometryB, geometriesAreDisjoint);
origin: com.esri.geometry/esri-geometry-api

if (((MultiPath) geometryA).getPointCount() > ((MultiPath) geometryB)
    .getPointCount())
  return bruteForceMultiPathMultiPath_((MultiPath) geometryA,
      (MultiPath) geometryB, geometriesAreDisjoint);
com.esri.core.geometryMultiPathgetPointCount

Popular methods of MultiPath

  • getPoint
  • getPathCount
    Returns the number of paths in this multipath.
  • 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

  • Updating database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • onCreateOptionsMenu (Activity)
  • Menu (java.awt)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Notification (javax.management)
  • JButton (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 21 Best IntelliJ Plugins
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