Modify

Opened 7 years ago

Closed 7 weeks ago

Last modified 7 weeks ago

#5399 closed defect (fixed)

Swissgrid CH1903 is off by up to 3 meters (does not use data set of local corrections )

Reported by: bastiK Owned by: team
Priority: normal Milestone: 17.03
Component: Core Version: latest
Keywords: projection swiss unit test ntv2 grid Cc: sbrunner, stoecker, simon04, wiktorn, Klumbumbus, sebastic

Description (last modified by Don-vip)

To calculate CH1903, 2 steps are required:

(1) WSG84 -> CH1903+ (using a formula)

(2) CH1903+ -> CH1903 (using a grid / triangulation file)

Step (1) if fully implemented. However step (2) is missing. It introduces corrections of up to 3 meters (plus false easting/northing of 2000000/1000000) and accounts for the historical deviations from the modern system.

To fix this, we could:

  • Use the "official" triangulation file and FINELTRA algorithm.
  • Use the NTv2 grid file provided by swisstopo. This is an approximation, but should be in general good enough for osm use.

Link:
http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/software/products/chenyx06.html

Attachments (4)

CHENyx06.bin.zip (319.8 KB) - added by bastiK 7 years ago.
triagulation data (binary format)
reframeLib.jar (1.9 MB) - added by Don-vip 2 months ago.
developper_manual.pdf (738.1 KB) - added by Don-vip 2 months ago.
reframe.patch (4.7 KB) - added by Don-vip 2 months ago.

Change History (36)

comment:1 Changed 7 years ago by bastiK

see also #5327

comment:2 Changed 7 years ago by bastiK

Cc: sbrunner added

Changed 7 years ago by bastiK

Attachment: CHENyx06.bin.zip added

triagulation data (binary format)

comment:3 Changed 7 years ago by bastiK

On the swisstopo website only NTv2 grid is available, but the link to the triangulation file is dead.

I sent an email to swisstopo and received the file in binary format. (The link is still not working.)

comment:4 Changed 7 years ago by bastiK

@sbrunner: Do you like to pursue this? I haven't found any documentation on the low-level format of the binary file.

comment:5 Changed 7 years ago by sbrunner

Hi,

