Incorrect `crs` set on fiona.open()
See original GitHub issueExpected behavior and actual behavior.
I have a geodatabase I downloaded from this source (warning: fairly large attachment): https://pspsinfo.ss.pge.com/artifacts/wildfire-mitigation-data/Attachment-6-GIS-Files.zip
When I load one of the layers (Transformer
) into QGIS, I see the CRS as EPSG:4430
and looks right on the map:
When I used Fiona to load the layer, it is reading the crs as EPSG:26910
(or in fiona land as {'init': 'epsg:26910'}
)
Can I force Fiona to use another projected coordinate system while reading? Some kind of a set CRS method?
Can confirm that EPSG:26910 doesn’t geo reference it correctly.
Steps to reproduce the problem.
c = fiona.open('pge/pge/infrastructure/v1/pge_infrastructure/EDGIS_2-12/EDGIS2-12.gdb', layer='Transformer')
c.crs
> {'init': 'epsg:26910'}
Operating system
On a debian-based docker container with python 3.7
Fiona and GDAL version and provenance
1.8.13
using PyPi and GDAL 3.0.4 and PROJ 6.3.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Fiona fails to write CRS to shapefile - GIS Stack Exchange
I had this issue, and fixed it by setting the GDAL_DATA variable correctly, so that fiona can map the projection strings correctly.
Read more >1 The Fiona User Manual — Fiona 2.0dev documentation
Reading a GIS vector file begins by opening it in mode 'r' using Fiona's open() function. It returns an opened Collection object. > ......
Read more >Fiona Documentation - Read the Docs
set include dirs, library dirs, and libraries options via the setup.cfg ... fiona.open() can now create new datasets using CRS URNs (#823).
Read more >geopandas.read_file
With engine=”fiona”, CRS mis-matches are resolved if given a GeoSeries or ... the keyword arguments are passed to fiona.open() or fiona.collection.
Read more >Fiona - PyPI
Note: The following environment variables needs to be set so that Fiona works correctly: ... fiona.open() can now create new datasets using CRS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
With Fiona installed with pip (arch linux) I get:
As far as I know fiona does not alter coordinates when reading. As long as you don’t use the CRS in your processing pipeline you should be fine.
@koshy1123 this sounds related to https://github.com/OSGeo/PROJ/issues/2086 maybe?
There have been some unit and WKT issues in PROJ 6 recently. See also https://lists.osgeo.org/pipermail/gdal-dev/2020-January/051483.html and https://github.com/OSGeo/PROJ/pull/1863.
I’m not going to be able to download and inspect that zip file due to its size and the fact that I don’t build the file gdb driver.