Module wm

Module wm 

Source
Expand description

All WM tooling

Structs§

ConvertedGeometry
The resultant geometry after conversion
ConvertedLineString
LineString converted from WM to S2

Enums§

Rotation
Track the rotation of a face
Source
The source of the coordinate inputs

Constants§

A
900913 (Web Mercator) constant
FACE_RULE_SET
Ruleset for converting an S2Point from a face to another. While this this set includes opposite side faces, without axis mirroring, it is not technically accurate and shouldn’t be used. Instead, data should let two points travel further than a full face width. FACE_RULE_SET[target_face][currentFace] = [rot, x, y]
MAXEXTENT
900913 (Web Mercator) max extent
MAXLAT
900913 (Web Mercator) maximum latitude

Traits§

ConvertFeature
Underlying conversion mechanic to move GeoJSON Feature to GeoJSON Vector Feature
ConvertVectorFeatureWM
Underlying conversion mechanic to move GeoJSON Geometry to S2 Geometry

Functions§

altitude_from_mercator_z
Convert mercator projection’s Z-Value to altitude returns the altitude
altitude_to_mercator_z
Convert altitude to mercator projection Z-Value returns the Z-Value
bbox_to_xyz_bounds
Convert a bbox of the form [w, s, e, n] to a tile’s bounding box in the form of { minX, maxX, minY, maxY } The bbox can be in lon-lat (WGS84) or WebMercator (900913) The default expectation is in WebMercator (900913) returns the tile’s bounding box
circumference_at_latitude
The circumference at a line of latitude in meters.
convert_bbox
Convert a bbox of the form [w, s, e, n] to a bbox of the form [w, s, e, n] The result can be in lon-lat (WGS84) or WebMercator (900913)
convert_geometry_to_vector
Convert a GeoJSON Geometry to an Vector Geometry
convert_geometry_wm_to_s2
Underlying conversion mechanic to move GeoJSON Geometry to S2Geometry
convert_vector_to_geometry
Convert a GeoJSON Geometry to an Vector Geometry
lat_from_mercator_y
Convert mercator projection’s Y-Value to latitude returns the latitude
lat_to_mercator_y
Convert latitude to mercator projection Y-Value returns the Y-Value
ll_to_merc
Convert Longitude and Latitude to a mercator x-y coordinates Return the mercator x-y coordinates
ll_to_px
Convert Longitude and Latitude to a mercator pixel coordinate Return the mercator pixel coordinate
ll_to_tile
Convert a lat-lon and zoom to the tile’s x-y coordinates Return the tile x-y
ll_to_tile_px
given a lon-lat and tile, find the offset in pixels return the tile xy pixel
lng_from_mercator_x
Convert mercator projection’s X-Value to longitude returns the longitude
lng_to_mercator_x
Convert longitude to mercator projection X-Value returns the X-Value
merc_to_ll
Convert mercator x-y coordinates to Longitude and Latitude Return the Longitude and Latitude
mercator_lat_scale
Determine the Mercator scale factor for a given latitude, See more
px_to_ll
Convert mercator pixel coordinates to Longitude and Latitude Return the Longitude and Latitude
px_to_tile
Convert a pixel coordinate to a tile x-y coordinate Return the tile x-y
tile_to_bbox
Convert a tile x-y-z to a bbox of the form [w, s, e, n] Return the bbox
xyz_to_bbox
Convert a tile x-y-z to a bbox of the form [w, s, e, n] The result can be in lon-lat (WGS84) or WebMercator (900913) The default result is in WebMercator (900913)

Type Aliases§

ConvertedGeometryList
A list of converted geometries