Forum

Author Topic: Transform Coordinates from WGS84 to LV95/LN02  (Read 10264 times)

PatrickKeuschAW

  • Newbie
  • *
  • Posts: 1
    • View Profile
Transform Coordinates from WGS84 to LV95/LN02
« on: January 20, 2022, 12:58:50 PM »
Hello Everyone

I have images from an RTK-Drone in the WGS84-System (EPSG:4326). My targed coordinate system is the Swiss-Projection LV95 / LN02 (EPSG: 2056). In the EPSG:2056 is the Height-System not correct defined, as I suppose. It does not use the Height-System of LN02 (Landesnivellement 1902 of Switzerland). I always get a difference in height between 20cm to 50cm to the Ground Controll Points, depending on the position of the project.

For me this looks like a Geoid-problem, so i tried to include the geoid file of Switzerland from https://www.agisoft.com/downloads/geoids/ named "ETRS89 (EPSG::4937) to LN02 height (EPSG::5728)", but there's always an error saying the coordinate systems of the geoid file does not match the selected coordinate system.

Is there another transformation step necessary? How do I correctly incorporate the geoid file and transform the coordinates to LV95 / LN02?

Thank you for helping out!

I am using the latest Agisoft-Version 1.8.0.13794 and the DJI Panthom 4 RTK-Drone.

Paulo

  • Hero Member
  • *****
  • Posts: 1359
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #1 on: January 20, 2022, 01:20:28 PM »
Hello Patrick,

the geoid you downloaded from Geoids page is referred to ETRS89 datum. I believe your LV95 / LN02 projection is referred to different datum, CH1903+. So the geoid is not compatible with CH1903+. To create a geoid referred to your datum follow indications from https://agisoft.freshdesk.com/support/solutions/articles/31000161533-what-to-do-if-you-need-to-use-an-existing-geoid-on-another-datum.

It should work,

PS. as you can see the transformed geoid ch_swisstopo_chgeo2004_CH1903+_LN02.tif has geoid height values much smaller -4 to 4 than original geoid as CH1903+ datum spheroid is shifted from Earth Geocenter to better fit the geoid in Switzerland...
« Last Edit: January 20, 2022, 04:04:22 PM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

Guigs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #2 on: October 03, 2023, 12:05:13 PM »
Hello Patrick,


Did you manage to configure correctly to transform images coming from a drone with RTK into the Swiss system taking into account the geoid?

I am in the same situation..
Thanks.

Guillaume

Paulo

  • Hero Member
  • *****
  • Posts: 1359
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #3 on: October 04, 2023, 12:33:02 AM »
You can just use the Following géoïde tif file for LN02 height (copied in Agisoft geoids folder). And then create a Compound CS using LV02 height as vertical CS as in:


Compound Coordinate System: CH1903+ / LV95 + LN02 height
Projected Coordinate System: CH1903+ / LV95 (EPSG::2056)
Linear Units: metre (EPSG::9001)
Projection Method: Hotine Oblique Mercator (variant B)
    Latitude of projection centre: 46.9524056
    Longitude of projection centre: 7.43958333
    Azimuth of initial line: 90
    Angle from Rectified to Skew Grid: 90
    Scale factor on initial line: 1
    Easting at projection centre: 2600000
    Northing at projection centre: 1200000
Geographic Coordinate System: CH1903+ (EPSG::4150)
Angular Units: degree (EPSG::9102)
Geodetic Datum: CH1903+ (EPSG::6150)
Ellipsoid: Bessel 1841 (EPSG::7004)
Prime Meridian: Greenwich (EPSG::8901)
Vertical Coordinate System: LN02 height (EPSG::5728)
Vertical Units: metre (EPSG::9001)
Vertical Datum: Landesnivellement 1902 (EPSG::5127)
Best Regards,
Paul Pelletier,
Surveyor

Guigs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #4 on: October 04, 2023, 07:29:03 AM »
Thanks I will try.

Basti

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #5 on: February 26, 2024, 01:04:53 PM »
Hey Guigs

did you tried it yet? I am in the same position. Using a DJI RTK drone with swipos LN02 datastream, and measuring my gcp in EPSG 2056 / LN02 heights. If I convert the WGS84 in Agisoft to LV95, I get different coordinates than if I use swisstopo's REFRAME-tool for the transformation. Did you checked this already?

Paulo

  • Hero Member
  • *****
  • Posts: 1359
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #6 on: February 28, 2024, 12:46:48 AM »
Hi all,

it seems that the Swiss  files  in Geoids page are inverted: ie. LN02 height for LHN95 and LHN95 height for LN02.

Anyway I downloaded the correct geoid for LN02 from swisstopo (including Htrans) and created a new tif geoid file for LN02 height. Just copy the attached file to your Agisoft geoids folder and it should work down to mm ...

As a test I transformed a point from WGS84(ETRS89) to  CH1903+ / LV95 + LN02 height and got from REFRAME:
Code: [Select]
--------------------------------------------------------------------------------
swisstopo GeoSuite
2/27/2024 10:22 PM
--------------------------------------------------------------------------------

Transformations:
----------------

