A program made in python that matches locations to their corresponding regions and vice versa - to each location the appropriate regions it applies to.
Option | Required | Description |
---|---|---|
--mode |
NO | Set the mode of program. Use 1 for regions with locations or 2 for locations with regions. If not specified, selects 1 |
--regions |
YES | Path to the regions file in JSON format. |
--locations |
YES | Path to the locations file in JSON format. |
--output |
YES | Path to the output file. |
Example usage: python main.py --mode=1 --regions=input/regions.json --locations=input/locations.json --output=output/results.json
[
{
"name": "<unique identifier>",
"coordinates": [<longitude>, <latitude>]
},
// more locations
]
[
{
"name": "<unique identifier>",
"coordinates": [
[[<longitude>, <latitude>], [<longitude>, <latitude>]],
// more polygons
] - array of polygons, where each polygon is an array of coordinates.
},
// more regions
]
[
{
"region": "<region identifier>",
"matched_locations": [
"<location identifier>",
"<location identifier>",
]
},
// more regions
]
[
{
"location": "<location identifier>",
"matched_regions": [
"<region identifier>",
"<region identifier>",
]
},
// more locations
]