Skip to content

Python CLI tool to project polygons from an image (e.g. object bounding boxes) to GIS (shapefile), and projection in the other direction, GIS to image coordinates. Batch functionality also implemented.

Notifications You must be signed in to change notification settings

WildFire-ML/Image-GIS-Projection

 
 

Repository files navigation

Image-GIS-Projection

Python CLI tool to project polygons from an image (e.g. object bounding boxes) to GIS (shapefile), and projection in the other direction, GIS to image coordinates. Batch functionality also implemented.

Link to orthomosaic for provided examples

Usage

Required non-standard python packages: rasterio, geopandas, pyproj, numpy, yaml, shapely, pandas, pprint, scikit-image

python main.py --config_file config.yml --img2gis --batch

  • CFG_PATH: path to config file
  • --img2gis: project image coordinates to shapefile
  • --gis2img: project opposite direction
  • `--batch: flag to toggle batch processing

Example for single-image projection of image coordinates to GIS. python main.py --config_file config.yml --img2gis --batch

Config File

Settings can be changed in config.yml file, default values are provided for the provided examples. Note that provided DSM should have altitude in the same reference system (geodetic/ellipsoidal) as in the exif headers of the images OR the cameras.csv.

cameras.csv can be obtained for a flight from Agisoft and helps provide more precise projection, but can be omitted if not available (leave blank in config file).

About

Python CLI tool to project polygons from an image (e.g. object bounding boxes) to GIS (shapefile), and projection in the other direction, GIS to image coordinates. Batch functionality also implemented.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%