Changeset 18061 in josm for trunk/test


Ignore:
Timestamp:
2021-07-18T06:58:54+02:00 (3 years ago)
Author:
Don-vip
Message:

see #21131 - Improve GPX image correlation: direction detection and position shift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java

    r17888 r18061  
    115115    @Test
    116116    void testMatchGpxTrack1() {
    117         assertEquals(7, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     117        assertEquals(7, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    118118        assertEquals(null, ib.getPos());
    119119        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos()); // start of track
     
    167167        s.putBoolean("geoimage.seg.int", false);
    168168
    169         assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     169        assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    170170        assertEquals(null, ib.getPos());
    171171        assertEquals(null, i0.getPos());
     
    195195        s.putBoolean("geoimage.seg.int", false);
    196196
    197         assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     197        assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    198198        assertEquals(null, ib.getPos());
    199199        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos());
     
    217217    @Test
    218218    void testMatchGpxTrack4() {
    219         assertEquals(9, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, true));
     219        assertEquals(9, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, true)));
    220220        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), ib.getPos());
    221221        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos());
     
    254254        s.putBoolean("geoimage.seg.int.dist", false);
    255255
    256         assertEquals(9, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     256        assertEquals(9, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    257257        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), ib.getPos());
    258258        assertEquals(new CachedLatLon(47.19286847859621, 8.79732714034617), i0.getPos());
     
    288288        s.putBoolean("geoimage.seg.int", false);
    289289
    290         assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     290        assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    291291    }
    292292
     
    307307        s.putBoolean("geoimage.seg.int", false);
    308308
    309         assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     309        assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    310310    }
    311311
     
    326326        s.putBoolean("geoimage.seg.int", false);
    327327
    328         assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     328        assertEquals(4, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    329329    }
    330330
     
    345345        s.putBoolean("geoimage.seg.int", false);
    346346
    347         assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, 0, false));
     347        assertEquals(6, GpxImageCorrelation.matchGpxTrack(images, gpx, new GpxImageCorrelationSettings(0, false)));
    348348    }
    349349
Note: See TracChangeset for help on using the changeset viewer.