Skip to content

Module API.raw_data

[Router Responsible for Raw data API ]

Variables

ALLOW_BIND_ZIP_FILTER
CELERY_BROKER_URL
DEFAULT_QUEUE_NAME
EXPORT_MAX_AREA_SQKM
export_rate_limit
redis_client
router

Functions

check_database_last_updated

def check_database_last_updated(

)
Gives status about how recent the osm data is , it will give the last time that database was updated completely

get_countries

def get_countries(
    q: str = ''
)

get_osm_current_snapshot_as_file

def get_osm_current_snapshot_as_file(
    request: starlette.requests.Request,
    params: src.validation.models.RawDataCurrentParams = Body({}),
    user: API.auth.AuthUser = Depends(get_optional_user)
)
Generates the current raw OpenStreetMap data available on database based on the input geometry, query and spatial features.

Steps to Run Snapshot :

  1. Post the your request here and your request will be on queue, endpoint will return as following : { "task_id": "your task_id", "track_link": "/tasks/task_id/" }
  2. Now navigate to /tasks/ with your task id to track progress and result

get_osm_current_snapshot_as_plain_geojson

def get_osm_current_snapshot_as_plain_geojson(
    request: starlette.requests.Request,
    params: src.validation.models.RawDataCurrentParamsBase,
    user: API.auth.AuthUser = Depends(get_optional_user)
)
Generates the Plain geojson for the polygon within 30 Sqkm and returns the result right away

Args: request (Request): description params (RawDataCurrentParamsBase): Same as /snapshot except multiple output format options and configurations

Returns: FeatureCollection: Geojson

get_osm_feature

def get_osm_feature(
    osm_id: int
)

get_specific_country

def get_specific_country(
    cid: int
)