Fiona is OGR's neat, nimble, no-nonsense API

learn more… | top users | synonyms

0
votes
0answers
18 views

Why Does Fiona Crash Python When Creating an Output File?

I've basically followed the Fiona online manual verbatim to write an output file but my code crashes when I call Fiona.open() to create said output file. Traceback reports that the reason for the ...
3
votes
2answers
138 views

Can this Be Recoded to Be More Efficient with Respect to Processing Time?

I'm very new to GIS but have been asked to parse through any given ESRI GDB file-folder without using any ESRI product. I've been trying to focus on using Fiona and Shapely as these seem to be ...
0
votes
0answers
23 views

How to do a Python / Fiona / Shapely equivalen to an ESRI ArcPy SpatialJoin?

I'm a GIS noob, but I am trying to learn as quickly as I can. Please bear with me. How can I identify what structures from one layer are WITHIN in some body of water in another layer? My problem ...
2
votes
1answer
40 views

Plot shapefile on top of raster using plot and imshow from matplotlib

I need to plot a shapefile on top of a raster. I would like to use the python package rasterio and some combination of fiona or geopandas to load the shapefile. I found an example in the rasterio ...
1
vote
2answers
29 views

Troubleshooting File Geodatabase Parsing in Python / Fiona?

I'm a noob, so please bear with me. I have a test GDB file-folder that I have been able to verify that it does contain features through using some of ESRI's tools. The code I have seems simple ...
1
vote
1answer
36 views

How to do a Spatial Join after opening a GDB file with Fiona?

After I successfully open up an ESRI GDB file/folder with Fiona, what open-source Python package should I use to do a spatial join? I was told Shapely is not the appropriate package for this. I am ...
3
votes
2answers
72 views

How to add support for FileGDB (Esri file gdb API) driver in fiona?

There has been a tons of questions on that but none of them solved my problem. I have a machine with: Windows 7 x64 Python 3.4.3 x64 gdal installed: gdalinfo --version --> GDAL 1.11.4, released ...
1
vote
1answer
31 views

How to Parse Through a ESRI GDB File/Folder After Opened with Fiona?

I should point out that I'm a noob. I'm playing around with making a python gui app and believe I have opened an ESRI GDB file/folder using: with fiona.open(GDBPath, 'r') as sourceGeoData What I'd ...
0
votes
1answer
26 views

Fiona does not specify CRS

I try to write a geoJSON from a shp with the fiona package. Works, but fiona does not include the CRS information. with fiona.open(path) as shp: takeCRS = shp.crs takeSCHEMA = shp.schema ...
1
vote
3answers
49 views

Fiona error adding property to shapefile

I'm getting the following error when trying to add a property to a .shp file using fiona in python: Traceback (most recent call last): File "<ipython-input-38-5f04c3b56601>", line 17, in ...
2
votes
1answer
44 views

Drivers of Fiona

What drivers does the python package fiona have? When I check the manual it says [...] and the possible formats are enumerated in the fiona.drivers list. However, when I type in python from fiona ...
1
vote
1answer
38 views

How to find the area with most intersection for buffer regions?

Find the area with the most intersection This question relates to previous question asked - How to find the intersection areas of overlapping buffer zones in single shapefile?. I tried to ...
2
votes
1answer
110 views

How to find the intersection areas of overlapping buffer zones in single shapefile?

Find the intersections of the buffer zones I found an example where they tried finding the intersection of two different shapefiles -Intersect Shapefiles using Shapely. I've tried to adapt my code to ...
0
votes
1answer
29 views

Fiona and Pyproj incorrect transformation (feet to meter)

I am trying to reproject a shapefile from EPSG:2229 (NAD83 / California zone 5 (ftUS)) to EPSG:2163 (US National Atlas Equal Area (meters)). Below is the code that does this transformation for a ...
2
votes
1answer
92 views

Remove features inside a feature in shapefile using python (UNION, CONTAINS methods)

I have created a shape file from raster. The shapefile was generated using contours detection. I am in the process of automating feature detection using python and open source libraries such as ...
1
vote
1answer
48 views

Select by attribute using fiona

