or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/fiona@1.10.x
tile.json

tessl/pypi-fiona

tessl install tessl/pypi-fiona@1.10.0

Fiona reads and writes spatial data files

Agent Success

Agent success rate when using this tile

88%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.1x

Baseline

Agent success rate without this tile

80%

task.mdevals/scenario-5/

GIS Dataset Analyzer

A command-line tool that analyzes GIS vector datasets and reports their key metadata characteristics.

Problem Description

Create a Python script that reads a GIS vector dataset file and extracts comprehensive metadata information about it. The tool should accept a file path as input and output a structured report containing the dataset's driver, schema information, spatial bounds, and coordinate reference system details.

Requirements

The script should:

  1. Accept a file path to a GIS vector dataset as a command-line argument
  2. Open and read the dataset
  3. Extract and display the following metadata:
    • The format driver name used by the dataset
    • The geometry type defined in the schema
    • All property field names and their types from the schema
    • The spatial bounding box (minx, miny, maxx, maxy)
    • The coordinate reference system (CRS) information
  4. Handle cases where the dataset cannot be opened (file not found, invalid format, etc.)
  5. Output the metadata in a clear, human-readable format

Implementation Details

@generates

Create a Python script named analyzer.py that implements this functionality. The script should be executable from the command line as:

python analyzer.py <path_to_dataset>

Expected Output Format

The output should include at minimum:

  • Driver name
  • Geometry type
  • Property schema (field names and types)
  • Bounding box coordinates
  • CRS information (in any standard format)

Test Cases

  • Opening a valid Shapefile and extracting its metadata returns the correct driver name "ESRI Shapefile" @test
  • Reading a GeoJSON file's schema correctly identifies all property field names and types @test
  • Extracting spatial bounds from a dataset returns a tuple of four coordinate values (minx, miny, maxx, maxy) @test
  • Attempting to open a non-existent file handles the error gracefully without crashing @test

Dependencies { .dependencies }

fiona { .dependency }

Provides GIS vector data reading and metadata access capabilities.