Fiona is OGR's neater API, providing a minimal, uncomplicated Python interface to the open source GIS community's most trusted geodata access library.

learn more… | top users | synonyms

0
votes
2answers
88 views

MultiLineString to separate individual lines using Python with GDAL/OGR, Fiona, Shapely

There are lots of MultiLineString features in a polyline shapefile. The problem is to split these lines into separate individual lines. There is a similar question with PostGIS, but I need to code in ...
1
vote
0answers
20 views

How can I filter a MultiPoint Z / xyz points against a 2d polygon [duplicate]

I would like to filter point data from LIDAR scans (3d) by parcel plot lines (2d). I began with loading the lidar data into microsoft sql and performing a STIntersects between the MultiPoint and the ...
0
votes
1answer
49 views

Change Attirbute Name (Fiona)

I have a shapefile that has 2 attributes named "X" and "Y". I want to change this to "Lon" and "Lat". My (limited) experience tells me that I should read in the original shapefile, preserve the ...
0
votes
1answer
89 views

Writing shapefile with projection defined crashes fiona

I've just started trying to use Fiona to write out shapefiles. I found the example code below, which seems to work fine from shapely.geometry import mapping, Polygon import fiona # Here's an example ...
0
votes
1answer
25 views

Add attributes to an output shapefile schema (via meta)

