diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/404.html b/404.html new file mode 100644 index 0000000..ef28fc2 --- /dev/null +++ b/404.html @@ -0,0 +1,616 @@ + + + +
+ + + + + + + + + + + + + + + + +Morecantile commons.
+ + + +
+ Bases: NamedTuple
A xmin,ymin,xmax,ymax coordinates tuple.
+ + +Parameters:
+left
+ (number
)
+ –
+ min horizontal coordinate.
+bottom
+ (number
)
+ –
+ min vertical coordinate.
+right
+ (number
)
+ –
+ max horizontal coordinate.
+top
+ (number
)
+ –
+ max vertical coordinate.
+Examples:
+>>> BoundingBox(-180.0, -90.0, 180.0, 90.0)
+
+ Bases: NamedTuple
A x,y Coordinates pair.
+ + +Parameters:
+x
+ (number
)
+ –
+ horizontal coordinate input projection unit.
+y
+ (number
)
+ –
+ vertical coordinate input projection unit.
+Examples:
+>>> Coords(-90.3, 10.5)
+
+ Bases: NamedTuple
TileMatrixSet X,Y,Z tile indices.
+ + +Parameters:
+x
+ (int
)
+ –
+ horizontal index.
+y
+ (int
)
+ –
+ verctical index.
+z
+ (int
)
+ –
+ zoom level.
+Examples:
+>>> Tile(0, 0, 0)
+
Default Morecantile TMS.
+ + + +Default TileMatrixSets holder.
+ + + + +register(custom_tms: Dict[str, TileMatrixSet], overwrite: bool = False) -> TileMatrixSets
+
Register TileMatrixSet(s).
+ +Morecantile errors.
+ + + +
+ Bases: MorecantileError
Raised when TMS version is not 2.0
+ + +
+ Bases: MorecantileError
Invalid TileMatrixSet indentifier.
+ + +
+ Bases: MorecantileError
Raised when math errors occur beyond ~85 degrees N or S
+ + +
+ Bases: MorecantileError
Raised when input zoom is invalid.
+ + +
+ Bases: Exception
Base error for Morecantile.
+ + +
+ Bases: MorecantileError
Raised when a custom TileMatrixSet doesn't support quadkeys
+ + +
+ Bases: UserWarning
Point is outside TMS bounds.
+ + +
+ Bases: MorecantileError
Raised when errors occur in computing or parsing quad keys
+ + +
+ Bases: MorecantileError
Raised when errors occur in parsing a function's tile arg(s)
+ + +Pydantic modules for OGC TileMatrixSets (www.ogc.org/standards/tms)
+ + + +
+ Bases: RootModel[Union[str, Union[CRSUri, CRSWKT, CRSRef]]]
CRS model.
+Ref: github.com/opengeospatial/ogcapi-tiles/blob/master/openapi/schemas/common-geodata/crs.yaml
+Code generated using koxudaxi/datamodel-code-generator
+ + + + +property
+
+
+¶srs: str
+
return the string form of the user input used to create the CRS.
+model_post_init(__context: Any) -> None
+
Post Init: Set private attr.
+ +return EPSG number of the CRS.
+ +return JSON version of the CRS.
+ +return PROJ4 version of the CRS.
+ +
+ Bases: BaseModel
Coordinate Reference System (CRS) from URI.
+ + + + +
+ Bases: BaseModel
Coordinate Reference System (CRS) from WKT encoded as PROJJSON Object.
+ + + + +
+ Bases: BaseModel
Bounding box
+ref: github.com/opengeospatial/2D-Tile-Matrix-Set/blob/master/schemas/tms/2.0/json/2DBoundingBox.json
+ + + + +
+ Bases: BaseModel
Tile Matrix Definition
+A tile matrix, usually corresponding to a particular zoom level of a TileMatrixSet.
+ref: github.com/opengeospatial/2D-Tile-Matrix-Set/blob/master/schemas/tms/2.0/json/tileMatrix.json
+ + + + + + +
+ Bases: BaseModel
Tile Matrix Set Definition
+A definition of a tile matrix set following the Tile Matrix Set standard.
+For tileset metadata, such a description (in tileMatrixSet
property) is only required for offline use,
+as an alternative to a link with a http://www.opengis.net/def/rel/ogc/1.0/tiling-scheme
relation type.
ref: github.com/opengeospatial/2D-Tile-Matrix-Set/blob/master/schemas/tms/2.0/json/tileMatrixSet.json
+ + + + +cached
+ property
+
+
+¶_invert_axis: bool
+
Check if CRS has inverted AXIS (lat,lon) instead of (lon,lat).
+cached
+ property
+
+
+¶bbox
+
Return TMS bounding box in geographic coordinate reference system.
+cached
+ property
+
+
+¶geographic_crs: CRS
+
Return the TMS's geographic CRS.
+cached
+ property
+
+
+¶is_quadtree: bool
+
Check for quadtree support.
+cached
+ property
+
+
+¶is_variable: bool
+
Check if TMS has variable width matrix.
+property
+
+
+¶maxzoom: int
+
TileMatrixSet maximum TileMatrix identifier
+property
+
+
+¶minzoom: int
+
TileMatrixSet minimum TileMatrix identifier
+cached
+ property
+
+
+¶rasterio_crs
+
Return rasterio CRS.
+cached
+ property
+
+
+¶rasterio_geographic_crs
+
Return the geographic CRS as a rasterio CRS.
+property
+
+
+¶xy_bbox
+
Return TMS bounding box in TileMatrixSet's CRS.
+_matrix_origin(matrix: TileMatrix) -> Coords
+
Return the Origin coordinates of the matrix.
+ +bounds(*tile: Tile) -> BoundingBox
+
check_for_old_specification(data)
+
Check for TMS V1.0 keywords.
+ +Get the children of a tile
+The children are ordered: top-left, top-right, bottom-right, bottom-left.
+tile : Tile or sequence of int + May be be either an instance of Tile or 3 ints, X, Y, Z. +zoom : int, optional + Determines the zoom level of the returned child tiles. + This defaults to one higher than the tile (the immediate children).
+list: list of Tile
+ +classmethod
+
+
+¶custom(extent: List[float], crs: CRS, tile_width: int = 256, tile_height: int = 256, matrix_scale: Optional[List] = None, extent_crs: Optional[CRS] = None, minzoom: int = 0, maxzoom: int = 24, title: Optional[str] = None, id: Optional[str] = None, ordered_axes: Optional[List[str]] = None, screen_pixel_size: float = 0.00028, decimation_base: int = 2, **kwargs: Any)
+
Construct a custom TileMatrixSet.
+crs: pyproj.CRS
+ Tile Matrix Set coordinate reference system
+extent: list
+ Bounding box of the Tile Matrix Set, (left, bottom, right, top).
+tile_width: int
+ Width of each tile of this tile matrix in pixels (default is 256).
+tile_height: int
+ Height of each tile of this tile matrix in pixels (default is 256).
+matrix_scale: list
+ Tiling schema coalescence coefficient (default: [1, 1] for EPSG:3857).
+ Should be set to [2, 1] for EPSG:4326.
+ see: docs.opengeospatial.org/is/17-083r2/17-083r2.html#14
+extent_crs: pyproj.CRS
+ Extent's coordinate reference system, as a pyproj CRS object.
+ (default: same as input crs)
+minzoom: int
+ Tile Matrix Set minimum zoom level (default is 0).
+maxzoom: int
+ Tile Matrix Set maximum zoom level (default is 24).
+title: str, optional
+ Tile Matrix Set title
+id: str, optional
+ Tile Matrix Set identifier
+ordered_axes: list of str, optional
+ Override Axis order (e.g ["N", "S"]
) else default to CRS's metadata
+screen_pixel_size: float, optional
+ Rendering pixel size. 0.28 mm was the actual pixel size of a common display from 2005 and considered as standard by OGC.
+decimation_base: int, optional
+ How tiles are divided at each zoom level (default is 2). Must be greater than 1.
+kwargs: Any
+ Attributes to forward to the TileMatrixSet
TileMatrixSet
+ +feature(tile: Tile, fid: Optional[str] = None, props: Optional[Dict] = None, buffer: Optional[NumType] = None, precision: Optional[int] = None, projected: bool = False) -> Dict
+
Get the GeoJSON feature corresponding to a tile.
+Originally from github.com/mapbox/mercantile/blob/master/mercantile/__init__.py
+tile : Tile or sequence of int + May be be either an instance of Tile or 3 ints, X, Y, Z. +fid : str, optional + A feature id. +props : dict, optional + Optional extra feature properties. +buffer : float, optional + Optional buffer distance for the GeoJSON polygon. +precision: float + If >= 0, geometry coordinates will be rounded to this number of decimal, + otherwise original coordinate values will be preserved (default). +projected : bool, optional + Return coordinates in TMS projection. Default is false.
+dict
+ +classmethod
+
+
+¶from_v1(tms: Dict) -> TileMatrixSet
+
Makes a TMS from a v1 TMS definition
+ Attributes
+
supportedCRS: CRS + Tile Matrix Set coordinate reference system +title: str + Title of TMS +abstract: str (optional) + Abstract of CRS +keywords: str (optional) + Keywords +identifier: str + TMS Identifier +wellKnownScaleSet: AnyHttpUrl (optional) + WKSS URL +boundingBox: TMSBoundingBox (optional) + Bounding box of TMS +tileMatrix: List[TileMatrix] + List of Tile Matrices
+TileMatrixSet
+ +intersect_tms(bbox: BoundingBox) -> bool
+
Check if a bounds intersects with the TMS bounds.
+ +Transform point(x,y) to geographic longitude and latitude.
+ +Return the lower right coordinates of the tile in geographic coordinate reference system.
+tile (tuple or Tile): (x, y, z) tile coordinates or a Tile object we want the lower right geographic coordinates of.
+Coords: The lower right geographic coordinates of the input tile.
+ +matrix(zoom: int) -> TileMatrix
+
Return the TileMatrix for a specific zoom.
+ +The neighbors of a tile
+The neighbors function makes no guarantees regarding neighbor tile +ordering.
+The neighbors function returns up to eight neighboring tiles, where +tiles will be omitted when they are not valid.
+tile : Tile or sequence of int + May be be either an instance of Tile or 3 ints, X, Y, Z.
+list
+ +Get the parent of a tile
+The parent is the tile of one zoom level lower that contains the +given "child" tile.
+tile : Tile or sequence of int + May be be either an instance of Tile or 3 ints, X, Y, Z. +zoom : int, optional + Determines the zoom level of the returned parent tile. + This defaults to one lower than the tile (the immediate parent).
+list: list of Tile
+ +sort_tile_matrices(v)
+
Sort matrices by identifier
+ +Get the tile for a given geographic longitude and latitude pair.
+lng, lat : float + A longitude and latitude pair in geographic coordinate reference system. +zoom : int + The zoom level. +truncate : bool + Whether or not to truncate inputs to limits of TMS geographic bounds.
+Tile
+ +tiles(west: float, south: float, east: float, north: float, zooms: Sequence[int], truncate: bool = False) -> Iterator[Tile]
+
Get the tiles overlapped by a geographic bounding box
+Original code from github.com/mapbox/mercantile/blob/master/mercantile/__init__.py#L424
+west, south, east, north : sequence of float + Bounding values in decimal degrees (geographic CRS). +zooms : int or sequence of int + One or more zoom levels. +truncate : bool, optional + Whether or not to truncate inputs to TMS limits.
+Tile
+A small epsilon is used on the south and east parameters so that this +function yields exactly one tile when given the bounds of that same tile.
+ +Truncate geographic coordinates to TMS geographic bbox.
+Adapted from github.com/mapbox/mercantile/blob/master/mercantile/__init__.py
+ +Return the upper left coordinates of the tile in geographic coordinate reference system.
+tile (tuple or Tile): (x, y, z) tile coordinates or a Tile object we want the upper left geographic coordinates of.
+Coords: The upper left geographic coordinates of the input tile.
+ +Transform geographic longitude and latitude coordinates to TMS CRS.
+ +xy_bounds(*tile: Tile) -> BoundingBox
+
zoom_for_res(res: float, max_z: Optional[int] = None, zoom_level_strategy: str = 'auto', min_z: Optional[int] = None) -> int
+
Get TMS zoom level corresponding to a specific resolution.
+ + +Parameters:
+res
+ (float
)
+ –
+ Resolution in TMS unit.
+max_z
+ (int
, default:
+ None
+)
+ –
+ Maximum zoom level (default is tms maxzoom).
+zoom_level_strategy
+ (str
, default:
+ 'auto'
+)
+ –
+ Strategy to determine zoom level (same as in GDAL 3.2). +LOWER will select the zoom level immediately below the theoretical computed non-integral zoom level. +On the contrary, UPPER will select the immediately above zoom level. +Defaults to AUTO which selects the closest zoom level. +ref: gdal.org/drivers/raster/cog.html#raster-cog
+min_z
+ (int
, default:
+ None
+)
+ –
+ Minimum zoom level (default is tms minzoom).
+Returns:
+int
( int
+) –
+ TMS zoom for a given resolution.
+Examples:
+>>> zoom_for_res(430.021)
+
morecantile utils.
+ + + +_parse_tile_arg(*args) -> Tile
+
Parse the *tile arg of module functions
+Copy from github.com/mapbox/mercantile/blob/master/mercantile/__init__.py
+tile : Tile or sequence of int + May be be either an instance of Tile or 3 ints, X, Y, Z.
+Tile
+TileArgParsingError
+ +Create a GeoJSON feature from a bbox.
+ +Check if a Tile Matrix Set supports quadkeys
+ +Check if a number is a power of 2
+ +meters_per_unit(crs: CRS) -> float
+
Coefficient to convert the coordinate reference system (CRS) +units into meters (metersPerUnit).
+From note g in docs.opengeospatial.org/is/17-083r2/17-083r2.html#table_2: + If the CRS uses meters as units of measure for the horizontal dimensions, + then metersPerUnit=1; if it has degrees, then metersPerUnit=2pa/360 + (a is the Earth maximum radius of the ellipsoid).
+ +point_in_bbox(point: Coords, bbox: BoundingBox, precision: int = 5) -> bool
+
Check if a point is in a bounding box.
+ +to_rasterio_crs(incrs: CRS)
+
Convert a pyproj CRS to a rasterio CRS
+ +