Skip to content

Latest commit

 

History

History
134 lines (98 loc) · 10.1 KB

wise-leaflet-pip.md

File metadata and controls

134 lines (98 loc) · 10.1 KB

Modules

wiseLeafletPip : function

Hayeswise Point-in-polygon for Leaflet: A plugin for Leaflet that provides points-in-polygons functions based on Dan Sunday's C++ winding number implementation.

External

L

Leaflet

wiseLeafletPip : function

Hayeswise Point-in-polygon for Leaflet: A plugin for Leaflet that provides points-in-polygons functions based on Dan Sunday's C++ winding number implementation.

See

Param Type Description
Leaflet function namespace object.

L

Leaflet

Kind: global external
See: Leaflet

L.LatLng

Latitutde and longitude class.

Kind: static property of L
See: Leaflet documentation for further information.

LatLng.isLeft ⇒ Number

Tests if a point is left|on|right of an infinite line.

This is a JavaScript and Leaflet port of the isLeft() C++ function by Dan Sunday.

Kind: static property of LatLng
Returns: Number - >0 for p2 left of the line through this point and p1, =0 for p2 on the line, <0 for p2 right of the line through this point an p1.
See: Inclusion of a Point in a Polygon by Dan Sunday.

Param Type Description
p1 LatLng Point The reference line is defined by this LatLng to p1.
p2 LatLng The point in question.

L.Polyline

The Leaflet Polyline class.

Kind: static property of L
See: Leaflet documentation for further information.

Polyline.contains ⇒ boolean

Checks if a single point is contained in a polyline or polygon (L.Polygon extends L.Polyline).

Note that L.Polygon, L.GeodesicPolygons, and L.GeodesicCircles are types of L.Polygon.

Kind: static property of Polyline
Returns: boolean - True if the point is contained in the polygon or polyline; otherwise,
See: Leaflet.Geodesc for information about Leaflet.Geodesc by Fragger.

Param Type Description
p L.LatLng A geographical point with a latitude and longitude.

Polyline.getWindingNumber ⇒ Number

Test for a point in a polygon or on the bounding lines of the polygon. The coordinates (L.LatLngs) for a GeodesicPolygon are set to follow the earth's curvature when the GeodesicPolygon object is created. Since L.Polygon extends L.Polyline we can use the same method for both. Although, for L.Polyline, we only get points on the line even if a collection of lines appear to make a polygon.

This is a JavaScript and Leaflet port of the wn_PnPoly() C++ function by Dan Sunday. Unlike the C++ version, this implementation does include points on the line and vertices.

Kind: static property of Polyline
Returns: Number - The winding number (=0 only when the point is outside)
See

Param Type Description
p L.LatLng A point.

L.Polygon

The Leaflet Polygon class. L.GeodesicPolygon and L.GeodesicCircle extend L.Polygon.

Kind: static property of L
See: Leaflet documentation for further information.