Ticket #24073: 20473.patch

File 20473.patch, 4.6 KB (added by GerdP, 15 months ago)

tests and simple rendering

  • src/org/openstreetmap/josm/data/osm/OsmPrimitive.java

     
    7171                "(aerialway=t-bar & -oneway=no) | "+
    7272                "(aerialway=j-bar & -oneway=no) | "+
    7373                "(aerialway=platter & -oneway=no) | "+
    74                 "waterway=stream | waterway=river | waterway=ditch | waterway=drain | waterway=tidal_channel | "+
     74                "waterway=stream | waterway=river | waterway=ditch | waterway=drain | waterway=tidal_channel | waterway=fish_pass | "+
    7575                "(\"piste:type\"=downhill & -area=yes) | (\"piste:type\"=sled & -area=yes) | (man_made=\"piste:halfpipe\" & -area=yes) | "+
    7676                "(junction=circular & -oneway=no) | junction=roundabout | (highway=motorway & -oneway=no & -oneway=reversible) | "+
    7777                "(highway=motorway_link & -oneway=no & -oneway=reversible)";
  • src/org/openstreetmap/josm/data/validation/tests/CrossingWays.java

     
    133133            if (w1.hasKey(RAILWAY) && w2.hasKey(RAILWAY) && (w1.hasTag(RAILWAY, "yard") != w2.hasTag(RAILWAY, "yard")
    134134                    || w1.hasTag(RAILWAY, "halt") != w2.hasTag(RAILWAY, "halt")))
    135135                return true;  // see #20089, #21541
    136             return (w1.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && isWaterArea(w2))
    137                     || (w2.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch") && isWaterArea(w1));
     136            return (w1.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch", "fish_pass") && isWaterArea(w2))
     137                    || (w2.hasTag(WATERWAY, "river", "stream", "canal", "drain", "ditch", "fish_pass") && isWaterArea(w1));
    138138        }
    139139
    140140        @Override
  • resources/data/validator/geometry.mapcss

     
    3434node[waterway=river],
    3535node[waterway=canal],
    3636node[waterway=stream],
     37node[waterway=fish_pass],
    3738node[waterway=ditch],
    3839node[waterway=drain],
    3940node[natural=coastline],
     
    375376}
    376377
    377378/* #12646, #12992, #16334 */
    378 way[waterway=~/^(stream|river|drain)$/]!:closed >[index=-1] node[natural!=sinkhole][natural!=cave_entrance][waterway!=stream_end]!:connection:in-downloaded-area {
     379way[waterway=~/^(stream|river|drain|fish_pass)$/]!:closed >[index=-1] node[natural!=sinkhole][natural!=cave_entrance][waterway!=stream_end]!:connection:in-downloaded-area {
    379380  throwWarning: tr("Waterway ends without a connection to another waterway or the direction of the waterway is wrong.");
    380381}
    381382
     
    397398area:closed[waterway = drain][area!=no],
    398399area:closed[waterway = ditch][area!=no],
    399400area:closed[waterway = stream][area!=no],
     401area:closed[waterway = fish_pass][area!=no],
    400402area:closed[waterway = river][area!=no] {
    401403  throwWarning: tr("{0} is the tag for the linear waterway. To tag the water area use {1} + {2} instead.", "{1.tag}", "natural=water", "water=*");
    402404}
  • resources/styles/standard/elemstyles.mapcss

     
    53395339    casing-width: 1;
    53405340    casing-color: pipeline#660000;
    53415341}
    5342 way[waterway=stream] {
     5342way[waterway=stream] { 
    53435343    width: 1;
    53445344    color: stream#6600cc;
    53455345}
     5346way[waterway=fish_pass] {
     5347    width: 1;
     5348    color: water#0000ff;
     5349    dashes: 10,10;
     5350}
    53465351way[waterway=ditch],
    53475352way[waterway=drain] {
    53485353    width: 1;
     
    53565361area[waterway=riverbank][intermittent=yes],
    53575362way[waterway=canal][intermittent=yes],
    53585363way[waterway=stream][intermittent=yes],
     5364way[waterway=fish_pass][intermittent=yes],
    53595365way[waterway=ditch][intermittent=yes],
    53605366way[waterway=drain][intermittent=yes],
    53615367way[waterway=tidal_channel][intermittent=yes] {
     
    54345440}
    54355441node[waterway=river], node[waterway=riverbank],
    54365442node[waterway=canal], node[waterway=wadi],
    5437 node[waterway=stream],
     5443node[waterway=stream], node[waterway=fish_pass],
    54385444node[waterway=ditch], node[waterway=drain] {
    54395445    icon-image: "presets/misc/deprecated.svg";
    54405446    set icon_z17;