Linked Questions
14 questions linked to/from Writing Shapely geometries to shapefiles
69
votes
2
answers
208k
views
Reading shapefile in Python [closed]
My question is an extension of Vertical lines in a polygon shapefile.
There you will see a method of generating vertical lines with respect to the bounding box, at user-defined spacing. I understand ...
19
votes
3
answers
17k
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 ...
15
votes
3
answers
21k
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 ...
2
votes
3
answers
1k
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
1
answer
10k
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
1
answer
4k
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 ...
1
vote
1
answer
3k
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 work ...
4
votes
1
answer
3k
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:
...
4
votes
1
answer
949
views
Finding the centroid of every pixel in a raster Python
I am trying to get the centroid of every pixel in a aviris hyperspectral image (a raster) but my results are not quite as expected.
The centroids don't seem to line up with the center of every pixel, ...
1
vote
2
answers
935
views
How to convert from OGR geometries (with M-values) to shapely geometries (without M-values)?
Main question
Suppose I have a few OGR geometries, all of them containing M-values.
Is there a generic solution that allows me to translate them to Shapely geometries without M-values?
Shapely and M-...
1
vote
1
answer
403
views
Is it possible to create a shapefile from a geometry with Python?
I use a GEE asset to describe the geometry of a country. I can transform this geometry into different format such as shapely.geometry or GeoJSON:
asset = 'users/bornToBeAlive/aoi_PU'
aoi = ee....
0
votes
1
answer
148
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
1
answer
120
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
0
answers
40
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 ...