Metashape script

API Python https://www.agisoft.com/pdf/metashape_python_api_2_0_0.pdf

FAQ scripting : https://agisoft.freshdesk.com/support/solutions/folders/31000114192

Liste des scripts: https://github.com/agisoft-llc/metashape-scripts

exemple d’utilisation de la console Python dans Metashape, pour décocher les orientations de caméras :

import Metashape
doc=Metashape.app.document
chunk=doc.chunk
for camera in chunk.cameras:
   camera.reference.rotation_enabled=0

image matching and alignment for the active chunk :


import Metashape 
chunk=Metashape.app.document.chunk
for frame in chunk.frames:
   frame.matchPhotos(downscale=1)
   chunk.alignCameras()

GPS time

GPS time system (recording the absolute number of seconds since the start of the GPS epoch at midnight on January 6th 1980)

Sometimes GPS time is given with an offset (e.g. 1000000000), in this case the 0 value corresponds to 2011/09/14 at 01:46:25 UTC.

Note also that POSIX (Unix) time is given since Jan 1st, 1970, 00:00:00 UTC.

convert to date

835734.87 6250812.50 -3.04 20 0 57560982
835734.88 6250296.85 -8.16 30 0 46351553
835734.88 6250476.48 -6.97 30 0 57559145

example of gps dataset

The gps epoch is in the sixth field, and the values are offset by 1 billion. To convert to date one can use Python.

>>> import datetime
>>> datetime.date.fromtimestamp(1315964785) #posix time of the GPS epoch including the 1 billion offset
datetime.date(2011, 9, 14)
>>> datetime.date.fromtimestamp(1315964782+57560982) # gps time of the dataset + the posix time
datetime.date(2013, 7, 11)

Tachéo Leica TC805

Téléchargement données instrument

Windows 7

On peut télécharger les données acquises par le tachéomètre Lecia TCR 805 avec le logiciel Leica Geo Office. Ce logiciel ne s’installe que sur Windows 7. L’installation sur Windows 10 n’aboutit pas. Le logiciel se trouve ici: \\geomorpho\Logiciel\leica\Leica Geo Office Tools_fr.zip
Le téléchargement des données est très simple avec un câble série(pas d’installation de driver requise). Elle peut poser des problèmes avec un cable USB.

Pour le cable USB, le driver s’installe tout seul (validé sur Windows 7). Ensuite utiliser l “Data Exchange Manager”, il faut sur le port COM correspondant configurer les paramètres avec l’instrument TPS800 et le taux de transfert 19200 baud. Les autres paramètres peuvent être laissés par défaut.

Ensuite dans la fenêtre de transfert des données, il suffit de faire glisser les fichiers, et choisir le format IDX.

Windows 10

Avec le cable USB, le driver s’installe tout seul (validé sur Windows 7 et aussi sous Windows 10). Ensuite utiliser en tant qu’Administrateur le logiciel “Data Exchange Manager”, il faut sur le port COM correspondant configurer les paramètres avec l’instrument TPS800 et le taux de transfert 19200 baud. Les autres paramètres peuvent être laissés par défaut.

Ensuite dans la fenêtre de transfert des données, il suffit de faire glisser les fichiers, et choisir le format IDX.

Manuels

docs dispos ici

Manuel en français plus succinct
https://www.google.fr/url?sa=t&source=web&rct=j&url=http://www.grr.ulaval.ca/gae_3005/Labos/Docs/CH_Releves.pdf&ved=2ahUKEwi56OrhyPTnAhUU4OAKHbenBbcQFjASegQIBhAB&usg=AOvVaw0o16NjveUM588rvHZfshAJ

Manuel complet
https://www.google.fr/url?sa=t&source=web&rct=j&url=https://tmackinnon.com/2005/PDF/Leica_tc605_tc805_tc905_uesr_manual.pdf&ved=2ahUKEwiX2fOHyPTnAhVHD2MBHYBGAMgQFjAAegQIAhAB&usg=AOvVaw3p6oIfs2I_jrw8G1qsnLIA

Crop RPC

Using MicMac tools :

example:

mm3d SateLib CropRPC Ori-RPC-d0/GB-Orientation-IMG_PHR1A_P_201902190719128_SEN_3788788101-001.TIF.xml Ori-RPC-d0/GB.* Cropped Org=[3000,4000] Sz=[10500,8500]

parameters:

  1. image to use for the definition of crop zone (Org and Sz correspond to this image)
  2. pattern of orientation files for images to be cropped
  3. name of folder to store cropped RPC
  4. Org : Origin of the box to crop
  5. Sz : Size of the box to crop

Using Proj transformation

