Linked Questions

25
votes
2answers
80k views

How to read a shapefile in Python?

My question is an extension of Vertical lines in a polygon shapefile. Kindly refer to that question first. What you will see is a method of generating vertical lines with respect to the bounding box,...
15
votes
3answers
11k views

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

I have been trying to create a function that does basically the same thing that the QGIS "dissolve" function. I thought it would be super easy but well apparently not. So from what I have gathered ...
10
votes
2answers
13k views

How to create polygon shapefile from a list of coordinates using python gdal/ogr?

I am trying to create a polygon shapefile from a list of coordinates using open source python tools. The following is what I have so far which was hacked together from the Python GDAL/OGR Cookbook and ...
1
vote
3answers
572 views

Python: best practise to ceate a large shapefile

What is the best approach to create a create a very large shapefile (close to the max of 2GB) using python? Best approach means: robust and fast. Above all fast.
2
votes
1answer
6k views

How to create line/polygon shapefiles from geojson using gdal in Python?

I have put this together after reading How to create polygon shapefile from a list of coordinates using python gdal/ogr?, and How to write Shapely geometries to shapefiles? I am attempting to read a ...
1
vote
1answer
3k views

Writing a shapefile using OGR, from Shapely Geometry - No feature added Error

I am trying to write a shapefile from a Shapely geometry using PyQGIS in the QGIS 2.6.0 console. Lines of code before the OGR method to write shapefile: extnt = poly.extent() # gives a QtRectangle ...
3
votes
1answer
1k views

How best to use shapely to write a dict to a shapefile

I have created a shapely object (i.e. the_pt) for my Points & Multipoints to do a buffer analysis against another shapely object (i.e. city_pt) using: return_shapes = [] for pt in points: ...
0
votes
1answer
380 views

Getting CRS to export shapely polygon to shapefile

I am trying to export a shapely polygon to a shapefile. I have tried this, but the CRS is missing, when I try to import it in to QGIS. The shapely polygon is from this OSMNX example but edited to ...
0
votes
1answer
103 views

Is there a python-module to convert data to a Shapefile (w/o GIS)?

Input data can be excel, text, whatever. I would like to produce shapefiles from data on a computer without GIS installed. Is there anything out there? Fiona seems to be such a module. Are there any ...
0
votes
1answer
76 views

Creating file to analyze geometrically? [closed]

I have sets of lat/lon points for vortices in the ocean, and what I want to do is draw curves around them (they are roughly elliptical), and determine their eccentricity and orientation as they move ...
0
votes
0answers
31 views

Coordinate System shows up incorrect after converting a shapely object to a shapefile [duplicate]

I am trying to convert a simple point object created using shapely to a shapefile using fiona as instructed in this post. I pretty much followed line by line except that I changed the crs as I need it ...