CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/pypi-flopy

FloPy is a Python package to create, run, and post-process MODFLOW-based models

Agent Success

Agent success rate when using this tile

66%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.14x

Baseline

Agent success rate without this tile

58%

Overview
Eval results
Files

task.mdevals/scenario-7/

Coordinate System Transformer

A utility module for working with different coordinate reference systems in groundwater modeling projects. The module should allow users to define coordinate systems, validate them, and transform coordinates between different systems.

Capabilities

CRS Definition and Validation

  • Accepts an EPSG code (e.g., 32610 for UTM Zone 10N) and creates a valid coordinate reference system object @test
  • Validates that a provided EPSG code represents a projected coordinate system (not geographic) and raises an error for geographic systems like EPSG:4326 @test

Coordinate Transformation

  • Transforms a single point from one coordinate system (EPSG:32610) to another (EPSG:32611) and returns the transformed coordinates @test
  • Transforms a list of coordinate pairs from one CRS to another and returns the transformed list @test

CRS Comparison

  • Compares two CRS objects created from the same EPSG code and identifies them as equivalent @test
  • Compares two CRS objects with different authority codes but representing the same system and identifies them as different @test

Implementation

@generates

API

"""Coordinate reference system utilities for groundwater modeling."""

from typing import List, Tuple, Union

class CRSTransformer:
    """Handles coordinate reference system operations."""

    def __init__(self, epsg_code: int):
        """
        Initialize with an EPSG code.

        Args:
            epsg_code: EPSG code for the coordinate reference system

        Raises:
            ValueError: If EPSG code represents a geographic (non-projected) CRS
        """
        pass

    def transform_point(self, x: float, y: float, target_epsg: int) -> Tuple[float, float]:
        """
        Transform a single point to a different coordinate system.

        Args:
            x: X coordinate in source CRS
            y: Y coordinate in source CRS
            target_epsg: Target EPSG code

        Returns:
            Tuple of (x, y) in target CRS
        """
        pass

    def transform_points(self, points: List[Tuple[float, float]],
                        target_epsg: int) -> List[Tuple[float, float]]:
        """
        Transform multiple points to a different coordinate system.

        Args:
            points: List of (x, y) tuples in source CRS
            target_epsg: Target EPSG code

        Returns:
            List of (x, y) tuples in target CRS
        """
        pass

    def is_equivalent(self, other_epsg: int) -> bool:
        """
        Check if another EPSG code represents the same CRS.

        Args:
            other_epsg: EPSG code to compare with

        Returns:
            True if CRS are equivalent, False otherwise
        """
        pass

Dependencies { .dependencies }

flopy { .dependency }

Provides coordinate reference system support for groundwater modeling.

@satisfied-by

tessl i tessl/pypi-flopy@3.9.0

tile.json