Debian Codegraph @

docs/index.rst

raw
1 ===============================================
2 Fiona: access to simple geospatial feature data
3 ===============================================
4
5 Fiona streams simple feature data to and from GIS formats like GeoPackage and
6 Shapefile. Simple features are record, or row-like, and have a single geometry
7 attribute. Fiona can read and write real-world simple feature data using
8 multi-layered GIS formats, zipped and in-memory virtual file systems, from
9 files on your hard drive or in cloud storage. This project includes Python
10 modules and a command line interface (CLI).
11
12 Here's an example of streaming and filtering features from a zipped dataset on
13 the web and saving them to a new layer in a new Geopackage file.
14
15 .. code-block:: python
16
17 import fiona
18
19 with fiona.open(
20 "zip+https://github.com/Toblerity/Fiona/files/11151652/coutwildrnp.zip"
21 ) as src:
22 profile = src.profile
23 profile["driver"] = "GPKG"
24
25 with fiona.open("example.gpkg", "w", layer="selection", **profile) as dst:
26 dst.writerecords(feat in src.filter(bbox=(-107.0, 37.0, -105.0, 39.0)))
27
28 The same result can be achieved on the command line using a combination of
29 fio-cat and fio-load.
30
31 .. code-block:: console
32
33 fio cat zip+https://github.com/Toblerity/Fiona/files/11151652/coutwildrnp.zip --bbox "-107.0,37.0,-105.0,39.0" \
34 | fio load -f GPKG --layer selection example.gpkg
35
36 .. toctree::
37 :maxdepth: 2
38
39 Project Information <README>
40 Installation <install>
41 User Manual <manual>
42 API Documentation <modules>
43 CLI Documentation <cli>
44
45
46 Indices and tables
47 ==================
48
49 * :ref:`genindex`
50 * :ref:`modindex`
51 * :ref:`search`
52