Forum

Author Topic: Loading coordinates of reference markers  (Read 2200 times)

spatialdigger

  • Newbie
  • *
  • Posts: 17
    • View Profile
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
    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:
   
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'

Paulo

  • Hero Member
  • *****
  • Posts: 1320
    • View Profile
Re: Loading coordinates of reference markers
« Reply #1 on: July 28, 2021, 03:43:59 AM »
Hi spatialdigger,

please change chunk.loadReference to chunk.importReference ....
Best Regards,
Paul Pelletier,
Surveyor

spatialdigger

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Loading coordinates of reference markers
« Reply #2 on: July 28, 2021, 08:08:53 PM »
Perfect!