{"id":33140473,"url":"https://github.com/ben-nour/geojson-shave","last_synced_at":"2025-12-24T14:18:47.733Z","repository":{"id":230367103,"uuid":"779153433","full_name":"ben-nour/geojson-shave","owner":"ben-nour","description":"A command-line tool for reducing the size of GeoJSON files.","archived":false,"fork":false,"pushed_at":"2025-05-04T09:00:14.000Z","size":47,"stargazers_count":75,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-18T14:19:45.991Z","etag":null,"topics":["geojson","geojson-data","geospatial","geospatial-data","geospatial-processing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ben-nour.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-03-29T06:47:59.000Z","updated_at":"2025-10-31T21:07:46.000Z","dependencies_parsed_at":"2024-04-14T01:42:41.568Z","dependency_job_id":"fb8c9f26-abf8-45ad-a9a1-6dfc82cf3b1d","html_url":"https://github.com/ben-nour/geojson-shave","commit_stats":null,"previous_names":["ben-n93/geojson-shave","ben-nour/geojson-shave"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ben-nour/geojson-shave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-nour%2Fgeojson-shave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-nour%2Fgeojson-shave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-nour%2Fgeojson-shave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-nour%2Fgeojson-shave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ben-nour","download_url":"https://codeload.github.com/ben-nour/geojson-shave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-nour%2Fgeojson-shave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28003727,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["geojson","geojson-data","geospatial","geospatial-data","geospatial-processing"],"created_at":"2025-11-15T12:00:39.034Z","updated_at":"2025-12-24T14:18:47.726Z","avatar_url":"https://github.com/ben-nour.png","language":"Python","funding_links":[],"categories":["Python","Geospatial Library"],"sub_categories":["Python"],"readme":"\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.python.org\"\u003e\n        \u003cimg src=\"https://ben-nour.com/images/geojson_shave.png\" alt=\"GeoJSON-shave\" style=\"width: 60%; height: auto;\"/\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n     \u003ca href=\"https://github.com/ben-nour/geojson-shave/actions/workflows/tests.yml\"\u003e\u003cimg src=\"https://github.com/ben-nour/geojson-shave/actions/workflows/tests.yml/badge.svg\"                 alt=\"Testing\"\u003e\u003c/a\u003e\n     \u003ca href=\"https://github.com/ben-nour/geojson-shave/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/pypi/l/geojson-shave\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/ben-nour/geojson-shave\" \u003e\u003cimg src=\"https://codecov.io/gh/ben-nour/geojson-shave/graph/badge.svg?token=XUMK0D4J9X\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/geojson-shave/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/geojson-shave\" alt=\"versions\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/tmcw/awesome-geojson\"\u003e\u003cimg src=\"https://awesome.re/mentioned-badge.svg\" alt=\"awesome list badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\ngeojson-shave reduces the size of GeoJSON files by:\n\n- Reducing the precision of latitude/longitude coordinates to the specified decimal places.\n- Eliminating unnecessary whitespace.\n- (Optionally) replacing the properties key's value with null/empty dictionary.\n\nThis tool assumes that your GeoJSON file conforms to the [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946).\n\nPlease be aware that when you use fewer decimal places you can lose some accuracy. _\"The fifth decimal place is worth up to 1.1 m: it distinguish trees from each other\"_ - read more [here](https://gis.stackexchange.com/questions/8650/measuring-accuracy-of-latitude-and-longitude).\n\n## Installation\n```\n$ pip install geojson-shave\n```\n\n## Usage\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://pypi.python.org\"\u003e\n        \u003cimg src=\"https://ben-nour.com/images/demo.gif\" alt=\"GeoJSON-shave-demo\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\nSimply pass the file path of your GeoJSON file and it will truncuate the coordinates to 5 decimal places, outputing to the current working directory:\n\n```\n$ geojson-shave roads.geoson\n```\n\nAlternatively you can specify the number of decimal points you want the coordinates truncuated to:\n\n```\n$ geojson-shave roads.geojson -d 3\n```\n\nYou can also specify if you only want certain Geometry object types in the file to be processed:\n\n```\n$ geojson-shave roads.geojson -g LineString Polygon\n```\n\nNote that the -g option doesn't apply to objects nested within Geometry Collection.\n\nAnd to reduce the file size even further you can nullify the property value of Feature objects:\n\n```\n$ geojson-shave roads.geojson -p\n```\n\nOr select a positive list of properties to keep:\n\n```\n$ geojson-shave roads.geojson -kp id,name,level\n```\n\nOutput to a directory other than the current working directory:\n\n```\n$ geojson-shave roads.geojson -o ../data/output.geojson\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fben-nour%2Fgeojson-shave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fben-nour%2Fgeojson-shave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fben-nour%2Fgeojson-shave/lists"}