public class TurfMisc extends Object
Constructor and Description |
---|
TurfMisc() |
Modifier and Type | Method and Description |
---|---|
static com.mapbox.services.commons.geojson.LineString |
lineSlice(com.mapbox.services.commons.geojson.Point startPt,
com.mapbox.services.commons.geojson.Point stopPt,
com.mapbox.services.commons.geojson.Feature line)
Takes a line, a start
Point , and a stop point and returns the line in between those
points. |
static com.mapbox.services.commons.geojson.LineString |
lineSlice(com.mapbox.services.commons.geojson.Point startPt,
com.mapbox.services.commons.geojson.Point stopPt,
com.mapbox.services.commons.geojson.LineString line)
Takes a line, a start
Point , and a stop point and returns the line in between those
points. |
static com.mapbox.services.commons.geojson.Feature |
pointOnLine(com.mapbox.services.commons.geojson.Point pt,
List<com.mapbox.services.commons.models.Position> coords)
Takes a
Point and a LineString and calculates the closest Point on the
LineString. |
public static com.mapbox.services.commons.geojson.LineString lineSlice(com.mapbox.services.commons.geojson.Point startPt, com.mapbox.services.commons.geojson.Point stopPt, com.mapbox.services.commons.geojson.Feature line) throws TurfException
Point
, and a stop point and returns the line in between those
points.startPt
- Starting point.stopPt
- Stopping point.line
- Line to slice.TurfException
- signals that a Turf exception of some sort has occurred.public static com.mapbox.services.commons.geojson.LineString lineSlice(com.mapbox.services.commons.geojson.Point startPt, com.mapbox.services.commons.geojson.Point stopPt, com.mapbox.services.commons.geojson.LineString line) throws TurfException
Point
, and a stop point and returns the line in between those
points.startPt
- Starting point.stopPt
- Stopping point.line
- Line to slice.TurfException
- signals that a Turf exception of some sort has occurred.public static com.mapbox.services.commons.geojson.Feature pointOnLine(com.mapbox.services.commons.geojson.Point pt, List<com.mapbox.services.commons.models.Position> coords) throws TurfException
Point
and a LineString
and calculates the closest Point on the
LineString.pt
- point to snap fromcoords
- line to snap toTurfException
- signals that a Turf exception of some sort has occurred.© 2015–2016 Mapbox. All rights reserved.