Agisoft Metashape
Agisoft Metashape => Python and Java API => Topic started by: spatialdigger on July 28, 2021, 02:48:12 AM
-
I have
doc = Metashape.Document()
# set up a chunk
chunk = doc.addChunk()
# add photos
chunk.addPhotos(filenames=photo_list)
# doc.save(filepath)
# detect markers
chunk.detectMarkers()
# assign crs
chunk.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:
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?
Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'Metashape.Metashape.Chunk' object has no attribute 'loadReference'
-
Hi spatialdigger,
please change chunk.loadReference to chunk.importReference ....
-
Perfect!