Usage

Rename a key

  • It renames one or more attributes of the features in the GeoJSON file.
COMMAND REQUIRED DESCRIPTION
--geojson_input yes Path to GeoJSON to process.
--props yes Attributes to rename. This can be multiple and in the following format: old_key=new_key
--geojson_output yes Path to GeoJSON output.

Return:

GeoJSON file - It contains features with the new names of the attributes.

Command line:

docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:python.latest geo \
    renamekey \
    --geojson_input=<INPUT_GEOJSON> \
    --props=old_key_1=new_key_1 \
    --props=old_key_2=new_key_2 \
    --geojson_output=<OUTPUT_GEOJSON>

Use case:

  • Rename the attribute dc_has_pattern_school to pattern_school in each feature in the input file.

Image