Files
comaps/tools/python/mwm/__init__.py
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

40 lines
1.2 KiB
Python

import os
resource_path = os.path.join(
os.path.dirname(os.path.realpath(__file__)), "..", "..", "..", "data",
)
if not os.path.exists(resource_path):
from data_files import find_data_files
resource_path = find_data_files("omim-data")
assert resource_path is not None
from mwm.feature_types import init as _init
_init(resource_path)
from mwm.feature_types import INDEX_TO_NAME_TYPE_MAPPING
from mwm.feature_types import NAME_TO_INDEX_TYPE_MAPPING
from mwm.feature_types import readable_type
from mwm.feature_types import type_index
from mwm.mwm_interface import GeomType
from mwm.mwm_interface import MapType
from mwm.mwm_interface import MetadataField
from mwm.mwm_interface import Point
from mwm.mwm_interface import Rect
from mwm.mwm_interface import RegionDataField
from mwm.mwm_interface import Triangle
from mwm.mwm_python import get_region_info
from mwm.utils import EnumAsStrEncoder
try:
from mwm.mwm_pygen import MwmPygen as Mwm
from mwm.mwm_pygen import FeaturePygen as Feature
from mwm.mwm_pygen import init as _init
_init(resource_path)
except ImportError:
from mwm.mwm_python import MwmPython as Mwm
from mwm.mwm_python import FeaturePython as Feature