1:      REFRAME
        -------

        Change planimetry:      yes
                Input:          Global coordinates ETRF93/CHTRF95 (ETRS89/CHTRS95/≈WGS84)
                                Format: Geographic Lon/Lat/Alt in [°]  (LTOP ED)
                Output:         Plane coordinates LV95 (CH1903+)
                                Format: LV95 (Berne=2600/1200 km)

        Change altimetry:       yes
                Input:          Ellipsoidal heights (GRS80)
                Output:         National leveling network LN02 (leveled heights)

        Parameters and datasets used:
                1: GPSRef       CHTRF95/CH1903+ (swisstopo 1997)
                2: CHGeo        CHGeo2004 (swisstopo 2004)
                3: Htrans       HTRANS (swisstopo 2005)

--------------------------------------------------------------------------------

File 1:
-------

Input:          point 1 7.977088 46.831100 1638.000000

Output:         point 1 2641081.559 1186802.092 1587.950

Processing terminated successfully. 1 points transformed without any error. 0'00".

--------------------------------------------------------------------------------

and in second attachment you see result in Metashape. The results are the same down to mm level...

Hope this can help.
« Last Edit: February 28, 2024, 05:24:22 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

jerm

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #7 on: March 05, 2024, 05:09:05 PM »
Hello everyone,

First of all, thanks Paulo and the other for your help.
I've tried your solution and it works like you.

I downloaded the geoid here, from the swisstopo website: https://www.swisstopo.admin.ch/fr/geoid-fr
The zip file contains 4 geoids. I've used chgeo2004_htrans_LV95.agr (which allows to transform the height to LH02). Then I converted the .agr file to a .tif file in QGIS (EPSG2056).

Then I created a CS as you explained. Finally I have exactly the same result as you:
The point 7.977088 / 46.831100 / 1638.000 in WGS84 becomes 2641081.559 / 1186802.092 / 1587.950 in LV95 + LN02 (with Agisoft). At this point, the result between Agisoft and Reframe are actually the same

But after working in the canton of Vaud, I've see difference between Agisoft and Reframe (6mm in H).
So I've created a grid (1kmx1km) of points in the canton to see the divergence between Agisoft and Reframe (from coordinate 2495000/1145000 to 2560000/1189000, altitude always = 500m).
I have transformed these coordinates in WGS84 with Reframe, and the I have put them in Agisoft to transform them again in LV95/LH02. Then I've calculated the dH (LH02) between the base coordinate and the coordinate from Agisoft.
My result can be seen in the attachment. The plot shows the delta H (dH in mm) between the result from Agisoft and Reframe. The min/max dH is -62mm/13mm.

Do you have any idea why I had this divergence between Agisoft and Reframe? In my opinion there should be almost no difference.

PS:
In the attachment:
grid1x1VD_MN95.txt = base coordinate (grid of 1x1km in MN95)
grid1xVD_MN95_2_WGS84_wReframe.txt = coordinate transformed with reframe from MN95/LH02 ->WGS84
grid1xVD_WGS84_2_MN95_wAgisoft.txt = coordinate retransformed with Agisoft from WGS84->MN95/LH02
« Last Edit: March 05, 2024, 06:17:40 PM by jerm »

Paulo

  • Hero Member
  • *****
  • Posts: 1359
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #8 on: March 05, 2024, 07:46:48 PM »
Bonjour jerm,

I redid the calculation but this time not supposing 500 m elevation for all points as this  is false. Since the datum transformation is 3d the correct elevations should be taken into account. So I extracted them from Aster DEM  and used them instead of 500 everywhere. After transforming to WGS84 with Reframe and then to LV95 LN02 with Agisoft... I get a smaller difference (min -16 mm, max 13 mm. And most (68%) within -4 mm and 2mm.... see attached screen capture and corresponding file...

La difference restante peut être expliquée par différents types d'interpolation  utilisées par Reframe et Agisoft...?

En fait en fouillant la documentation sur Reframe, il semble que la dernière version inclut une transformation différente de celle donnée juste par le fichier chgeo2004_htrans_LV95.agr.. voir extrait du document :
Quote
Transformation d’altitudes usuelles en altitudes orthométriques Une transformation d’altitudes usuelles (NF02) en altitudes orthométriques (RAN95) n’est possible que de manière approchée, en raison des distorsions locales en NF02 ainsi que des différences dans la correction de l'influence du champ de pesanteur. Elle s’effectue sur la base d’une interpolation planimétrique pondérée d’une part, d’un facteur d’échelle altimétrique obtenu par interpolation biquadratique dans une grille de 1x1 km d’autre part. La précision moyenne de cette transformation est meilleure que le cm sur le plateau et le long des lignes de nivellement national, mais peut être supérieure à 10 cm dans les Alpes. Cette fonctionnalité de REFRAME remplace le programme HTRANS.

ceci devrait expliquer la différence rencontrée...
« Last Edit: March 09, 2024, 03:11:14 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

Basti

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Transform Coordinates from WGS84 to LV95/LN02
« Reply #9 on: September 12, 2024, 12:22:29 PM »
Hi all


Thank you for your assistance. We have recently purchased another DJI drone and are once again encountering issues with altitude measurements. Additionally, we are unable to define a new coordinate system that incorporates the geoid. This may be due to the lack of administrative rights provided by the corporate system.

Could you kindly provide the appropriate projection file (.prj) for this scenario? I suspect that, since Agisoft is not loading the geoid from the designated folder, we need to define the geoid within the vertical coordinate system.

Best
Basti