Forum

Author Topic: API syntax for setting measurement units  (Read 1531 times)

Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
API syntax for setting measurement units
« on: May 20, 2021, 11:51:09 AM »
Hello all.

 in GUI, one can set Mesurements units thru Tools/Preferences in General Tab....

What would be the equivalent syntax in API? I guess something like:

Metashape.app.settings.value(???) = .....

Any help will be appreciated....
Best Regards,
Paul Pelletier,
Surveyor

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14847
    • View Profile
Re: API syntax for setting measurement units
« Reply #1 on: May 20, 2021, 01:33:45 PM »
Hello Paul,

Its "main/base_units" and EPSG code for units is used a value. However, the setValue for this parameter wouldn't be applied.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
Re: API syntax for setting measurement units
« Reply #2 on: May 20, 2021, 02:48:17 PM »
A thousand Thanks,  Alexey

However, I found an error when measuring perimeter3D when base units are set to foot (EPSG code 9002). I have a polyline shape 1 whose measurement with context menu Measure is correct 5.965 ft. However when I type shape.perimeter3D() in console I get incorrect value 1.818 (which corresponds to meters unit). Please see attachment....
« Last Edit: May 20, 2021, 04:30:37 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor