A class with a static method to start map export tasks.
| 514 | # pylint: enable=unused-argument |
| 515 | |
| 516 | class map: |
| 517 | """A class with a static method to start map export tasks.""" |
| 518 | |
| 519 | def __init__(self): |
| 520 | """Forbids class instantiation.""" |
| 521 | raise AssertionError('This class cannot be instantiated.') |
| 522 | |
| 523 | # Disable argument usage check; arguments are accessed using locals(). |
| 524 | # pylint: disable=unused-argument |
| 525 | @staticmethod |
| 526 | def toCloudStorage( |
| 527 | image: _arg_types.Image, |
| 528 | description: str = 'myExportMapTask', |
| 529 | bucket: str | None = None, |
| 530 | fileFormat: str | None = None, |
| 531 | path: str | None = None, |
| 532 | writePublicTiles: bool | None = None, |
| 533 | maxZoom: int | None = None, |
| 534 | scale: float | None = None, |
| 535 | minZoom: int | None = None, |
| 536 | region: Any | None = None, |
| 537 | skipEmptyTiles: bool | None = None, |
| 538 | mapsApiKey: str | None = None, |
| 539 | bucketCorsUris: list[str] | None = None, |
| 540 | priority: int | None = None, |
| 541 | **kwargs, |
| 542 | ) -> Task: |
| 543 | """Creates a task to export an Image as a pyramid of map tiles. |
| 544 | |
| 545 | Exports a rectangular pyramid of map tiles for use with web map |
| 546 | viewers. The map tiles will be accompanied by a reference |
| 547 | index.html file that displays them using the Google Maps API, |
| 548 | and an earth.html file for opening the map on Google Earth. |
| 549 | |
| 550 | Args: |
| 551 | image: The image to export as tiles. |
| 552 | description: Human-readable name of the task. |
| 553 | bucket: The destination bucket to write to. |
| 554 | fileFormat: The map tiles' file format, one of 'auto', 'png', |
| 555 | or 'jpeg'. Defaults to 'auto', which means that opaque tiles |
| 556 | will be encoded as 'jpg' and tiles with transparency will be |
| 557 | encoded as 'png'. |
| 558 | path: The string used as the output's path. A trailing '/' |
| 559 | is optional. Defaults to the task's description. |
| 560 | writePublicTiles: Whether to write public tiles instead of using the |
| 561 | bucket's default object ACL. Defaults to True and requires the |
| 562 | invoker to be an OWNER of bucket. |
| 563 | maxZoom: The maximum zoom level of the map tiles to export. |
| 564 | scale: The max image resolution in meters per pixel, as an alternative |
| 565 | to 'maxZoom'. The scale will be converted to the most appropriate |
| 566 | maximum zoom level at the equator. |
| 567 | minZoom: The optional minimum zoom level of the map tiles to export. |
| 568 | region: The lon,lat coordinates for a LinearRing or Polygon |
| 569 | specifying the region to export. Can be specified as a nested |
| 570 | lists of numbers or a serialized string. Map tiles will be |
| 571 | produced in the rectangular region containing this geometry. |
| 572 | Defaults to the image's region. |
| 573 | skipEmptyTiles: If true, skip writing empty (i.e. fully-transparent) |
no outgoing calls
no test coverage detected