| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
bases.Base --+
|
bases.LatLonHeightBase --+
|
nvector.LatLonNvectorBase --+
|
object --+ |
| |
bases.Base --+ |
| |
bases.LatLonHeightBase --+ |
| |
sphericalBase.LatLonSphericalBase --+
|
LatLon
New n-vector based point on spherical earth model.
Tools for working with points and paths on (a spherical model of) the earth's surface using vector-based methods.
Example:
>>> from sphericalNvector import LatLon >>> p = LatLon(52.205, 0.119)
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from Inherited from Inherited from Inherited from |
|||
| Properties | |
|
Inherited from Inherited from Inherited from |
| Method Details |
Compute the (signed) distance from the start to the closest point on the great circle path defined by a start and an end point. That is, if a perpendicular is drawn from this point to the great circle path, the along-track distance is the distance from the start point to the point where the perpendicular crosses the path.
Example:
>>> p = LatLon(53.2611, -0.7972)
>>> s = LatLon(53.3206, -1.7297) >>> e = LatLon(53.1887, 0.1334) >>> d = p.alongTrackDistanceTo(s, e) # 62331.58 |
Compute the (signed) distance from this point to great circle defined by a start and end point.
Example:
>>> p = LatLon(53.2611, -0.7972)
>>> s = LatLon(53.3206, -1.7297) >>> d = p.crossTrackDistanceTo(s, 96) # -305.7 >>> e = LatLon(53.1887, 0.1334) >>> d = p.crossTrackDistanceTo(s, e) # -307.5 |
Locate the destination from this point after having travelled the given distance on the given bearing.
Example: >>> p = LatLon(51.4778, -0.0015) >>> q = p.destination(7794, 300.7) >>> q.toStr() # 51.513546°N, 000.098345°W JS name: destinationPoint. |
Compute the distance from this to an other point.
Example: >>> p = LatLon(52.205, 0.119) >>> q = LatLon(48.857, 2.351); >>> d = p.distanceTo(q) # 404.3 km |
Compute the vector normal to great circle obtained by heading on the given bearing from this point. Direction of vector is such that initial bearing vector b = c × n, where n is an n-vector representing this point.
Example: >>> p = LatLon(53.3206, -1.7297) >>> gc = p.greatCircle(96.0) >>> gc.toStr() # [-0.794, 0.129, 0.594] |
Compute the vector normal to great circle obtained by heading from this to an other point or on a given bearing. Direction of vector is such that initial bearing vector b = c × n, where n is an n-vector representing this point.
Example: >>> p = LatLon(53.3206, -1.7297) >>> gc = p.greatCircle(96.0) >>> gc.toStr() # (-0.79408, 0.12856, 0.59406) >>> q = LatLon(53.1887, 0.1334) >>> g = p.greatCircleTo(q) >>> g.toStr() # (-0.79408, 0.12859, 0.59406) |
Compute the initial bearing (aka forward azimuth) from this to an other point.
Example: >>> p1 = LatLon(52.205, 0.119) >>> p2 = LatLon(48.857, 2.351) >>> b = p1.bearingTo(p2) # 156.2 JS name: bearingTo. |
Compute the initial bearing (aka forward azimuth) from this to an other point.
Example: >>> p1 = LatLon(52.205, 0.119) >>> p2 = LatLon(48.857, 2.351) >>> b = p1.bearingTo(p2) # 156.2 JS name: bearingTo. |
Locate the point projected from the point at given fraction on a straight line (chord) between this and an other point.
Example: >>> p = LatLon(52.205, 0.119) >>> q = LatLon(48.857, 2.351) >>> i = p.intermediateChordTo(q, 0.25) # 51.3723°N, 000.7072°E JS name: intermediatePointOnChordTo, intermediatePointDirectlyTo. |
Locate the point at a given fraction between this and an other point.
Example: >>> p = LatLon(52.205, 0.119) >>> q = LatLon(48.857, 2.351) >>> i = p.intermediateTo(q, 0.25) # 51.3721°N, 000.7074°E JS name: intermediatePointTo. |
Locates the point of intersection of two paths each defined by two points or a start point and bearing from North.
Example: >>> s = LatLon(51.8853, 0.2545) >>> e = LatLon(49.0034, 2.5735) >>> i = s.intersection(108.55, e, 32.44) # 50.9076°N, 004.5086°E |
Test whether this point is enclosed by a (convex) polygon defined by a list, sequence, set or tuple of points.
Example: >>> b = LatLon(45,1), LatLon(45,2), LatLon(46,2), LatLon(46,1) >>> p = LatLon(45.1, 1.1) >>> inside = p.isEnclosedBy(b) # True JS name: enclosedBy. |
Test whether this point is within the extent of a segment joining two other points. If this point is not on the great circle defined by both points, return whether it is within the area bound by perpendiculars to the great circle at each point (in the same hemispere).
JS name: isBetween. |
Find the midpoint between this and an other point.
Example: >>> p1 = LatLon(52.205, 0.119) >>> p2 = LatLon(48.857, 2.351) >>> m = p1.midpointTo(p2) # '50.5363°N, 001.2746°E' |
Locate the closest point on the great circle segment between two points and this point. If this point is within the extent of the segment between both end points, the returned point is on the segment. Otherwise the returned point is the closest of the segment end points.
Example: >>> s1 = LatLon(51.0, 1.0) >>> s2 = LatLon(51.0, 2.0) >>> s = LatLon(51.0, 1.9) >>> p = s.nearestOn(s1, s2) # 51.0004°N, 001.9000°E >>> d = p.distanceTo(s) # 42.71 m >>> s = LatLon(51.0, 2.1) >>> p = s.nearestOn(s1, s2) # 51.0000°N, 002.0000°E JS name: nearestPointOnSegment. |
Locate the closest point on the great circle segment between any two consecutive points of a path. If this point is within the extent of any segment, the closest point is on the segment. Otherwise the closest point is the nearest of the segment end points.
|
Convert this (geodetic) point to a (spherical) n-vector normal to the earth's surface.
Example: >>> p = LatLon(45, 45) >>> n = p.toNvector() >>> n.toStr() # [0.50, 0.50, 0.70710] JS name: toVector. |
Locate a point given this and an other point and bearings at this and the other point.
Example: >>> p = LatLon("47°18.228'N","002°34.326'W") # Basse Castouillet >>> q = LatLon("47°18.664'N","002°31.717'W") # Basse Hergo >>> t = p.triangulate(7, q, 295) # 47.323667°N, 002.568501°W' |
Locate a point at given distances from this and two other points. See also Trilateration.
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Mar 5 16:16:50 2018 | http://epydoc.sourceforge.net |