Linked Questions

26
votes
4answers
39k views

How to write Shapely geometries to shapefiles?

Can someone demonstrate a simple way to write geometry data-structures from shapely into shapefiles? I am particularly interested in polygons with holes and linestrings. It would also be beneficial to ...
9
votes
1answer
9k views

Rasterize a shapefile with Geopandas or fiona - python

I need to rasterize a really simple shapefile a bit like this http://tinyurl.com/odfbanu. Which is just a shapefile coutaining counties in the US.I have seen this previous answer : GDAL RasterizeLayer ...
8
votes
1answer
1k views

Cleaning large Shapefile using v.clean in order to dissolve features?

I'm having real problems cleaning up and reducing the size of a Shapefile which is published by the UK's Environment Agency. It shows the extents of the LiDAR open data they publish: each polygon is ...
2
votes
2answers
318 views

CRS problem between QGIS and fiona / OGR

I have a really annoying problem working with QGIS for visualization and python (fiona / OGR) for the actual operations. I am, by example, doing a simple dissolving operation with fiona. The input is ...
2
votes
0answers
104 views

Dissolving polygon shapefile in Python without ArcPy? [duplicate]

I need to figure out a way to dissolve a polygon in Python using other modules besides ArcPy. I've been using the Python GDAL/OGR for merging shapefiles but I don't see anything to dissolve a polygon. ...
1
vote
1answer
3k views

Dissolve using GDAL/OGR?

I'm trying to dissolve a shapefile according to a field using Python 2.7.10 and I don't want to use ArcPy. Is there any way to do this using GDAL/OGR?
0
votes
1answer
819 views

How to polygonize raster file according to band values?

I want to polygonize a raster by using GDAL in python. I found this webpage below: https://pcjericks.github.io/py-gdalogr-cookbook/raster_layers.html#polygonize-a-raster-band But it creates a polygon ...
0
votes
1answer
1k views

Combining GeoJSON Features

I haven't been able to find a solution with the source so am trying to work on the output file. I have also asked this question on SO I have a large (200MB) geoJSON file that has a lot of complex ...
0
votes
1answer
292 views

Dissolving polygons based on multiple attributes with Python (shapely and fiona)?

I would like to dissolve a polygon shapefile based on two different fields, using Python and open source libraries. I'm just able to dissolve the shapefile using one single field, with Gene's answer ...
0
votes
0answers
64 views

Writing only one of the input vector fields to output vector using Fiona/ Python?

I'm working on a function to perform operations on folders of vector files. These files might have differing attribute fields but there will be a common field between them. I'm using fiona in python ...