Changeset 14582 in josm for trunk


Ignore:
Timestamp:
2018-12-22T08:32:39+01:00 (5 months ago)
Author:
GerdP
Message:

see #17119: Add unit test with rather complex multipolygon and small rendering area

You get this when you use "download from overpass" with an empty query on a rather small bbox near the a complex MP, in this case Lake Ontario.

Location:
trunk
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/performance/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRendererPerformanceTestParent.java

    r12551 r14582  
    44import java.awt.Color;
    55import java.awt.Graphics2D;
     6import java.awt.Point;
    67import java.awt.image.BufferedImage;
    7 import java.awt.Point;
    88import java.io.File;
    99import java.io.FileInputStream;
     
    4242    private static DataSet dsRestriction;
    4343    private static DataSet dsMultipolygon;
     44    private static DataSet dsOverpass;
    4445    private static DataSet dsCity;
    4546
     
    7980        StyledMapRenderer.PREFERENCE_TEXT_ANTIALIASING.put("gasp");
    8081
    81         try (
    82             InputStream fisR = new FileInputStream("data_nodist/restriction.osm");
    83             InputStream fisM = new FileInputStream("data_nodist/multipolygon.osm");
    84             InputStream fisC = Compression.getUncompressedFileInputStream(new File("data_nodist/neubrandenburg.osm.bz2"));
    85         ) {
     82        try (InputStream fisR = new FileInputStream("data_nodist/restriction.osm");
     83                InputStream fisM = new FileInputStream("data_nodist/multipolygon.osm");
     84                InputStream fisC = Compression.getUncompressedFileInputStream(new File("data_nodist/neubrandenburg.osm.bz2"));
     85                InputStream fisO = Compression.getUncompressedFileInputStream(new File("data_nodist/overpass-download.osm.bz2"));) {
    8686            dsRestriction = OsmReader.parseDataSet(fisR, NullProgressMonitor.INSTANCE);
    8787            dsMultipolygon = OsmReader.parseDataSet(fisM, NullProgressMonitor.INSTANCE);
    8888            dsCity = OsmReader.parseDataSet(fisC, NullProgressMonitor.INSTANCE);
     89            dsOverpass = OsmReader.parseDataSet(fisO, NullProgressMonitor.INSTANCE);
    8990        }
    9091    }
     
    130131
    131132    @Test
     133    /**
     134     * Complex polygon (Lake Ontario) with small download area.
     135     */
     136    public void testOverpassDownload() throws Exception {
     137        test(20, dsOverpass, new Bounds(43.4510496, -76.536684, 43.4643202, -76.4954853));
     138    }
     139
     140    @Test
    132141    public void testCity() throws Exception {
    133142        test(50, dsCity, new Bounds(53.51, 13.20, 53.59, 13.34));
Note: See TracChangeset for help on using the changeset viewer.