Skip to main content

Toolkits for Geospatial Machine Learning

Project description

Geo ML Toolkits

Toolkits for GeoML workflows

Currently it supports for downloading and processing geospatial data from Open Aerial Map (OAM) and OpenStreetMap (OSM). This toolkit allows you to define an area of interest, download aerial imagery and OSM data, and generate training data for machine learning models.

Installation

To install the GeoML Toolkits, you can use pip:

pip install geomltoolkits

Usage

Python Example

Below is an example of how to use the GeoML Toolkits to download and process geospatial data.

import os
from geomltoolkits.downloader import tms as TMSDownloader
from geomltoolkits.downloader import osm as OSMDownloader

# Define area of interest
ZOOM = 18
WORK_DIR = "banepa"
TMS = "https://tiles.openaerialmap.org/62d85d11d8499800053796c1/0/62d85d11d8499800053796c2/{z}/{x}/{y}"
BBOX = [85.514668, 27.628367, 85.528875, 27.638514]

# Create working directory
os.makedirs(WORK_DIR, exist_ok=True)

# Download tiles
await TMSDownloader.download_tiles(
    tms=TMS,
    zoom=ZOOM,
    out=WORK_DIR,
    bbox=BBOX,
    georeference=True,
    dump=True,
    prefix="OAM"
)

# Download OSM data for tile boundary
tiles_geojson = os.path.join(WORK_DIR, "tiles.geojson")
await OSMDownloader.download_osm_data(
    geojson=tiles_geojson,
    out=os.path.join(WORK_DIR, "labels"),
    dump=True,
    split=True
)

Learn more here

Command Line Usage

if you install the python package it will by default install following commands

  • tmd: tms downloader
  • osd : openstreetmap downloader
  • reg : footprints regularizer

You can see the helper function and shoot your command

You can also use the provided Bash script to run the GeoML Toolkits from the command line. Take a look here

Splitting OSM Data

If the split argument is set to True, the downloaded OSM data will be split based on the tiles defined in tiles.geojson. Each resulting GeoJSON file will be named according to the tile's x, y, and z values.

Installation and Setup

Prerequisites

  • Python 3.10 or higher
  • poetry

Install Poetry

If you don't have poetry installed, you can install it using the following command:

pip install poetry

Install

poetry install

Install lib locally

pip install -e . 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geomltoolkits-0.1.0.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geomltoolkits-0.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file geomltoolkits-0.1.0.tar.gz.

File metadata

  • Download URL: geomltoolkits-0.1.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for geomltoolkits-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b387ad2b858c262bdcdc3968ff31c2104255449be921c2bff78d6277c0ab70ba
MD5 ae6caf9ada2c19ed52c32ef799859cf9
BLAKE2b-256 a3b45a5778293e1bc0a9dbd2fdf2e848e119ebb4290712b80e5442e1cdace752

See more details on using hashes here.

File details

Details for the file geomltoolkits-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: geomltoolkits-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.11.11 Linux/6.8.0-1021-azure

File hashes

Hashes for geomltoolkits-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3097cca519968cb2ad5d29a0355c8e9f638e713a3fc65fff8ad282c6801a2713
MD5 7e9a9043327803f55f3ec6cc48ad7d77
BLAKE2b-256 2c71864d7e83beff6accea76b63b87e3129c1b13085ab95d70b56fdda7bc2d47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page