PROJ is a generic coordinate transformation software that transforms geospatial coordinates from one coordinate reference system (CRS) to another. It is currently used in many GIS softwares, but can also be used through an API or by command-line tools.

Below some usefull command lines:

Simple conversion from a known coordinate system (CS) to another known CS :

here from UTM33N-WGS84 to WGS84

echo 357000 4676000 | cs2cs +init=epsg:32633 +to +init=epsg:4326

Should return

13d16'2.189"E 42d13'23.141"N 0.000

More documentation https://proj.org/usage/quickstart.html

to add some formatting to output, specify the format with “-f” as a printf format string. For example “-f %.8f” will return the coordinate in decimal degrees with 8 decimals

13.26727481 42.22309481 0.00000000

to input several coordinates at a time, either use a file and pipe with cat

cat coords_utm.txt | cs2cs +init=epsg:32633 +to +init=epsg:4326 -f %.8f Should return the list of converted coordinates
13.26727481 42.22309481 0.00000000
13.54977927 42.05589846 0.00000000

and to output into a file, redirect with > symbol

cat coords_utm.txt | cs2cs +init=epsg:32633 +to +init=epsg:4326 -f %.8f > coords_dd_wgs84.txt

to input manually several coordinates, use EOF or whatever specific characters you like :

cs2cs EPSG:4326 EPSG:32631 <<EOF
45N 2E
EOF

GNSS processing with open-source softwares

The main methods of GNSS processing are (1) the classical differential correction with a permanent base station, and (2) the Precise Point Positionning (PPP) method that does not require a base station and uses precises clock and ephemeris data.

The tools used can be softwares or web-services. Among software we can distinguish between commercial softwares (e.g. Trimble Business Center TBC), open-source softwares (e.g. RTKLib), and scientific softwares (Bernese, Gamit/Globk). We will introduce RTKLib and web-services.

RTKLib

RTKLib is the main open-source library and software to process GNSS data. It can do conversion, post-processing, navigation, plotting, and so on.

Note : Several versions of the software exist and they behave somewhat differently. I’ll try to describe them one by one but you’d better check carefully your results compared to another “official” reference in order to validate your process.

Versions of RTKLib :

  • Official software, with actual version 2.4.2. Does not work for me in post-processing as it is not possible to load base station Rinex data.
  • Emlid Fork here. Should be best for conversion of UBX (Emlid raw format) to Rinex. For what I can say, it worked for conversions, for post-processing of the base station, but it was not stable for post-processing of rover.
  • RTKLib_Explorer fork here. Located on the really rich blog about GNSS and RTKLib named RTKLibExplorer, this tool works well and is well documented. The setting of parameters for static processing and obtain a single position is hard (set ON for “Output Single for Sol outage” and set a value for Max Sol Std)

Complementary tools for dealing with POS files from RTKLib and CSV files from ReachView :

PPP web-services

Static GNSS correction with web-service

This processing is done with static GNSS correction using a network of permanent stations.

RGP IGN http://rgp.ign.fr/SERVICES/calcul_online.php , good for France, gives results in many coordinate systems including RGF93-Lambert93

GNSS complentary data and tools

GPS and Glonass ephemeris data, along with atmospheric data at https://kb.igs.org/hc/en-us/articles/115003935351

and also here (search more simple) https://webigs.ign.fr/gdc/fr/product/format#ephem

and also here (search simple too) https://cddis.nasa.gov/Data_and_Derived_Products/GNSS/orbit_products.html

IGS Antenna calibration file (does not contain Emlid Reach RS2) : igs14.atx

List of IGS stations : here

GPS Calendar to get the GPS week : here or at IGN site

Julian calendar to get GPS day : here or at IGN site

Offset between GPST (GPS Time) and UTC : here

More information

téléchargement données tacheometre Leica

On peut télécharger les données acquises par le tachéomètre Lecia TCR 805 avec le logiciel Leica Geo Office. Ce logiciel ne s’installe que sur Windows 7. L’installation sur Windows 10 n’aboutit pas. Le logiciel se trouve ici: \\geomorpho\Logiciel\leica\Leica Geo Office Tools_fr.zip
Le téléchargement des données est très simple avec un câble série(pas d’installation de driver requise). Elle peut poser des problèmes avec un cable USB.

Pour le cable USB, le driver s’installe tout seul (validé sur Windows 7). Ensuite dans le logiciel GeoOffice, il faut sur le port COM correspondant configurer les paramètres avec l’instrument TPS800 et le taux de transfert 19200 baud. Les autres paramètres peuvent être laissés par défaut.

Ensuite dans la fenêtre de transfert des données, il suffit de faire glisser les fichiers.