https://github.com/cadu-leite/shapefile_tools
centroids, union, shapefiles
https://github.com/cadu-leite/shapefile_tools
gis ogr osgeo python shapefile
Last synced: about 1 month ago
JSON representation
centroids, union, shapefiles
- Host: GitHub
- URL: https://github.com/cadu-leite/shapefile_tools
- Owner: cadu-leite
- Created: 2019-12-22T15:55:05.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-05T03:24:27.000Z (over 5 years ago)
- Last Synced: 2025-02-16T11:27:02.684Z (3 months ago)
- Topics: gis, ogr, osgeo, python, shapefile
- Language: Python
- Homepage:
- Size: 620 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
Awesome Lists containing this project
README
The main goal is to have a VERY simple tool to make small operations on shapefiles from the shell
*********
Centroids
*********Script para gerar "centroids" de polígonos a partir de um *shapefile*.
Os atributos da "feature" (registro) são copiados dos polígonos para os pontos
[en] Generated centroids (points) from polygons *shapefiles* while copying all source attributes to the new sahpefile attributes.
[pt] Gera "centroids" (pontos) a partir de um *shapefile* de polígonos, copiando todos os atributos para o novo shapefile.
Usage:
.. code-block:: bash
# in your shell
$ python3 getplot_centroids -fResult
======The result is a new *shapefile* containing 1 layer of points (cetroids)
+-------------------------------------------------+--------------------------------------------------+
| Polygons | Centroids |
+=================================================+==================================================+
| .. image:: docs/imgs/shape_file_br_polygons.png | .. image:: docs/imgs/shape_file_br_centroids.png |
+-------------------------------------------------+--------------------------------------------------+All the attibutes are copied too to the new shape
.. image:: docs/imgs/shape_file_br_centroids_attrs.png
:alt: QGIs layers: Polygons and Centroids (Points)UNION
=====Unifica Geometrias de Polígonos
.. image:: docs/imgs/union_result.png
GDAL on MAC OS Mojave
====================.. code-block:: bash
$ brew install gdal
on your preferable enviroment
.. code-block:: bash
$ pip install gdal==
then try
.. code-block:: python
from osgeo import gdal