with fiona.open(constants.file_combined, 'r') as source: filtered = filter(lambda f: f['properties']['NAME'] == name_dm1, source) # **source.meta is a shortcut to get the crs, ...
1
vote
1answer
34 views

Available Python client libraries for WFS transactions?

I am looking for a Python module to allow me to use WFS-T. Everything I found so far only supports getting data out via WFS, I need to INSERT and UPDATE. owslib does not support WFS transactions ...
2
votes
3answers
106 views

I have an existing attribute table that I'd like to add values to the fields within it while preserving the geometry, how can I do this?

I've tried to use fiona and shapely and ogr, but the tutorials seem to be insufficient to describe how to do such a seemingly simple task. In arcpy this could be done simply with an update cursor. ...
0
votes
0answers
14 views

Installing fiona on windows 7 [duplicate]

I'm trying to install/use fiona with python 2.7 under windows 7. On import I get the error shown in the following screenshot. Has anyone seen this before? Apologies if this is the wrong forum for ...
0
votes
1answer
40 views

importing fiona before shapely raising geos-related OSError

I ran into an issue where the order of imports for fiona and shapely caused the following geos error below which happens when i import fiona before shapely. If I do the reverse all is fine. Must be ...
0
votes
1answer
62 views

Cut a linear feature according to the directions or azimuths

I have a shapefile linear that contains a single items as in the image and I want to divide it into several section respecting the azimuth and the line direction. i have this code : import os ...
5
votes
2answers
236 views

intersecting two shapefiles from Python or command line

I'm new to working with geo data and trying to address a similar question to the one posted here. Using command line and/or shapely/fiona, in the most efficient and elegant way. I created two ...
1
vote
0answers
48 views

How do I create a raster file from a geopandas dataframe storing lats, longs, values, and geometries

From a text file with time, lat, long, and cf values, I create a pandas dataframe (cf_df). Then I use the lat, long values to create a geoseries and create a geopandas dataframe from the original ...
1
vote
1answer
102 views

fiona ValueError: invalid literal for int() with base 10: 'str'

