Changeset 14115 in josm


Ignore:
Timestamp:
2018-08-10T19:05:33+02:00 (6 weeks ago)
Author:
Don-vip
Message:

fix #13488 - new advanced property geojson.export.skip-empty-nodes to control if empty nodes are exported in GeoJSON

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r13589 r14115  
    3131import org.openstreetmap.josm.data.osm.Way;
    3232import org.openstreetmap.josm.data.osm.visitor.OsmPrimitiveVisitor;
     33import org.openstreetmap.josm.data.preferences.BooleanProperty;
    3334import org.openstreetmap.josm.data.projection.Projection;
    3435import org.openstreetmap.josm.data.projection.Projections;
     
    4647    private final DataSet data;
    4748    private final Projection projection;
    48     private static final boolean SKIP_EMPTY_NODES = true;
     49    private static final BooleanProperty SKIP_EMPTY_NODES = new BooleanProperty("geojson.export.skip-empty-nodes", true);
    4950
    5051    /**
     
    166167        if (p.isIncomplete()) {
    167168            return;
    168         } else if (SKIP_EMPTY_NODES && p instanceof Node && p.getKeys().isEmpty()) {
     169        } else if (SKIP_EMPTY_NODES.get() && p instanceof Node && p.getKeys().isEmpty()) {
    169170            return;
    170171        }
Note: See TracChangeset for help on using the changeset viewer.