I am trying to copy the schema of an existing shapefile and add to it in an output shapefile. Somehow I am not getting anywhere with this...though the docs seem very clear (and the download page : ...
0
votes
1answer
104 views

Using Fiona to write a new shapefile from scratch

I am new to Fiona, and trying to wrap my head around reading a csv file and writing out an ESRI shapefile. I have most of it down, but am missing two things; (1) defining the projection/spatial ...
0
votes
1answer
14 views

Fiona error on installation

Receiving the following error when installing Fiona.Does anyone can guide ? error: Unable to find vcvarsall.bat
0
votes
1answer
72 views

Select by attributes within the fiona Python module

Is it possible to select polygons from a shapefile based upon their attributes using the Fiona Python module? I can't seem to find anything in the docs, but it seems like a strange thing not to be ...
2
votes
2answers
161 views

Fiona: get each feature extent (bounds)

I was looking in Fiona to get for each feature its extent but I didn't find how. I have try to far to do something like below import fiona with fiona.open('countries/ne_10m_admin_0_countries.shp', ...
0
votes
1answer
113 views

geopandas error when writing to_file() “ValueError: 'long' is not in list”

I'm having a problem getting the "to_file()" function to work with geopandas import geopandas as gpd f = gpd.read_file('fin.shp') f.to_file('fout.shp') Error Output: ...
0
votes
2answers
108 views

Add joined data in fiona with new schema

Looked more closely at problem on how to add data to a shapefile using fiona. Docs for fiona very unclear on how to do this. I know how to add a schema after that looks very unwieldy and can not ...
0
votes
0answers
12 views

How to create a shapely multipolygon from GADM shapelife? [duplicate]

I am using GADM (http://gadm.org/country) to get shapefiles from administrative areas anywhere in the world (trying with the US at the moment). To read the shapefile I am using Fiona in python. This ...
1
vote
2answers
47 views

Old Windows Installers for python library fiona

Due the the recent bug as presented here for fiona 1.1, i am obliged to use a version of fiona in 1.0.x on windows 8.1. however, i can't find older versions of the installer at here. Are there any ...
2
votes
3answers
132 views

How to get a bbox selection of huge shapefile as GeoJSON?

I have a 4.29 GB Shapefile from which I want to extract features as GeoJSON, defined by a bounding box. This should be as fast as possible, because I want to use it in a web application. My first ...
1
vote
0answers
156 views

Folium GeoJSON Overlay Not Appearing

I am in the midst of a task which involves the clustering of assessment neighborhoods into larger neighborhoods (data link). The goal is build these neighborhoods in a manner consistent with major ...
1
vote
3answers
365 views

How to install Fiona to read Shapefile attributes with OSGeo4W?

I´m developing a plugin in Python and I need to read the shapefile attributes, so I found the Fiona API and dbfpy also but I don't understand how to install these packages because I install the QGIS ...
7
votes
1answer
528 views

Find Nearest Line Segments to Point

Background From a known Point, I require to establish the nearest surrounding "visible perimeter" against a table of MultiLineStrings, as shown on the diagram. I've searched this site with a number ...
0
votes
1answer
210 views

Finding differences between two shapefiles in Python

I'm trying to find out whether there were any border changes between two yearly shapefiles. I've heard a lot of praise for Python's open source GIS tools like Shapely/Fiona, and thought I would try ...
-1
votes
1answer
182 views

Calculating intersection between points and polygon in shapefile

I want accomplish the following using command line python tools only (shapely + fiona) I was wondering if there was a straightforward way for me to do the following: Read in a shapefile (all ...
0
votes
0answers
36 views

How to retain crs data when datum-shifting using ogr2ogr?

I'm converting a shapefile from OSGB36 to WGS84 using ogr2ogr like so: ogr2ogr -f "ESRI Shapefile" new.shp original.shp -s_srs EPSG:27700 -t_srs EPSG:4326 However, the original contains the ...
1
vote
1answer
98 views

Fiona: won't install in Debian7.x-64bits/Python2.7

I need to install Fiona in my Debian7.x-64bits/Python2.7 machine. I already installed GDAL/OGR, pip, virtualenv, and six. I am using Python 2.7 so argparse is also installed. The installation protocol ...
3
votes
1answer
235 views

Fiona - Preffered method for defining a schema

I'm fairly new to the world of python and GIS - so this is definitely a beginner question. I am following Tom Macwrights small guide to Shapely and Fiona, and I noticed that even when opening the ...
0
votes
2answers
295 views

problems with py2exe, shapely and fiona

I have a short python script, called test: import fiona with fiona.open("C:\\Essai_compil", 'r') as l_Obs_shp: for shp in l_Obs_shp: print shp['geometry'] I want to compile with ...
3
votes
2answers
801 views

Creating Shapely MultiPolygons from shape file MultiPolygons

I'm reading a shapefile using Fiona: with fiona.open('data/boroughs/boroughs_n.shp') as source: mpolys = [p for p in source] candidate = polys[0]['geometry'] this gives me a dict containing a ...
1
vote
2answers
388 views

Fiona ImportError: DLL load failed

I've been using the great Shapely/Fiona combo successfully on Linux, but now i need to create a kind of production environment on windows and theres only one problem. When i try to import fiona, i get ...
3
votes
1answer
223 views

Is there an online reference available for the Fiona and Shapely libraries?

Is there an online reference available for the Fiona and Shapely libraries? I'm thinking a real reference, beside the tutorial-style documentation: http://toblerity.github.io/shapely/manual.html ...
1
vote
1answer
1k views

Find and replace unicode character in a shapefile

I've found several example of script and blog posts on working with unicode characters, but I haven't been able to make anything works so far... It's a little frustrating I have a shapefile encoded ...
3
votes
1answer
965 views

better way to duplicate a layer using ogr in python?

I'm splitting a large shapefile into many smaller ones using ogr. I'd like to just copy all of the field and layer config information from the original. Here's how I'm doing it now: src = ...
6
votes
2answers
810 views

Error getting text attributes from shapefile with python / pyshp

I have a shapefile, containing only points in XY-coordinates and a string attribute for each point. I would like to read the coordinates and the attribute for postprocessing in python, but can't get ...
7
votes
2answers
2k views

Generating GeoJSON with Python

Hi I want to programatically create a GeoJSON file using polygons from a shapefile but adding attributes from my own application. This is easily done for a shapefile: def ...
21
votes
9answers
2k views

How to easily shift all features in a vector dataset?

Let's say that I put together a Shapefile and all the features have their vertices shifted by a constant amount. What's the easiest way of shifting all the features (hence the (x,y) position of their ...
5
votes
2answers
835 views

Python: How to export Shapely objects to DXF file

Using shapely package for Python how to export the resulting shapely objects such as buffer to a DXF file?
8
votes
4answers
1k views

Is there a mapping between OGR and python data types?

I'm writing a shapefile using OGR in python, creating fields on-the-fly from a python data source. Creation of a new field requires an OGR data type, is there a mapping between OGR and python data ...