Ticket #17529: 17529_patch.diff

File 17529_patch.diff, 1.1 KB (added by openbrian, 7 years ago)

a patch to bring back attributes for polygons

  • src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java

     
    154154                OsmPrimitive op = null;
    155155                Geometry g = gc.getGeometryN(i);
    156156                if (g instanceof Polygon) {
     157                    // TODO: Split this section between Polygon and MultiPolygon.
    157158                    Relation r = (Relation) op;
    158159                    Polygon p = (Polygon) g;
    159160                    // Do not create relation if there's only one polygon without interior ring
     
    169170                            addWayToMp(r, "inner", createOrGetWay(p.getInteriorRingN(j)));
    170171                        }
    171172                    }
     173                    op = r != null ? r : w;
    172174                } else if (g instanceof LineString) {
    173175                    op = createOrGetWay((LineString) g);
    174176                } else if (g instanceof Point) {