6.3.1.3.9. GeoLineString

public class GeoLineString extends GeoGeometry

6.3.1.3.9.1. Fields

6.3.1.3.9.1.1. mPoints

protected List<GeoPoint> mPoints

6.3.1.3.9.1.2. serialVersionUID

protected static final long serialVersionUID

6.3.1.3.9.2. Constructors

6.3.1.3.9.2.1. GeoLineString

public GeoLineString()

6.3.1.3.9.2.2. GeoLineString

public GeoLineString(GeoLineString geoLineString)

6.3.1.3.9.3. Methods

6.3.1.3.9.3.1. add

public void add(GeoPoint point)

6.3.1.3.9.3.2. clear

public void clear()

6.3.1.3.9.3.3. clip

public GeoGeometry clip(GeoEnvelope envelope)

6.3.1.3.9.3.4. clip

protected void clip(List<GeoPoint> pointsIn, List<GeoPoint> pointsOut, GeoEnvelope envelope, boolean shapeOpen)

Sutherland-Hodgman Polygon Clipping Adopted from (C) 2005 by Gavin Macaulay QGIS Project

6.3.1.3.9.3.5. coordinatesToJSON

public JSONArray coordinatesToJSON()

6.3.1.3.9.3.6. copy

public GeoGeometry copy()

6.3.1.3.9.3.7. distance

public double distance(GeoGeometry geometry)

6.3.1.3.9.3.8. equals

public boolean equals(Object o)

6.3.1.3.9.3.9. getEnvelope

public GeoEnvelope getEnvelope()

6.3.1.3.9.3.10. getInstance

protected GeoLineString getInstance()

6.3.1.3.9.3.11. getLength

public double getLength()

6.3.1.3.9.3.12. getPoint

public GeoPoint getPoint(int index)

6.3.1.3.9.3.13. getPointCount

public int getPointCount()

6.3.1.3.9.3.14. getPoints

public List<GeoPoint> getPoints()

6.3.1.3.9.3.15. getSquareDistance

protected double getSquareDistance(GeoPoint p1, GeoPoint p2)

6.3.1.3.9.3.16. getSquareSegmentDistance

protected double getSquareSegmentDistance(GeoPoint p0, GeoPoint p1, GeoPoint p2)

6.3.1.3.9.3.17. getType

public int getType()

6.3.1.3.9.3.18. intersects

public boolean intersects(GeoEnvelope envelope)

6.3.1.3.9.3.19. intersects

public boolean intersects(GeoPoint a, GeoPoint b, GeoPoint c, GeoPoint d)

Detects line ab and cd intersection

Parameters:
  • a – Start first line point point
  • b – End first line point
  • c – Start second line point
  • d – End second line point
Returns:

Do lines intersect

6.3.1.3.9.3.20. intersects

public boolean intersects(GeoPoint a, GeoPoint b, GeoPoint c, GeoPoint d, double A1, double B1, double C1)

Detects line ab and cd intersection

Parameters:
  • a – Start first line point point
  • b – End first line point
  • c – Start second line point
  • d – End second line point
  • A1 – For speed, see method above
  • B1 – For speed, see method above
  • C1 – For speed, see method above
Returns:

Do lines intersect

6.3.1.3.9.3.21. isValid

public boolean isValid()

6.3.1.3.9.3.22. linesIntersect

protected boolean linesIntersect(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

6.3.1.3.9.3.23. rawProject

protected boolean rawProject(int toCrs)

6.3.1.3.9.3.24. read

public void read(DataInputStream stream)

6.3.1.3.9.3.25. remove

public GeoPoint remove(int index)

6.3.1.3.9.3.26. setCoordinatesFromJSON

public void setCoordinatesFromJSON(JSONArray coordinates)

6.3.1.3.9.3.27. setCoordinatesFromJSONStream

public void setCoordinatesFromJSONStream(JsonReader reader, int crs)

6.3.1.3.9.3.28. setCoordinatesFromWKT

public void setCoordinatesFromWKT(String wkt, int crs)

6.3.1.3.9.3.29. simplify

public GeoGeometry simplify(double tolerance)

6.3.1.3.9.3.30. simplifyDouglasPeucker

protected GeoLineString simplifyDouglasPeucker(double sqTolerance)

6.3.1.3.9.3.31. simplifyRadialDistance

protected GeoLineString simplifyRadialDistance(double sqTolerance)

6.3.1.3.9.3.32. solveIntersection

protected GeoPoint solveIntersection(GeoPoint pt1, GeoPoint pt2, int pos, GeoEnvelope envelope)

6.3.1.3.9.3.33. toWKT

public String toWKT(boolean full)

6.3.1.3.9.3.34. trimPoints

protected void trimPoints(List<GeoPoint> pointsIn, List<GeoPoint> pointsOut, int pos, GeoEnvelope envelope, boolean shapeOpen)

6.3.1.3.9.3.35. write

public void write(DataOutputStream stream)