tessl install tessl/pypi-fiona@1.10.0Fiona 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%
Build a utility that analyzes GIS file formats to determine their support for advanced datetime field features.
Different GIS file formats (drivers) have varying levels of support for datetime fields. Some formats support timezone-aware datetime values, while others only support naive datetime. Similarly, some formats can store millisecond precision in time values, while others are limited to second precision.
Your task is to create a tool that:
['GeoJSON', 'GPKG', 'ESRI Shapefile'])Your solution should:
@generates
from typing import Dict, List
from datetime import datetime, time, timezone
def check_datetime_capabilities(drivers: List[str]) -> Dict[str, Dict[str, bool]]:
"""
Check datetime field capabilities for specified GIS drivers.
Parameters:
- drivers: List of driver names to test (e.g., ['GeoJSON', 'GPKG'])
Returns:
Dictionary with driver names as keys, each containing:
- 'supports_timezone': bool indicating if timezone info is preserved
- 'supports_milliseconds': bool indicating if millisecond precision is preserved
- 'error': str or None if the driver test encountered an error
Example:
{
'GeoJSON': {
'supports_timezone': True,
'supports_milliseconds': True,
'error': None
},
'GPKG': {
'supports_timezone': False,
'supports_milliseconds': True,
'error': None
}
}
"""Provides GIS data format reading and writing capabilities.