Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10053 closed defect (fixed)

Failing projection unit tests

Reported by: simon04 Owned by: team
Priority: minor Milestone: 14.05
Component: Core Version:
Keywords: unit-test Cc: bastiK, Don-vip, stoecker, akks, Balaitous

Description

  1. To get around the failing SwissGridTest.projReferenceTest test, I'd suggest to duplicate the test into one with lower/higher epsilon (= deviation expectation), @Ignore the currently failing one and add a //TODO (see patch).
  1. Concerning ProjectionRefTest.test (http://donvip.fr/jenkins/job/JOSM/lastCompletedBuild/testReport/org.openstreetmap.josm.data.projection/ProjectionRefTest/test/): I obtain only 3 errors (see below). Is the test run differently on the Jenkins server?
    java.lang.AssertionError: Swiss Grid (Switzerland) (EPSG:21781): Inverse projecting eastnorth(608453.345582639,264441.147108637):
            expected: latlon(47.5306491920165,7.55087811333162),
            but got:  latlon(47.53064920249848,7.550878120683933)!
    Swiss Grid (Switzerland) (EPSG:21781): Inverse projecting eastnorth(521159.089286527,222910.747645586):
            expected: latlon(47.1524544215622,6.399035479565),
            but got:  latlon(47.152454432179425,6.399035485766948)!
    Swiss Grid (Switzerland) (EPSG:21781): Inverse projecting eastnorth(674324.501841715,181446.621066249):
            expected: latlon(46.7800480394318,8.41189565368906),
            but got:  latlon(46.78004804941435,8.411895662126815)!
    
    	at org.openstreetmap.josm.data.projection.ProjectionRefTest.test(ProjectionRefTest.java:89)
    

Attachments (1)

swiss.patch (1.9 KB) - added by simon04 6 years ago.

Download all attachments as: .zip

Change History (19)

Changed 6 years ago by simon04

Attachment: swiss.patch added

comment:1 Changed 6 years ago by bastiK

+1 for the patch.

comment:2 Changed 6 years ago by Don-vip

Concerning the test difference, I don't know, I'll look into it. Tests are run in a standard way (ant test-html). Ant is 1.9.2.

Ok for the patch. We have another ticket to implement high-precisions of Swiss projections.

I think the best approach is to rewrite NTV2 support to not embed anymore ntv2 files but allow to download them from JOSM website if required. Why? Because the swiss grid is huge, and we don't want to burden the jar size for all users that won't edit in Swiss :) It will also allow to reduce jar size for everyone by removing French and German grids by default.

What do you think?

comment:3 Changed 6 years ago by Don-vip

Component: unspecifiedCore
Milestone: 14.05

comment:4 in reply to:  description ; Changed 6 years ago by bastiK

Replying to simon04:

  1. Concerning ProjectionRefTest.test (http://donvip.fr/jenkins/job/JOSM/lastCompletedBuild/testReport/org.openstreetmap.josm.data.projection/ProjectionRefTest/test/): I obtain only 3 errors (see below). Is the test run differently on the Jenkins server?

Same here. The tests that fail on the Jenkins server are for projections where no reference data is included in the default data file data_nodist/projection-reference-data.csv. So it seems you somehow updated this file.

comment:5 Changed 6 years ago by simon04

In 7151/josm:

see #10053 - Make failing projection unit tests pass

Ignore failing swiss grid test with small epsilon and add TODO

comment:6 Changed 6 years ago by simon04

Summary: [Patch] Failing projection unit testsFailing projection unit tests

comment:7 in reply to:  2 Changed 6 years ago by bastiK

Replying to Don-vip:

I think the best approach is to rewrite NTV2 support to not embed anymore ntv2 files but allow to download them from JOSM website if required. Why? Because the swiss grid is huge, and we don't want to burden the jar size for all users that won't edit in Swiss :) It will also allow to reduce jar size for everyone by removing French and German grids by default.

What do you think?

The German grid increases size of the jar file by 38 kByte. It is needed to display Aerowest high resolution imagery and I would prefer to keep it built-in as long as the project is running. Swiss grid file was never asked for, so a plugin or automatic download like you suggest would be best. I don't know about the french grid file (takes 134 kByte), this would be your call. :)

comment:8 Changed 6 years ago by Don-vip

The French grid is used by almost everyone in France because we need it for the Cadastre. But that's 134 Kb lost for everyone else :) I'll try to see if I find an hybrid solution (support for built-in and external grids). The swiss grid has not really been asked for yet, but it would be a nice improvement, and we could have unit tests succeeding with a small epsilon :)

Last edited 6 years ago by Don-vip (previous) (diff)

comment:9 in reply to:  8 ; Changed 6 years ago by bastiK

Replying to Don-vip:

The French grid is used by almost everyone in France because we need it for the Cadastre. But that's 134 Kb lost for everyone else :)

If it's needed by a larger percentage of all JOSM users, then I wouldn't worry too much about it. Loading a single web page in a browser, often takes more than that. One option would be to create a separate plugin for the French grid file and make it a dependency for the Cadastre plugin.

comment:10 in reply to:  9 Changed 6 years ago by simon04

Replying to bastiK:

If it's needed by a larger percentage of all JOSM users, then I wouldn't worry too much about it.

+1

Alternatively, one could load it on demand using MirroredInputStream (for caching purposes) …

comment:11 in reply to:  4 Changed 6 years ago by Don-vip

Replying to bastiK:

the default data file data_nodist/projection-reference-data.csv. So it seems you somehow updated this file.

Good catch. The file is modified, I'm not sure exactly why, I revert it right now.

comment:12 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

comment:13 Changed 6 years ago by simon04

Very nice: "Jenkins build is back to stable!" :-)

comment:14 in reply to:  13 Changed 6 years ago by Don-vip

Cc: stoecker akks Balaitous added

Replying to simon04:

Very nice: "Jenkins build is back to stable!" :-)

Yep :)

@team: who's interested by being notified of build failures? Currently it sends an e-mail to Simon and me each time the build fails (compile error) or is unstable (unit test failure).

comment:15 Changed 6 years ago by stoecker

We could setup an account josm.openstreetmap.de, which could also log the data.

comment:16 Changed 6 years ago by Don-vip

log how? I'm not sure to understand. Through a new ticket?

comment:17 Changed 6 years ago by stoecker

In a mailbox on the server.

comment:18 Changed 6 years ago by Don-vip

I'm not sure to see the difference with our private e-mail addresses, but I can add whatever address you want :) Just tell me.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.