Fiona reads and writes spatial data files
88
Build a command-line utility that converts coordinate reference system (CRS) definitions between different formats commonly used in GIS applications.
The utility should accept CRS definitions in multiple input formats and convert them to a specified output format. It must handle the following conversions:
The program should:
@generates
def parse_crs(crs_string: str):
"""
Parse a CRS definition string and return a CRS object.
Args:
crs_string: A string representing a CRS in various formats
(EPSG code, WKT, PROJ, or authority string)
Returns:
A CRS object representing the parsed coordinate reference system
Raises:
ValueError: If the CRS string cannot be parsed
"""
pass
def convert_to_wkt(crs_obj) -> str:
"""
Convert a CRS object to Well-Known Text format.
Args:
crs_obj: A CRS object
Returns:
WKT string representation of the CRS
"""
pass
def convert_to_proj(crs_obj) -> str:
"""
Convert a CRS object to PROJ string format.
Args:
crs_obj: A CRS object
Returns:
PROJ string representation of the CRS
"""
pass
def get_crs_type(crs_obj) -> str:
"""
Determine if a CRS is geographic or projected.
Args:
crs_obj: A CRS object
Returns:
'geographic' if the CRS is geographic, 'projected' if projected,
or 'unknown' if type cannot be determined
"""
passProvides coordinate reference system handling capabilities.
Install with Tessl CLI
npx tessl i tessl/pypi-fionadocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10