Expand description
All WM tooling
Structs§
- Clip
Line Result - After clipping a line, return the altered line, the offset the new line starts at, and if the line is ccw
- Clip
Line Result WithB Box - Ensuring
vec_bbox
exists - LonLat
- This class represents a point on the unit sphere as a pair of latitude-longitude coordinates. Like the rest of the “geometry” package, the intent is to represent spherical geometry as a mathematical abstraction, so functions that are specifically related to the Earth’s geometry (e.g. easting/northing conversions) should be put elsewhere.
- Tile
Children - The children of a tile
Enums§
- Source
- The source of the coordinate inputs
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.
- clip_
line - clip an input line to a bounding box Data should always be in a 0->1 coordinate system to use this clip function
- 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) - get_
zoom_ size - Given a zoom and tilesize, build mercator positional attributes
- 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 https://en.wikipedia.org/wiki/Mercator_projection#Scale_factor
- 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
- split_
tile - @param tile - the tile to split @param buffer - the buffer around the tile for lines and polygons @returns - the tile’s children split into 4 sub-tiles
- 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)