Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 974 Bytes

File metadata and controls

34 lines (22 loc) · 974 Bytes

Scripts

generatePolygon

./../scripts/generatePolygon.py

Usage

generatePolygon.py <latitude> <longitude> [FieldName]

Mandatory args: latitude, longitude

Optional arg: FieldName; if not provided, will be constructed using lat/lon

Example

python generatePolygon -101.162714000941 41.0464218322353 field-A

Relevant details

  1. For each lat/lon, the script would generate a unique file containing the polygon - meaning it'd be interpreted as an independent field containing 1 subfield
  2. There is an option to provide a field/file name as input besides the lat/lon - if it's not provided, the code uses the lat/lon to generate a unique hash and uses that as the field/file name.
  3. Radius is preset to 1000 meters and number of points in the polygon is preset to 20 - either/both can be changed in code.

Library dependencies

pip install geog
pip install shapely