Yes, I plan to see what is possible to do but not right now, (actually I'm working on better support of OSM file format in OpenLayers ;-) )

CU, Stéphane

comment:6 Changed 7 years ago by bastiK

Ok, if you are able to decipher the binary format, let me know!

Sebastian

comment:7 Changed 4 years ago by Don-vip

Ticket #8949 has been marked as a duplicate of this ticket.

comment:8 Changed 4 years ago by Don-vip

Description: modified (diff)
Keywords: swiss unit test added

comment:9 Changed 2 months ago by Don-vip

There is now a free official Java library on Swisstopo website: https://shop.swisstopo.admin.ch/fr/products/geo_software/DLL_info

Changed 2 months ago by Don-vip

Attachment: reframeLib.jar added

Changed 2 months ago by Don-vip

Attachment: developper_manual.pdf added

Changed 2 months ago by Don-vip

Attachment: reframe.patch added

comment:10 Changed 2 months ago by Don-vip

I started to play with the library (see attached jar, developer manual and not-working patch) but can't find the correct usage. bastiK can you please help me? :)

comment:11 Changed 2 months ago by bastiK

I think you should convert to military LV03 (EPSG:21781) and not the civil which is no longer in use.

comment:12 Changed 2 months ago by bastiK

They do have a download for the NTv2 grid file by now, so no extra code or library is needed. I couldn't find appropriate terms and on the current side, but this offer should still apply. This means The conditions are similar to those of the other grid files we distribute.

comment:13 Changed 2 months ago by Don-vip

Ah, even better. Do we need the two NTv2 grids or only one?

Concerning the license it seems OK, to be sure we can include it in the SVN as the URLs are not stable. Even if not strictly required, we can also apply the first licence for free geodata obligation:

To add a clearly visible source reference with the following wording whenever geodata are published or passed on: “Source: Swiss Federal Office of Topography” (Article 30, Geoinformation Ordinance);

comment:14 Changed 8 weeks ago by bastiK

The one labelled "NTv2 grid ETRF93/ETRS89 -> CH1903/LV95" should be enough to add full EPSG:21781 support. (I think CH1903/LV95 is a typo and they mean CH1903/LV03.)

It works with the cs2cs tools, so there should be no problem in JOSM:

$ echo "601000.0 197500.0 555.0" | cs2cs +proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +x_0=600000 +y_0=200000 +ellps=bessel +nadgrids=./CHENYX06_etrs.gsb +to +proj=lonlat +datum=WGS84
7d27'6.35"E	46d55'42.94"N 555.000

How do you plan to make the file available to the user as its 3 MB?

comment:15 Changed 8 weeks ago by Don-vip

Cc: stoecker simon04 wiktorn Klumbumbus added

Good question. I think it would be worth to implement a NTV2 file management as official JOSM extension. If the default JOSM jar does not contain the required NTV2 files, the first time a user chooses a projection that requires ones, the grid is downloaded from JOSM server and stored in JOSM cache directory.

We could also still build a bigger jar file containing all grids for users who need JOSM to remain fully operational without Internet access.

@team: what you do think?

comment:16 Changed 8 weeks ago by stoecker

Sounds like a good idea and makes the JAR smaller.

comment:17 Changed 8 weeks ago by Don-vip

Keywords: ntv2 grid added
Milestone: 17.04
Priority: minornormal

OK. I will first try to implement this system with existing NTV2 grids through #14422 before adding the Swiss grid.

Last edited 8 weeks ago by Don-vip (previous) (diff)

comment:18 Changed 8 weeks ago by bastiK

+1

comment:19 Changed 8 weeks ago by Don-vip

I have sent an e-mail to SwissTopo to ask them clarifications about the redistribution/licence. I hope the grids will then be included into proj.4 as well.

comment:20 Changed 8 weeks ago by sebastic

Cc: sebastic added

comment:21 Changed 8 weeks ago by bastiK

Aren't they already? What is missing from proj.4 is the German BETA2007.gsb.

comment:22 in reply to:  21 ; Changed 8 weeks ago by Don-vip

Replying to bastiK:

Aren't they already?

No, see here.

What is missing from proj.4 is the German BETA2007.gsb.

Can you please create a ticket or even a PR? I'm not familiar with this one ;)

comment:23 Changed 8 weeks ago by sebastic

The PROJ.4 documentation lists most common national grids, see:

http://proj4.org/grids.html

comment:24 Changed 8 weeks ago by Don-vip

Milestone: 17.0417.03

#14422 was a lot easier than I thought :)

comment:25 in reply to:  22 Changed 8 weeks ago by bastiK

Replying to Don-vip:

Replying to bastiK:

Aren't they already?

No, see here.

What is missing from proj.4 is the German BETA2007.gsb.

Okay, I falsely assumed the content of the proj-data Debian package is the same as what is in the proj.4 repository. Apparently the debian maintainer add the Swiss grid file when the package is built.

Can you please create a ticket or even a PR? I'm not familiar with this one ;)

I've sent an email to the contact person of the German agency to clarify the usage terms.

comment:26 Changed 7 weeks ago by Don-vip

In 11660/josm:

see #5399 - Swissgrid: add NTv2 grid file provided by swisstopo

comment:27 Changed 7 weeks ago by Don-vip

ProjectionRefTest needs an update but I cannot do it :(

comment:28 Changed 7 weeks ago by bastiK

In 11661/josm:

see #5399 - update ProjectionRefTest

comment:29 in reply to:  27 Changed 7 weeks ago by bastiK

Replying to Don-vip:

ProjectionRefTest needs an update but I cannot do it :(

I hoped others would be able to update it too ...

comment:30 Changed 7 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

Thanks! I tried but cs2cs always replied "* *" and I didn't understand why.

comment:31 Changed 7 weeks ago by Don-vip

Summary: Swissgrild CH1903 is off by up to 3 meters (does not use data set of local corrections )Swissgrid CH1903 is off by up to 3 meters (does not use data set of local corrections )

comment:32 Changed 7 weeks ago by bastiK

Maybe works now with changes from [11661] (try again next time...).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.