Skip to content

citizen4371/geocalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

geocalc - HTTP service for geometric calculations

Currently only calculates intersection over union of two bounding boxes.

Requirements

  • Python 3.7+

  • pip

  • git

  • setuptools (optional)

Installation

First, clone this repository.

$ git clone git@github.com:citizen4371/geocalc.git
$ cd geocalc

Service can be started as a python module:

$ python -m geocalc

You can check that it's working it by visiting http://localhost:8000/

Docker

Dockerfile is provided as well, you can build docker image:

$ docker build -t geocalc .

Then start the container:

$ docker run -d --name geocalc -p 8000:8000 geocalc

Usage

When the service is running, swagger api documentation is available at /docs endpoint.

The only calculation endpoint currently available is /calculations/iou which performs intersection over union.
Coordinates of the two boxes should be passed to it as query params (2 lists of 4 float values):
?box1=[top-left x]&box1=[top-left y]&box1=[bottom-right x]&box1=[bottom-right y]&box2=[top-left x]&box2=[top-left y]&box2=[bottom-right x]&box2=[bottom-right y]

Convention for positive x-axis direction is left to right, y-axis - bottom to top.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published