Comments (3)
A way of knowing which driver will support it is to test the OLCRandomWrite (is SetFeature() available ?) and OLCCreateFeature capabilities with OGR_L_TestCapability().
Not sure what you mean by "have to fake it". It is hard to fake the fact that you don't support random writing ;-)
from fiona.
I thought that OGR would try to fake random writing like it will do for random reading. But I'm wrong, it does not. I just checked with the GeoJSON driver (using GDAL 1.7.2) , which won't let me open a existing file in update (1) mode. I'll follow your recommendation for testing. I suspect that Fiona's append mode is going to fail for non-updateable drivers since I'm trying to open them in mode 1 instead of 0.
from fiona.
Actually, for append mode of an existing file, which is a form of update in the broad sense, you also need to OGROpen( 'xxxx', TRUE ). FALSE is/should be strictly read-only.
For GeoJSON, append of an existing file isn't supported ( OGROpen( 'xxxx', TRUE) will fail). But if you create a fresh new one with CreateDataSource(), you can append features.
Note: you may notice that not all drivers report properly their capabilities but the situation has improved over versions. I remember having corrected a few drivers in GDAL 1.9.0.
from fiona.
Related Issues (20)
- Drop support for Python 3.7 and 3.8 HOT 5
- Support for PMTile?
- Remove dependency on Numpy for VSI read buffer HOT 1
- Bring back Python 3.8 for 1.10
- A new OGRGeometryH based Geometry class
- 1.9.6 release HOT 1
- Rename master branch to main
- Add name keyword argument to fiona.open() and Collection constructor HOT 2
- Address high priority items on OpenSSF scorecard report
- 1.9.6: build fails with `-Wincompatible-pointer-types` HOT 8
- Change python opener VSI plugin prefix to /vsifiopener
- 1.9.6: pytest fails in 47 units HOT 3
- 1.10 Windows wheels?
- Fiona no longer recognizes pd.Timestamp (as datetime.datetime) since 1.10 a2 HOT 3
- Make features printable again HOT 2
- Error when importing fiona on an M1 Mac. HOT 12
- Pip package fiona-1.9.6.tar.gz has inconsistent version: filename has '1.9.6', but metadata has '0.0.0' HOT 3
- RFE: use `zoneinfo` instead of `pytz` HOT 2
- Field Name encode error when writing to Mapinfo File HOT 7
- Solve various Python opener issues as in rasterio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fiona.