Geokit is a command-line interface (CLI) tool written in javascript, that contains all the basic functionalities for measurements, conversions and operations of geojson files.
Geokit is installed with docker, due several functionalities from other repositories like awesome-geojson were incorporated to Geokit functionalities.
git clone git@github.com:developmentseed/geokit.git
cd geokit/
docker-compose build
alias geokit='docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit'
alias geokit='docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit'
docker-compose run geokit
or
cd geokit/
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest bash
geokit area input.geojson
geokit bbox input.geojson
geokit bbox2fc --bbox="0, 0, 10, 10" > output.geojson
geokit buffer input.geojson --unit=meters --radius=10000 > output.geojson
geokit fc2square input.geojson --radius=40 > output.geojson
geokit clip input.geojson boundary.geojson > output.geojson
geokit distance input.geojson
geokit line2polygon input.geojson > output.geojson
geokit fc2frows input.geojson > output.json
geokit fc2csv input.geojson > output.csv
geokit addattributefc input.geojson --prop "type=hospital" > output.geojson
geokit filterbyprop input.geojson --prop building=* > output.geojson
: Could be Polygon, LineString, etc.
geokit filterbygeometry input.geojson --geos <geometry_types> > ouput.geojson
geokit countfeature input.geojson --prop building=*
geokit featurearea input.geojson > output.geojson
geokit featurebbox input.geojson > output.geojson
geokit featuredistance input.geojson > output.geojson
geokit countbysize input.geojson --psize=1000
--key: Could be any of attribute, which is in both files.
geokit difference <file1.geojson> <file2.geojson> --key=school_code
geokit keepattributes <file1.geojson> --keys="id,power,timestamp" > output.geojson
geokit renamekey <file1.geojson> --key="idBuilding>id" > output.geojson
geokit duplicatefeatures <file1.geojson> --key=id
geokit point2tile <file.geojson> --zoom=17 --buffer=0.2 --copyattrs=true > tiles.geojson
geokit tilecover polygon.geojson --zoom=15 > tiles.geojson
geokit deletenulls input.geojson > output.geojson
geokit jsonlines2geojson input.json > output.geojson
geokit centroid input.geojson > output.geojson
geokit removeactionosm input.osm output.osm
user, version, timestamp, changeset and uid. So it returns a new OSM file without these attributes. geokit osm2new input.osm output.osm
geokit splitbyzoom input.geojson --folder=foldername --zoom=10
Functionalities outside Geokit into a Docker image.
geojson-merge input1.geojson input2.geojson > output.geojson
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit cvat-xml2csv --full=ok imput.xml
The comand line will filter all the boxes on each row in each image.
Note
Remove --full=ok from the comand line to filter only the images.
Add all the images that you want to downsize in a folder, supports jpg files and the files will be resized to 512X512.
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit downsized-imgs <FOLDER>
The output directory: <FOLDER>-downsized.
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit cvat-npz2xml <labelMaker npz file>.npz --imgPath=<path of the images in CVAT> --imgLabel=tower
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit cvat-xml2npz <cvat xml dump file>.xml
It will return a file with the same xml file name with npz extension.
docker run --rm -v ${PWD}:/mnt/data developmentseed/geokit:latest geokit cvat-count-tags imput.xml
osmtogeojson input.osm > output.geojson
geojsontoosm input.geojson > output.osm
geojson2poly input.geojson output.poly
geojson-pick PROPERTYNAME1 < input.geojson > output.geojson
geokit dosm -d ayac.geojson --api=overpass --zoom=16
$ claude mcp add geokit \
-- python -m otcore.mcp_server <graph>