Skip to content

Localization module lacks coordinate reference system (CRS) / projection support #1262

Description

@martinguthrie93

Summary

The localization module operates purely on Cartesian coordinates in meters and has
no concept of a coordinate reference system (CRS). There is no support for EPSG codes,
geographic coordinates (latitude/longitude, WGS84), or automatic WGS84 ↔ UTM
conversion. Users must manually project their GPS coordinates to a metric system
(e.g., UTM) before using SynchronizedRecorderArray, and the estimated source
locations come back as bare meters with no georeferencing.

Current behavior

  • SynchronizedRecorderArray(file_coords=...) expects receiver positions as
    (x, y) or (x, y, z) in meters
    (opensoundscape/localization/synchronized_recorder_array.py:78).
  • Docstrings only recommend using "the UTM coordinate system"
    (opensoundscape/localization/localization_algorithms.py:82, :178), but no
    conversion is performed by the library.
  • PositionEstimate.location_estimate is returned as (x, y, z) in meters with no
    CRS metadata (opensoundscape/localization/position_estimate.py:42).
  • No geospatial dependency is present (geopandas, shapely, pyproj, etc. are
    absent from pyproject.toml).

Problem / impact

Field recorders (e.g. AudioMoth with GPS) typically record positions as
latitude/longitude. To use localization, users must:

  1. Manually pick the correct UTM zone / EPSG code,
  2. Convert every recorder's lat/lon to metric coordinates by hand,
  3. Convert the estimated source location back to lat/lon to plot it on a map or
    export to a GIS tool (QGIS/ArcGIS).

This manual step is error-prone (wrong zone, hemisphere sign, mixed CRS) and blocks a
straightforward path from field GPS data → localization → mapped results.

Proposed enhancement

  • Allow file_coords to optionally be supplied as lat/lon with an associated CRS/EPSG
    (auto-select UTM zone when not given).
  • Attach the CRS to PositionEstimate and provide a helper to convert
    location_estimate back to lat/lon (e.g. via pyproj).
  • Optionally add a lightweight export helper (e.g. GeoJSON) for the estimated
    positions.
  • Keep pyproj an optional/extra dependency so the core install stays lean.

Alternatives considered

Users can pre/post-process with pyproj/geopandas themselves, but building minimal
CRS awareness into the localization API would remove a common, error-prone manual step.

Environment

  • OpenSoundscape version:
  • OS / Python:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions