metropolis_sdk icon indicating copy to clipboard operation
metropolis_sdk copied to clipboard

Does PointCloud have geographical coordinates available?

Open ZGX010 opened this issue 1 year ago • 1 comments

Hi Mapillary Team,

This is really a great job. I found that the point cloud data of Mapillary Metropolis are all in the NED coordinate system and do not have geographical information such as longitude and latitude. However, I want to fuse my own data with your data. It would be great if I could know which city the data comes from.

regards ~

ZGX010 avatar Sep 26 '23 08:09 ZGX010

@ZGX010 the SDK has a topographic converter in metropolis.utils.geo that you can use to get the lat lon

The following is an example of the basic usage:

from metropolis.utils.geo import TopocentricConverter
from metropolis import Metropolis

metropolis = Metropolis(
    <split>,  # Name of the split we want to load
    <your_path_metropolis>,  # Path to the root directory of the dataset
)

converter = TopocentricConverter(
    metropolis.geo["reference"]["lat"],
    metropolis.geo["reference"]["lon"],
    metropolis.geo["reference"]["alt"],
)

#  """Convert topocentric x, y, z to lat, lon, alt."""
y_c_lla, x_c_lla, _ = converter.to_lla(
    pose_record["translation"][0],
    pose_record["translation"][1],
    pose_record["translation"][2],
)

With scene token 'trABmlDfsN1z6XCSJgFQxO' and sample token: '1pVhDEWnyS30UKoGObXQBg' you get the vehicles coordinate as: (42.331381982273605, -83.04600496139498)

This give the address as 60 Cadillac Square, Detroit, MI 48226, USA.

podgorki avatar Jun 18 '24 02:06 podgorki