Why below code does not work- import fiona from fiona.crs import from_epsg my_schema = {'geometry': 'Point', 'properties': {'mean_in': 'str', 'total_h1': 'str', 'total_h2': 'str', 'LOS': 'str', ...
0
votes
0answers
91 views

Calculating distances with lat/long in decimals and WGS 84

I need to calculate the distance between points of two different datasets, once with locations of towns, the other with locations of dams. Both are located in different countries in Africa. The more ...
1
vote
0answers
58 views

Creating spatial layer from MS SQL Server table?

I have a table in MSSQL that I am trying to use to create a spatial layer from using the QgsVectorLayer function to load the table as a layer, and then using Fiona to create a shapefile but I am ...
-1
votes
1answer
86 views

fiona writing geometry into shapefile problem [closed]

Context: I use lxml library that generates some dictionary (infact it is xml attribute dictionary) from xml and i am trying to write these into a shapefile-i.e. get one element-attribute from xml ...
2
votes
1answer
143 views

What is a convenient way to write OSM data to a .shp file in python

I wish grab OSM data that is within a specified bounding box and matches specific key/value combinations. I then want to write this to a .shp file for further processing using, probably, the QGIS api. ...
0
votes
2answers
214 views

Python buffer points and clip with line-segment (OS Open Roads in BNG) [duplicate]

I have an array of points (in latitude, longitude coordinates) which I would like to buffer and dissolve (into a polygon) and then intersect the Ordnance Survey Open Roads (projected in BNG) with that ...
1
vote
1answer
85 views

Arc-node topology data structures in Python GIS packages

I am looking at using the traditional arc-node topological data structure to make some spatial data analysis more efficient. I would like to avoid reinventing the wheel. Is there an implementation in ...
0
votes
0answers
100 views

find pairs of near features with geopandas, fiona, gdal etc

I have a feature class of points, a few thousands I have now, but I expect to deal with hundreds of thousands of points. I would like find pair of points that is within a specific distance. The ...
0
votes
0answers
569 views

GeoPandas save to shapefile issue: Unable to open EPSG support file

When I try to use to_file() to write a GeoPandas GeoDataFrame to a shapefile I get the following error. df3.to_file('~/Desktop/testout.shp', driver = 'ESRI Shapefile'); ERROR:Fiona:OGR Error 4: ...
2
votes
2answers
70 views

How to successfully do “nested” looping over a Fiona collection

I wrote some code that basically loops over all features in a shapefile with Fiona in Python, doing some things, calculating some things, etc. I found that it would exit the for loop prematurely, ...
-2
votes
1answer
84 views

Very Large Coordinates when Reading Shapefile using Python

When using Python anad fiona package to read a shapefile of Boston, I am getting very large values in the tens of thousands. Why is this? # Import Boston shapefile shapefilename = 'ZIPCODES_NT_POLY' ...
3
votes
1answer
586 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 ...
0
votes
2answers
119 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 ...
6
votes
2answers
2k views

Dissolve 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 ...
0
votes
1answer
71 views

How to update an existing GeoJSON with Fiona

With the code below I can create a new GeoJSON and add data to it: data =[(LINESTRING (-98.98234 19.38234, -98.990341 19.342345, -98.992449 19.378621, -98.991299 19.378233, -98.992349999 19.377381), ...
2
votes
1answer
729 views

Plot points on map using Fiona and/or Shapely

I have written a parser in Python that extracts the coordinates out of a GPX file and I would like to view those points on a map. I have done a little research and it seems like either Fiona or ...
1
vote
1answer
303 views

differences in distance between shapely and geopy

I am getting totally different distances from shapely and geopy. On one hand - it makes total sense, shapely measures on a plane and geopy measures on a spheroid. But the differences are so dramatic, ...
1
vote
0answers
114 views

Reading/writing utf-8 encoded data using Fiona?

So I have a 'cpg' file with my 'in_file' shapefile data (definitely set to 'utf-8'). I was using 'meta' to create the same schema/crs as 'in_file'...though it runs, my text fields are borked on ...
1
vote
1answer
411 views

Problems with Geometry collections. (Fiona: write output of Multipoints and Points)

Updated: I am getting the following error on this function: ValueError: Record's geometry type does not match collection schema's geometry type: 'Point' != 'MultiPoint' The problem is that I have ...
0
votes
2answers
747 views

How to measure distance using shapely

Reading the documentation...it looks like I should have this right, but I don't. The example is: Point(0,0).distance(Point(1,1)) 1.4142135623730951 Based on this example I wrote this block ...
1
vote
1answer
126 views

How to call 'shapely' .coords on a fiona filtered list?

I have to filter a shapefile by attribute then compare it to another shapefile using .coords...however I am a bit perplexed how to do this as my filter is returning a list type...(and .coords requires ...
2
votes
1answer
167 views

Error with Python Script using Shapely

My professor gave us a basic Python script that demonstrated how Shapely works with a shapefile, however it's not working for me. Here is the code: from shapely.geometry import mapping, shape from ...
0
votes
1answer
479 views

Shapefile projection for Matplotlib Basemap

Preface: First time working with GIS data. I'm using python's Basemap library for overlaying data on maps. The tutorial I'm using includes a shapefile for London (london_wards.shp). I use the ...
0
votes
3answers
2k views

Only read specific attribute columns of a shapefile with Geopandas / Fiona

Having geopandas installed in my Python environment, I can read a shapefile into a geodataframe with In: import geopandas as gpd myShapefile = gpd.read_file(path_to_my_shapefile) print(myShapefile) ...
1
vote
1answer
316 views

Multi-part Geometrical Intersection error

I am working with intersection of polygon and line segments (continued from a previous question). When a Line intersects with a Polygon, the result is a LineString; When a LineRing intersects with ...
6
votes
1answer
1k views

Line vs. Polygon Intersection Coordinates

I am working with Python, Shapely and Fiona... Is there any way where I can give in an input of a line shapefile and a polygon shapefile, and get a result of the intersection points and their ...
1
vote
0answers
72 views

I can't get fiona to write while copying shapefile

I am trying to debug a function and have narrowed down the issue to a problem with my attempt to use fiona write. After going through the many online resources, I can't seem to find my problem, ...