Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 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 10 years ago.

Download all attachments as: .zip

Change History (19)

by simon04, 10 years ago

Attachment: swiss.patch added

comment:1 by bastiK, 10 years ago

+1 for the patch.

comment:2 by Don-vip, 10 years ago

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 by Don-vip, 10 years ago

Component: unspecifiedCore
Milestone: 14.05

in reply to:  description ; comment:4 by bastiK, 10 years ago

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 by simon04, 10 years ago

In 7151/josm:

see #10053 - Make failing projection unit tests pass

Ignore failing swiss grid test with small epsilon and add TODO

comment:6 by simon04, 10 years ago

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

in reply to:  2 comment:7 by bastiK, 10 years ago

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 by Don-vip, 10 years ago

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 10 years ago by Don-vip (previous) (diff)

in reply to:  8 ; comment:9 by bastiK, 10 years ago

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.

in reply to:  9 comment:10 by simon04, 10 years ago

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) …

in reply to:  4 comment:11 by Don-vip, 10 years ago

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 by Don-vip, 10 years ago

Resolution: fixed
Status: newclosed

comment:13 by simon04, 10 years ago

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

in reply to:  13 comment:14 by Don-vip, 10 years ago

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 by stoecker, 10 years ago

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

comment:16 by Don-vip, 10 years ago

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

comment:17 by stoecker, 10 years ago

In a mailbox on the server.

comment:18 by Don-vip, 10 years ago

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. 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.