Forum

Author Topic: Ignore GPS data in EXIF  (Read 2631 times)

BenjaminG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Ignore GPS data in EXIF
« on: February 13, 2018, 07:59:01 PM »
Hi,

I'm trying to ignore GPS found in EXIF to make XYZ reconstruction, and found a way, but I still have some doubt

First I uncheck reference using this
Code: [Select]
for camera_gps in chunk.cameras:
    camera_gps.reference.enabled = False

Then I need to switch back to local coordinate using
Code: [Select]
chunk.crs = PhotoScan.CoordinateSystem()
Things are working, but when using CoordinateSystem() I'm in XYZ but without unit:
In a normal chunk echoing: chunk.crs give me:
Code: [Select]
<CoordinateSystem 'Local Coordinates (m)'>
So I tried:
Code: [Select]
chunk.crs = PhotoScan.CoordinateSystem('Local Coordinates (m)')and
Code: [Select]
chunk.crs = PhotoScan.CoordinateSystem('EPSG::9001')and some others, but all failed

Is this normal behavior? The unit is not important for me, but when opening the reference setting dialog after, it's empty, and it's normaly not possible to do the same thing manually.
Or is there a better way to handle such case to ignore GPS (I also used an exif editor prior to importing but, it's not very handy)

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14855
    • View Profile
Re: Ignore GPS data in EXIF
« Reply #1 on: February 13, 2018, 08:05:34 PM »
Hello BenjaminG,

In the current version it's not possible to define the coordinate system of the chunk using the direct assignment, so you need to use the intermediate variable:
Code: [Select]
crs = PhotoScan.CoordinateSystem("EPSG::4326")
chunk.crs = crs
In the version 1.4.1 you would be able to use direct assignment for chunk.crs.

However, for the coordinate system definition you need to use either valid EPSG codes of the geographic/projected coordinate system (EPSG::9001 - is related to the meters unit, not to a coordinate system), or the WKT (Well-Known Text) line, for example, for the local coordinate system:
Code: [Select]
crs = PhotoScan.CoordinateSystem('LOCAL_CS["Local Coordinates (m)",LOCAL_DATUM["Local Datum",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]')
Best regards,
Alexey Pasumansky,
Agisoft LLC

BenjaminG

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: Ignore GPS data in EXIF
« Reply #2 on: February 14, 2018, 11:04:49 AM »
Thanks, it working perfectly.

By the way, direct assigment does work on 1.4.0 (5650)
Code: [Select]
chunk.crs = PhotoScan.CoordinateSystem('LOCAL_CS["Local Coordinates (m)",LOCAL_DATUM["Local Datum",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]')