Changeset 30097 in osm
- Timestamp:
- 2013-11-25T02:47:26+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/build.xml
r30086 r30097 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <project name="opendata" default="dist" basedir="."> 3 <property name="plugin.main.version" value="6 358"/>3 <property name="plugin.main.version" value="6412"/> 4 4 <property name="plugin.author" value="Don-vip"/> 5 5 <property name="plugin.class" value="org.openstreetmap.josm.plugins.opendata.OdPlugin"/> -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java
r29657 r30097 30 30 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 31 31 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.associations.Club3eAgeHandler; 32 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.BureauxVoteDecoupageHandler; 32 33 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.BureauxVoteHandler; 33 34 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.MairieAnnexeHandler; … … 90 91 handlers.add(PMRHandler.class); 91 92 handlers.add(PistesCyclablesHandler.class); 93 handlers.add(BureauxVoteDecoupageHandler.class); 92 94 handlers.add(BureauxVoteHandler.class); 93 95 handlers.add(Club3eAgeHandler.class); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/BureauxVoteHandler.java
r28554 r30097 38 38 replace(r, "TEXT", "name"); 39 39 r.put("polling_station", "2012"); 40 r.put("building", "yes"); 41 String name = r.getName(); 42 if (name != null) { 43 if (name.contains("ECOLE") || name.contains("MATERNELLE")) { 44 r.put("amenity", "school"); 45 } else if (name.contains("MAIRIE")) { 46 r.put("amenity", "townhall"); 47 } else if (name.contains("PISCINE")) { 48 r.put("leisure", "swimming_pool"); 49 } 50 } 40 51 } 41 52 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/datasets/DataSetUpdater.java
r28053 r30097 21 21 22 22 import org.openstreetmap.josm.Main; 23 import org.openstreetmap.josm.actions.SimplifyWayAction; 24 import org.openstreetmap.josm.command.SequenceCommand; 23 25 import org.openstreetmap.josm.data.osm.DataSet; 26 import org.openstreetmap.josm.data.osm.OsmPrimitive; 27 import org.openstreetmap.josm.data.osm.Relation; 28 import org.openstreetmap.josm.data.osm.Way; 24 29 import org.openstreetmap.josm.plugins.opendata.core.OdConstants; 25 30 … … 40 45 handler.checkDataSetSource(dataSet); 41 46 handler.checkNames(dataSet); 47 // Replace multipolygons with single untagged member by their sole member 48 for (Relation r : dataSet.getRelations()) { 49 if (r.isMultipolygon() && r.getMembersCount() == 1) { 50 OsmPrimitive outer = r.getMember(0).getMember(); 51 if (!outer.isTagged()) { 52 r.remove("type"); 53 r.removeMember(0); 54 outer.setKeys(r.getKeys()); 55 dataSet.removePrimitive(r); 56 } 57 } 58 } 59 // Simplify ways geometries 60 for (Way w : dataSet.getWays()) { 61 SequenceCommand command = Main.main.menu.simplifyWay.simplifyWay(w, 0.25); 62 if (command != null) { 63 Main.main.undoRedo.addNoRedraw(command); 64 } 65 } 42 66 } 43 67 }
Note:
See TracChangeset
for help on using the changeset viewer.