GeoFrame.Kino.ReadFileCell (GeoFrame v0.3.4)

Copy Markdown View Source

A Livebook Smart Cell that reads a spatial file into a GeoFrame.GeoDataFrame.

Add it from the Livebook cell menu (Smart > Read spatial file). It is registered when the :geoframe application starts and Kino is available.

Fields:

  • Assign to - the variable that receives the frame (default gdf).
  • Path - the file to read; relative paths resolve from the notebook's working directory.
  • Driver - auto picks the format from the extension; otherwise one of parquet, geojson, flatgeobuf, feather, shapefile, gpkg. See GeoFrame.read_file/2.
  • Layer - for a GeoPackage, chosen from GeoFrame.list_layers/2 once the file exists.
  • Bounding box - optional minx, miny, maxx, maxy, passed as bbox: (every format but Feather, which raises on it).
  • Reproject to - optional target CRS, such as EPSG:3857 or 3857.
  • Show map - ends the cell with GeoFrame.Kino.deck/2.

The cell generates code such as:

gdf = GeoFrame.read_file!("data/places.gpkg", layer: "places")
gdf = GeoFrame.GeoDataFrame.to_crs(gdf, 3857)
GeoFrame.Kino.deck(gdf)

Summary

Functions

child_spec(map)