Usage

Features in polygons

  • It adds the tag _where and fields to the features according in which polygons they are. This works with aws - s3 uri.
COMMAND REQUIRED DESCRIPTION
--geojson_in_polygon yes Path to GeoJSON polygons.
--geojson_in_features yes Path to GeoJSON features.
--tags_polygon no Fields in geojson_in_polygon to add to the features. Default value: ""
--mode_filter yes Filtering mode:
- include : includes all the geometry of feature.
- include__centroid: includes the centroid of the feature.
- intersect__<% area> : (polygons) includes a minimum area of the feature (1, 10, 20, 30, 40, 50, 60, 70, 80, 90).
--mode_output yes Output mode:
- merged: all features in one file.
- by_location: features in two files, inside and outside.
- by_polygon_tag: features in multiple files, outside and other by tag.
--geojson_out_features yes Path to GeoJSON output.

Return:

GeoJSON files - Different GeoJSON files according the output mode that contains features inside and outside polygons.

Command line:

docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:python.latest geo \
    features_in_polygons \
    --geojson_in_polygon=<INPUT_GEOJSON>  \
    --geojson_in_features=<INPUT_GEOJSON> \
    --tags_polygon=tag_1 \
    --tags_polygon=tags_2 \
    --mode_filter=include \
    --mode_output=by_polygon_tag \
    --geojson_out_features=<OUTPUT_GEOJSON>