Changeset 7280 in josm


Ignore:
Timestamp:
2014-07-01T19:23:18+02:00 (5 years ago)
Author:
simon04
Message:

fix #10120 see #10215 - Validator: do not warn "Overlapping Water Areas" for overlaps of water areas with normal areas

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/validator/geometry.mapcss

    r7279 r7280  
    2828}
    2929
    30 area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area {
     30/* area:closed:areaStyle.water_area ⧉ area:closed:areaStyle.water_area -- does not work for now -- see ticket#10215 */
     31area:closed:areaStyle[natural =~ /^(water|wetland|coastline)$/] ⧉ area:closed:areaStyle.water_area,
     32area:closed:areaStyle[landuse=reservoir]                        ⧉ area:closed:areaStyle.water_area {
    3133  throwWarning: tr("Overlapping Water Areas");
    3234}
  • trunk/src/org/openstreetmap/josm/gui/mappaint/mapcss/Selector.java

    r7169 r7280  
    225225            @Override
    226226            public void visit(Way w) {
    227                 if (e.child == null && left.matches(e.withPrimitive(w))) {
     227                if (e.child == null && left.matches(new Environment().withPrimitive(w))) {
    228228                    if (e.osm instanceof Way && Geometry.PolygonIntersection.CROSSING.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))) {
    229229                        e.child = w;
     
    241241            @Override
    242242            public void visit(Node n) {
    243                 if (e.child == null && left.matches(e.withPrimitive(n))) {
     243                if (e.child == null && left.matches(new Environment().withPrimitive(n))) {
    244244                    if (e.osm instanceof Way && Geometry.nodeInsidePolygon(n, ((Way) e.osm).getNodes())
    245245                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isNodeInsideMultiPolygon(n, (Relation) e.osm, null)) {
     
    251251            @Override
    252252            public void visit(Way w) {
    253                 if (e.child == null && left.matches(e.withPrimitive(w))) {
     253                if (e.child == null && left.matches(new Environment().withPrimitive(w))) {
    254254                    if (e.osm instanceof Way && Geometry.PolygonIntersection.FIRST_INSIDE_SECOND.equals(Geometry.polygonIntersection(w.getNodes(), ((Way) e.osm).getNodes()))
    255255                            || e.osm instanceof Relation && ((Relation) e.osm).isMultipolygon() && Geometry.isPolygonInsideMultiPolygon(w.getNodes(), (Relation) e.osm, null)) {
     
    284284                    final Relation multipolygon = multipolygons.iterator().next();
    285285                    if (multipolygon == null) throw new NoSuchElementException();
    286                     containsFinder = new ContainsFinder(e.withPrimitive(multipolygon)) {
     286                    containsFinder = new ContainsFinder(new Environment().withPrimitive(multipolygon)) {
    287287                        @Override
    288288                        public boolean isPrimitiveUsable(OsmPrimitive p) {
Note: See TracChangeset for help on using the changeset viewer.