Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - spatialdigger

Pages: 1 [2]
Python and Java API / launch Metashape gui from python
« on: July 28, 2021, 03:00:05 AM »
I know you can open a Metashape document into python:, read_only=False)

What  I would like to do is launch the program from within python so the user can troubleshoot any identified issues, caught in the script.

For instance if there is an exception the Metashape doc is opened in Metashape for the user to look and apply a manual fix.

I have Metashape pro.

Python and Java API / Loading coordinates of reference markers
« on: July 28, 2021, 02:48:12 AM »
I have

Code: [Select]
    doc = Metashape.Document()

    # set up a chunk
    chunk = doc.addChunk()

    # add photos

    # detect markers
    # assign crs = Metashape.CoordinateSystem("EPSG::27700")

All that works fine, I have a targets.csv file, setup as standard, works manually.

So I try the following:
Code: [Select]
chunk.loadReference(path=targets_path, format=Metashape.ReferenceFormatCSV, columns='nxyz', delimiter=',',create_markers=True)
And I get the following error, where am I going wrong?
Code: [Select]
Traceback (most recent call last):
  File "<input>", line 1, in <module>
AttributeError: 'Metashape.Metashape.Chunk' object has no attribute 'loadReference'

Pages: 1 [2]