Forum

Author Topic: How do you export a model in its local coordinate system?  (Read 9297 times)

jeremyeastwood

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
How do you export a model in its local coordinate system?
« on: August 15, 2014, 05:53:30 AM »
I have set my model in WSG84 early on in my workflow to export the orthophoto mosaic properly, however after the orthophoto export, I'd like to export the 3D model in its local coordinate system (it needs to be in its local coord system to upload properly to web-based browsers).  Currently I am doing this with:

    chunk.exportModel(model_path, texture_format='tif', format='obj', projection=chunk.projection)

however the model doesn't upload properly, so I suspect that "chunk.projection" is still returning the global (WGS84-based) coordinate system.  How can you return the chunk local coordinate system to use for the projection input in the chunk.exportModel function?

Thanks

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15080
    • View Profile
Re: How do you export a model in its local coordinate system?
« Reply #1 on: August 15, 2014, 04:52:06 PM »
Hello jeremyeastwood,

You can try the following:

Code: [Select]
crs = PhotoScan.CoordinateSystem()
crs.init('LOCAL_CS["Local CS",LOCAL_DATUM["Local Datum",0],UNIT["metre",1]]')

chunk.exportModel(.... projection = crs)
Please let me know if it works for you.
Best regards,
Alexey Pasumansky,
Agisoft LLC

jeremyeastwood

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: How do you export a model in its local coordinate system?
« Reply #2 on: August 15, 2014, 09:44:47 PM »
Thanks Alexey - that worked perfectly!

ivan.mdn

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: How do you export a model in its local coordinate system?
« Reply #3 on: October 24, 2014, 08:22:19 PM »
Is it still possible to do this on photoScan 1.1.0? Because i tried creating a local coord. system like that and this is what i got:
Code: [Select]
>>> crs = PhotoScan.CoordinateSystem()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
ValueError: wrong crs definition string

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15080
    • View Profile
Re: How do you export a model in its local coordinate system?
« Reply #4 on: October 25, 2014, 05:59:34 PM »
Hello ivan.mdn,

Please, try the following:
Code: [Select]
crs = PhotoScan.CoordinateSystem('LOCAL_CS["Local CS",LOCAL_DATUM["Local Datum",0],UNIT["metre",1]]')
Best regards,
Alexey Pasumansky,
Agisoft LLC

StephanINC

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How do you export a model in its local coordinate system?
« Reply #5 on: November 09, 2017, 09:32:52 AM »
Hi All

Can anyone share some light on the python code below?

from the WGS84 what part of the code provides the offset in terms of xyz

Appreciated!

Thanks