TAMN module
TAMN module¶
The tamn
module is a wrapper to the TAMN web service, and provides additional functions for handling
GeoJSON LineString geometry type, and to derive boundary box coordinates of GeoJSON Geometry, and whether or not this
geometry is crossing the target body’s antimeridian, North Pole and South Pole.
Note
TAMN_DEFAULT_RADIUS
and TAMN_DEFAULT_POLE_DISTANCE
values might need to be adapted to the target body.
Currently yielding good results for Earth, Mars and Phobos.
- geogen.tamn.TAMN_URL = 'http://localhost:3333/'¶
Default TAMN web service end-point URL.
- geogen.tamn.TAMN_DEFAULT_RADIUS = 50000¶
Default radius (m) used in TAMN algorithm.
- geogen.tamn.TAMN_DEFAULT_POLE_DISTANCE = 500000¶
Default pole distance (m) used in TAMN algorithm.
- geogen.tamn.in_frustum(vec, frustum)[source]¶
Returns whether or not a vector is contained within a frustum.
- geogen.tamn.get_bbox(geometry)[source]¶
Returns the boundary box coordinates of an input GeoJSON Geometry objects, and whether or not this geometry is crossing the antimeridian, North Pole and South Pole.
- geogen.tamn.crossing(p1, p2)[source]¶
Returns whether or not two surface points, defining a line, crosses the antimeridian (+/ 180 degrees).
- geogen.tamn.getSplitLineString(feature)[source]¶
Returns split GeoJSON Feature of LineString geometry type.
Other geometry types are handled by the
getSplitLineString
TAMN wrapper function.- Parameters
feature (GeoJSON Feature) – Input GeoJSON Feature object of LineString geometry type.
- Return type
- geogen.tamn.getSplitFeature(feature)[source]¶
Returns split GeoJSON Feature geometry.
Wrapper to the TAMN web service. Feature of LineString geometry are handled independantly of TAMN by the
getSplitLineString
function.- Parameters
feature (GeoJSON Feature) – Input GeoJSON Feature object to split.
- Return type