Forum

Author Topic: simple text file with shift values for model import  (Read 8805 times)

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
simple text file with shift values for model import
« on: October 24, 2023, 05:03:18 AM »
It would be handy if a simple text with shift values could be used when importing models, instead of entering them into the dialog box. It would also be handy if Metashape wrote such a file when it exported a model.
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
Re: simple text file with shift values for model import
« Reply #1 on: October 24, 2023, 03:42:17 PM »
It would function like a world file used for GIS data.
Digital Mapping & Graphics LLC
https://digital-mapping.net/

jkova96

  • Full Member
  • ***
  • Posts: 181
    • View Profile
Re: simple text file with shift values for model import
« Reply #2 on: October 25, 2023, 12:13:51 AM »
+1

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15307
    • View Profile
Re: simple text file with shift values for model import
« Reply #3 on: October 25, 2023, 04:00:57 PM »
Hello Bill,

When you have time for a 2.1.0 pre-release, check, if metadata.xml file (can be optionally enabled in Export Model dialog) resolves the requested problem.

The file, if written, would contain the information about the model origin in geographic coordinates (if the model is referenced) and also shift values that will be automatically considered on import. See the example of such file below:


Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<ModelMetadata version="1">
<!--Spatial Reference System-->
<SRS>ENU:69.19433256061115,51.27974765884</SRS>
<!--Origin in Spatial Reference System-->
<SRSOrigin>1000,5000,-100</SRSOrigin>
<Texture>
<ColorSource>Visible</ColorSource>
</Texture>
</ModelMetadata>
Best regards,
Alexey Pasumansky,
Agisoft LLC

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
Re: simple text file with shift values for model import
« Reply #4 on: October 25, 2023, 09:30:05 PM »
Thanks Alexey,
I will check it out today.

Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
Re: simple text file with shift values for model import
« Reply #5 on: October 26, 2023, 01:08:56 AM »
Hi Alexey,

The option was in the dialog box to "Write metadata.xml file". I checked it, but it did write the file.



Update 10/26/2023
If I click on the calculator on the import dialog, it applies the same shift values as when exported. That is very handy  :).


« Last Edit: October 27, 2023, 04:46:07 AM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
Re: simple text file with shift values for model import
« Reply #6 on: October 26, 2023, 01:26:38 AM »
When I used a projection it wrote the metadata file. It would be good if it also worked for Local Coordinates, often times for excavations my ground control points are in local coordinates.



Another thing I noticed. I think in the past when I made a planar orthomosaic,  the world file that was written used the elevation for the Y value. That is not the case in version 2.1.
If I'm not remembering correctly please make it a feature request  :).

« Last Edit: October 26, 2023, 05:34:32 PM by bisenberger »
Digital Mapping & Graphics LLC
https://digital-mapping.net/

bisenberger

  • Sr. Member
  • ****
  • Posts: 341
    • View Profile
    • Digital Mapping & Graphics
Re: simple text file with shift values for model import
« Reply #7 on: October 27, 2023, 04:55:12 AM »
Hi Alexey, this is very useful, thanks.

I noticed that when importing models it doesn't replace the active model, and it doesn't prompt to keep, or replace the active model. This should allow for batch importing of models. That would be very handy for importing the 4 profiles of an excavation square after cleaning them up in another application  :).
Digital Mapping & Graphics LLC
https://digital-mapping.net/