Forum

Author Topic: chunk.markers coordinate system  (Read 1483 times)

3DWinter

  • Full Member
  • ***
  • Posts: 103
    • View Profile
chunk.markers coordinate system
« on: April 25, 2022, 06:57:42 AM »
Hello,
My project is set as EPSG::26934.  the entire project is processed with the Python API.
When opening the .psx  with Metashape GUI, the coordinates make sense (UTM- as seen in the attached picture)

But when I review the coordinates in the Python interpreter the number doesn't make any sense to me:
Code: [Select]
points_dic={}
for point in chunk.markers:
    print(point, point.position)
    points_dic[point.label]=point.position
points_dic={}

for point in chunk.markers:

    print(point, point.position)

    points_dic[point.label]=point.position

<Marker 'point 1'> Vector([2.674798477808206, 6.560502854674506, 3.311077291228823])
<Marker 'point 2'> Vector([2.6818437237369803, 3.647193405560801, 0.34158157745059553])
<Marker 'point 3'> Vector([2.900154059499172, 4.059596584415228, 0.7825189294777867])
<Marker 'point 4'> Vector([8.001023537754426, -0.23136466383098236, -3.40010373078223])
<Marker 'point 5'> Vector([4.91971436138031, 3.6984685117053813, -0.2117274212552949])
<Marker '113'> Vector([8.001507569124444, -0.23004959586614865, -3.4028323038655808])

Can someone help me understand in what units are these numbers? This doesn't seem consistent with other posts in the Forum.

Paulo

  • Hero Member
  • *****
  • Posts: 1303
    • View Profile
Re: chunk.markers coordinate system
« Reply #1 on: April 25, 2022, 08:30:45 AM »
Hello 3DWinter,

the point.position vectors contain the marker coordinates in the internal coordinate system.

To get the coordinates in CRS (EPSG:26934) you must do:
Code: [Select]
T = chunk.transform.matrix
point_CRS = chunk.crs.project(T.mulp(point.position)) # vector with point coordinates in CRS

Hope this helps,
« Last Edit: April 25, 2022, 08:32:18 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor