Get/Export the model origin GPS coordinates

I’m developing an application in Unity which is based on GPS coordinates and I would like to place the model I’ve generated in RealityCapture based on the GPS location of the model center. My models are generated using georeferenced images. Is there a way to get the GPS location of the origin of my model?

Hello,

The solution will depend on the coordinate system, mainly on units, but it could be possible.

You can set the reconstruction region manually, and then either find the coordinates manually or export the region and open it as a text file. To find the region’s center coordinates, go to the MESH MODEL tab and open the Info Panel in the Mesh Model section.

You can also export your georeferenced model in the project output coordinate system. I would use XYZ format for this. Then you can manually or by using a simple CMD or Python script find the highest and the lowest value in each column and get the mean values between each pairing and you’ll get the center of the model.

2 Likes

Thanks! The Info Panel is a perfect starting point and exactly what I was looking for.

1 Like

Absolutely, there are ways to extract the GPS location of your model’s center point if it was generated from georeferenced images in RealityCapture. Here’s how you might approach it:

  1. Using the Info Panel:
  • Check the “Mesh Model” tab in RealityCapture.
  • Open the “Info Panel” within the Mesh Model section.
  • This panel should display the coordinates of the model’s bounding box.
  1. Manual Calculation with Exported Data:
  • Export your model, ensuring it uses a georeferenced coordinate system like XYZ.
  • Open the exported data in a text editor or use a scripting language like Python.
  • Find the minimum and maximum values for each coordinate (X, Y, Z).
  • Calculate the center point by averaging the minimum and maximum values for each axis.

This will give you the coordinates of the model’s center in the chosen reference system. You might need to translate these to a usable GPS format depending on your application in Unity.

Good question, been wondering about this myself