Questions tagged [fiona]
Fiona is OGR's new, neat, Pythonic API
308 questions
1
vote
1
answer
81
views
"builtins.ValueError: year 0 is out of range" error while iterating through features in layer with Fiona
I am getting the error:
builtins.ValueError: year 0 is out of range
while attempting to iterate through a layer's features using Python (3.12) and fiona. GDAL 3.11.4. My searches indicate that this ...
0
votes
1
answer
42
views
Why is fiona.open causing a PermissionError?
I'm working on a flask app that takes a geojson file and returns a shapefile. Currently it is giving me the error PermissionError: [Errno 13] Permission denied: 'C:\\Users\\john\\Desktop\\...
3
votes
1
answer
103
views
Reading geopackages with FLOAT fields with Fiona
I get
WARNING:fiona.ogrext:Skipping field t: invalid type (2, 3)
errors when reading a geopackage which has t FLOAT field. The reason seems to be that the subtype of the field is 3 (Single precision (...
3
votes
3
answers
157
views
Loading badly formatted ESRI shapefile having duplicated field names in Python
When opening an ESRI shapefile in QGIS, it shows field names with more than 10 characters:
But when trying to load that same Shapefile using fiona (1.9.6):
import fiona
src = fiona.open(filepath)
...
4
votes
1
answer
352
views
Opening large (10Gb) GeoJSON file in Python
As the title says, I am trying to open a large GeoJSON file in Python but it's taking a long time even to read the first 10 rows.
import geopandas as gpd
fpath = r"..\data\graph_data\buildings\...
0
votes
0
answers
76
views
Create shapefile using fiona geopandas succeed but no feature created
From my script I want to create a shapefile from object detection, when the file is small or medium size (under 150.000 features) its workable, but when it more than that value, the feature is null in ...
3
votes
1
answer
136
views
Remove OGR_STYLE field while/after writing
I'm using an OGR_Style field to set the styles for a MapInfo Tab file with Geopanadas. Does anyone know if there's a way use the OGR_Style field for styling but not include it as a field in the file?
-3
votes
1
answer
669
views
How to create a file geodatabase (.gdb) in Python without ArcPy?
I want to make a file geodatabase (.gdb) with GeoPandas and Fiona, but as long as I know there is no way to make a feature class without using ArcPy. Is there a way to make it?
2
votes
1
answer
367
views
How to handle fiona._err.CPLE_AppDefinedError when using geofileops.makevalid on large files?
I am testing geofileops.makevalid. To do so, I create a GPKG file with a number invalid of geometries to fix.
First, I create this Python script, test.py:
import geofileops as gfo
import geopandas as ...
1
vote
1
answer
1k
views
Validate GeoJSON geometries using geojson Python package via Fiona
I have an application that allows users to submit a shapefile or GeoJSON file. I would like to use Python to validate the files and geometries within them to make sure I process valid geoms. Im having ...
0
votes
1
answer
621
views
how to install fiona on a newly generated github codespace?
This question as been asked multiple times here and on SO but it seems anything related to GDAL in the python realm requires special care on any new environment. So here is the Github codespace one.
I ...
0
votes
2
answers
558
views
Determining minx/miny/maxx/maxy for shape from polygon in GeoJSON file
I have implemented the following code to search a GeoJSON file for a point (not asking for a code review or critique):
#!/usr/local/bin/python3.11
import os
import sys
import fiona
import shapely
def ...
2
votes
1
answer
209
views
Updating metadata in geodatabase using fiona
I am trying to update the metadata on an already written .gdb with n layers. I would like to add the same metadata to each layer. When I read in the file and update the metadata dictionary, the added ...
0
votes
2
answers
378
views
Trouble loading fiona
I'm having trouble loading fiona. I am able to import/run GDAL and GeoPandas with no issues but when I try loading fiona, I get an error message (please see below). I have python (3.9.11) through ...
1
vote
1
answer
335
views
Does geopandas handle shapefiles (in lat/lon) that straddle the anti-meridian properly?
I have been looking for a way to check if a point lies within a shapefile. i had some code that worked for the most part (using shapely and fiona) but my understanding is that it will exhibit ...