Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add converter between AV2 city coordinate systems, and WGS84 and UTM #28

Merged
merged 14 commits into from
Apr 12, 2022
Prev Previous commit
Next Next commit
reformat black
  • Loading branch information
John Lambert committed Mar 26, 2022
commit 817a0987e2b53307e1bc2f9e9f70944489e823a3
29 changes: 15 additions & 14 deletions src/av2/geometry/utm.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@

from av2.utils.typing import NDArrayFloat, NDArrayInt


benjaminrwilson marked this conversation as resolved.
Show resolved Hide resolved
class CityName(str, Enum):
"""Abbreviations of names of cities featured in Argoverse 2."""
ATX = "ATX" # Austin, Texas
DTW = "DTW" # Detroit, Michigan
MIA = "MIA" # Miami, Florida
PAO = "PAO" # Palo Alto, California
PIT = "PIT" # Pittsburgh, PA
WDC = "WDC" # Washington, DC

ATX = "ATX" # Austin, Texas
DTW = "DTW" # Detroit, Michigan
MIA = "MIA" # Miami, Florida
PAO = "PAO" # Palo Alto, California
PIT = "PIT" # Pittsburgh, PA
WDC = "WDC" # Washington, DC


# All are North UTM zones (Northern hemisphere)
Expand All @@ -27,18 +29,18 @@ class CityName(str, Enum):
CityName.MIA: 17,
CityName.PAO: 10,
CityName.PIT: 17,
CityName.WDC: 18
CityName.WDC: 18,
}


# as (lat, long) tuples
CITY_ORIGIN_LATLONG_DICT = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
CITY_ORIGIN_LATLONG_DICT = {
CITY_ORIGIN_LATLONG_DICT: Final[Dict[CityName, Tuple[float, float]]] = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, updated now.

CityName.ATX: ( 30.27464237939507, -97.7404457407424),
CityName.DTW: ( 42.29993066912924, -83.17555750783717),
CityName.MIA: ( 25.77452579915163, -80.19656914449405),
CityName.PAO: ( 37.416065, -122.13571963362166),
CityName.PIT: ( 40.44177902989321, -80.01294377242584),
CityName.WDC: ( 38.889377, -77.0355047439081)
CityName.ATX: (30.27464237939507, -97.7404457407424),
CityName.DTW: (42.29993066912924, -83.17555750783717),
CityName.MIA: (25.77452579915163, -80.19656914449405),
CityName.PAO: (37.416065, -122.13571963362166),
CityName.PIT: (40.44177902989321, -80.01294377242584),
CityName.WDC: (38.889377, -77.0355047439081),
}


Expand Down Expand Up @@ -100,4 +102,3 @@ def convert_city_coords_to_wgs84(points_city: Union[NDArrayFloat, NDArrayInt], c
points_wgs84.append((lat, long))

return np.array(points_wgs84)