Source code for mirrorworld.naver.panorama

from __future__ import annotations

from dataclasses import dataclass
from datetime import datetime
from enum import IntEnum
from typing import List, Optional

import numpy as np

from mirrorworld.dataclasses import Link, Size
from .util import build_permalink


[docs] class PanoramaType(IntEnum): """ The panorama type. Most identifiers are taken directly from the source. """ ALL = 0 #: AIR = 1 #: DRONE = 2 #: CAR = 3 #: BICYCLE = 4 #: MUSEUM = 5 #: PENSION = 7 #: PENSION_FRONT = 8 #: INDOOR = 10 #: INDOOR_HIGH = 11 #: UNDERWATER = 12 #: TREKKER = 13 #: NO_MESH_EQUIRECT = 14 """ A panorama which can be fetched in equirectangular projection. """ MESH_EQUIRECT = 15 """ An Apple-like panorama which can be fetched in equirectangular projection and for which a 3D mesh is available. """ SPACE = 20 #: UNKNOWN = 99 #: INDOOR_3D = 100 #:
[docs] @dataclass class Overlay: """URLs to the images from which the overlay hiding the mapping car is created.""" source: str """URL to the texture.""" mask: str """URL to the mask."""
[docs] @dataclass class Neighbors: """Nearby panoramas.""" street: List[NaverPanorama] """Nearby panoramas taken at street level.""" other: List[NaverPanorama] """Nearby aerial or underwater panoramas."""