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

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

Best Java code snippets using com.esri.core.geometry.MultiPath.getPoint (Showing top 19 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: 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: aseldawy/spatialhadoop2

double px = path.getPoint(i).getX();
double py = path.getPoint(i).getY();
origin: prestodb/presto

@SqlNullable
@Description("Returns the first point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_StartPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stStartPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_StartPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(0), 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/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: 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: 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/spatial-framework-for-hadoop

    spatialReference = SpatialReference.create(wkid);
  return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(lines.getPoint(lines.getPointCount()-1),
                                               spatialReference));
} else {
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/spatial-framework-for-hadoop

MultiPath lines = (MultiPath)(esriGeom);
try {
  pn = lines.getPoint(idx);
} catch (Exception e) {
  LogUtils.Log_InvalidIndex(LOG, idx+1, 1, lines.getPointCount());
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.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: com.facebook.presto/presto-geospatial

@SqlNullable
@Description("Returns the first point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_StartPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stStartPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_StartPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(0), reference));
}
origin: prestosql/presto

@SqlNullable
@Description("Returns the first point of a LINESTRING geometry as a Point")
@ScalarFunction("ST_StartPoint")
@SqlType(GEOMETRY_TYPE_NAME)
public static Slice stStartPoint(@SqlType(GEOMETRY_TYPE_NAME) Slice input)
{
  OGCGeometry geometry = deserialize(input);
  validateType("ST_StartPoint", geometry, EnumSet.of(LINE_STRING));
  if (geometry.isEmpty()) {
    return null;
  }
  MultiPath lines = (MultiPath) geometry.getEsriGeometry();
  SpatialReference reference = geometry.getEsriSpatialReference();
  return serialize(createFromEsriGeometry(lines.getPoint(0), reference));
}
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

int curPt = lines.getPathStart(ix);
int pastPt = lines.getPathEnd(ix);
Point fromPt = lines.getPoint(curPt);
Point toPt = null;
for (int vx = curPt+1; vx < pastPt; vx++) {
  toPt = lines.getPoint(vx);
  length += GeometryEngine.geodesicDistanceOnWGS84(fromPt, toPt);
  fromPt = toPt;
origin: Esri/spatial-framework-for-hadoop

    spatialReference = SpatialReference.create(wkid);
  return GeometryUtils.geometryToEsriShapeBytesWritable(OGCGeometry.createFromEsriGeometry(lines.getPoint(0),
                                               spatialReference));
} else {
com.esri.core.geometryMultiPathgetPoint

Popular methods of MultiPath

  • getPointCount
  • 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

  • Start an intent from android
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onCreateOptionsMenu (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Path (java.nio.file)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Top 17 Free Sublime Text 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