


write ( f ) # The destination's contents are flushed to disk and the file is # closed when its ``with`` block ends. filter ( bbox = ( - 107.0, 37.0, - 105.0, 39.0 )): # Get a point on the boundary of the record's # geometry. open ( 'test_write.shp', 'w', ** meta ) as dst : # Process only the records intersecting a box. The ``meta`` # mapping fills in the keyword parameters of fiona.open().
#Fuse for macos 3.10.2 driver#
meta meta = 'Point' # Open an output file, using the same format driver and # coordinate reference system as the source. We can get initial values from the open # collection's ``meta`` property and then modify them as # desired. open ( 'tests/data/coutwildrnp.shp' ) as src : # The file we'll write to, the "destination", must be initialized # with a coordinate system, a format driver name, and # a record schema. We'll call this the "source." with fiona. Here is an example of using Fiona to read some records from one dataįile, change their geometry attributes, and write them to a new data file.

Want to do anything fancy with them you will probably need Shapely or something They don’t have any spatial methods of their own, so if you Records are read from and written to file-like Collection objects Readily with other Python GIS packages such as pyproj, Rtree, and Shapely.įiona is supported only on CPython versions 2.7 and 3.4+. Multi-layered GIS formats and zipped virtual file systems and integrates Fiona can read and write real-world data using Writing data in standard Python IO style and relies upon familiar Python typesĪnd protocols such as files, dictionaries, mappings, and iterators instead ofĬlasses specific to OGR. Fiona is GDAL’s neat and nimble vector API for Python programmers.įiona is designed to be simple and dependable.
