{"id":18441447,"url":"https://github.com/cadu-leite/shapefile_tools","last_synced_at":"2026-05-02T02:37:42.528Z","repository":{"id":141081940,"uuid":"229592600","full_name":"cadu-leite/shapefile_tools","owner":"cadu-leite","description":"centroids, union,  shapefiles","archived":false,"fork":false,"pushed_at":"2020-01-05T03:24:27.000Z","size":635,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T11:27:02.684Z","etag":null,"topics":["gis","ogr","osgeo","python","shapefile"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cadu-leite.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2019-12-22T15:55:05.000Z","updated_at":"2022-02-12T11:58:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"bbf5f1e8-3074-4e2f-a2f6-d64a63cf09e5","html_url":"https://github.com/cadu-leite/shapefile_tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fshapefile_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fshapefile_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fshapefile_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cadu-leite%2Fshapefile_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cadu-leite","download_url":"https://codeload.github.com/cadu-leite/shapefile_tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248932615,"owners_count":21185360,"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","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":["gis","ogr","osgeo","python","shapefile"],"created_at":"2024-11-06T06:37:35.076Z","updated_at":"2026-05-02T02:37:42.475Z","avatar_url":"https://github.com/cadu-leite.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n    The main goal is to have a VERY simple tool to make small operations on shapefiles from the shell\n\n\n\n*********\nCentroids\n*********\n\nScript para gerar \"centroids\" de polígonos a partir de um *shapefile*.\n\nOs atributos da \"feature\" (registro) são copiados dos polígonos para os pontos\n\n\n[en] Generated centroids (points) from polygons *shapefiles* while copying all source attributes to the new sahpefile attributes.\n\n\n[pt] Gera \"centroids\" (pontos) a partir de um *shapefile* de polígonos, copiando todos os atributos para o novo shapefile.\n\n\nUsage:\n\n.. code-block:: bash\n\n    # in your shell\n    $ python3 getplot_centroids -f \u003cpath-to-shapefile.SHP\u003e\n\n\n\nResult\n======\n\nThe result is a new *shapefile* containing 1 layer of points (cetroids)\n\n\n+-------------------------------------------------+--------------------------------------------------+\n| Polygons                                        | Centroids                                        |\n+=================================================+==================================================+\n| .. image:: docs/imgs/shape_file_br_polygons.png | .. image:: docs/imgs/shape_file_br_centroids.png |\n+-------------------------------------------------+--------------------------------------------------+\n\nAll the attibutes are copied too to the new shape\n\n.. image:: docs/imgs/shape_file_br_centroids_attrs.png\n    :alt: QGIs layers: Polygons and Centroids (Points)\n\n\n\n\nUNION\n=====\n\nUnifica Geometrias de Polígonos\n\n.. image:: docs/imgs/union_result.png\n\n\n\n\n\nGDAL on MAC OS Mojave\n====================\n\n\n.. code-block:: bash\n\n    $ brew install gdal\n\non your preferable enviroment\n\n.. code-block:: bash\n\n    $ pip install gdal==\u003csame_version_brew_gdal\u003e\n\n\nthen try\n\n.. code-block:: python\n\n    from osgeo import gdal","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadu-leite%2Fshapefile_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcadu-leite%2Fshapefile_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcadu-leite%2Fshapefile_tools/lists"}