Changeset 30303 in osm
- Timestamp:
- 2014-02-25T00:13:55+01:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java
r30097 r30303 53 53 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.patrimoine.Parcelles1830Handler; 54 54 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.services.MarchesPleinVentHandler; 55 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.services.PointsLumineuxHandler; 55 56 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveBalmaHandler; 56 57 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveToulouseHandler; … … 120 121 handlers.add(MarchesPleinVentHandler.class); 121 122 handlers.add(AiresPietonnesHandler.class); 123 handlers.add(PointsLumineuxHandler.class); 122 124 } 123 125 -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/enfance/CrechesHandler.java
r28554 r30303 16 16 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance; 17 17 18 import org.apache.commons.lang3.text.WordUtils; 18 19 import org.openstreetmap.josm.data.osm.DataSet; 19 20 import org.openstreetmap.josm.data.osm.Node; … … 38 39 n.put("amenity", "kindergarten"); 39 40 replace(n, "NOM", "name"); 41 n.put("name", WordUtils.capitalizeFully(n.get("name"))); 42 n.remove("QUARTIER"); 43 n.remove("RUE"); 44 replace(n, "NUM", "addr:housenumber"); 45 n.remove("CP"); 46 n.remove("STIADR"); 47 if (n.hasKey("NATURE")) { 48 String nature = n.get("NATURE"); 49 if (nature.equals("CC")) { 50 nature = "Crèche collective"; 51 } else if (nature.equals("CF")) { 52 nature = "Crèche familiale"; 53 } else if (nature.equals("HG")) { 54 nature = "Halte-Garderie"; 55 } else if (nature.equals("JE")) { 56 nature = "Jardin d'Enfants"; 57 } else if (nature.equals("MA")) { 58 nature = "Multi-Accueil"; 59 } 60 n.remove("NATURE"); 61 n.put("description", nature); 62 } 63 if (n.hasKey("NATGEST")) { 64 String gest = n.get("NATGEST").split(" ")[1]; 65 if (gest.equals("ASS")) { 66 gest = "Association"; 67 } else if (gest.equals("CCAS")) { 68 gest = "Centre Communal d'Action Sociale"; 69 } else if (gest.equals("CHU")) { 70 gest = "CHU de Toulouse"; 71 } else if (gest.equals("PRIV")) { 72 gest = "private"; 73 } else if (gest.equals("VT")) { 74 gest = "Mairie de Toulouse"; 75 } else if (gest.equals("CAF")) { 76 gest = "Caisse d'Allocations familiales"; 77 } else if (gest.equals("MUT")) { 78 gest = "Mutuelle"; 79 } else if (gest.equals("UPS")) { 80 gest = "Université Paul Sabatier"; 81 } 82 n.remove("NATGEST"); 83 n.put("operator", gest); 84 } 40 85 } 41 86 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/enfance/EcoleElementaireHandler.java
r28554 r30303 16 16 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance; 17 17 18 import org.apache.commons.lang3.text.WordUtils; 18 19 import org.openstreetmap.josm.data.osm.DataSet; 19 20 import org.openstreetmap.josm.data.osm.Node; … … 40 41 for (Node n : ds.getNodes()) { 41 42 n.put("amenity", "school"); 42 n.put("school:FR", " elementaire");43 n.put("operator ", "public");43 n.put("school:FR", "élémentaire"); 44 n.put("operator:type", "public"); 44 45 replace(n, "Ecole", "name"); 46 n.put("name", WordUtils.capitalizeFully(n.get("name"))); 47 n.remove("Codpos"); 48 n.remove("Codsti"); 49 n.remove("color"); 50 n.remove("Index"); 51 n.remove("Libelle"); 52 n.remove("Num"); 53 replace(n, "RNE", "ref:UAI"); 54 replace(n, "Tel", "phone"); 45 55 } 46 56 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/OdPlugin.java
r30211 r30303 145 145 JMenuItem handlerItem = null; 146 146 if (dataURL != null) { 147 handlerItem = endMenu.add(new DownloadDataAction(module .getDisplayedName()+"_"+handlerName, dataURL));147 handlerItem = endMenu.add(new DownloadDataAction(module, handlerName, dataURL)); 148 148 } else if (dataURLs != null) { 149 149 JMenu handlerMenu = new JMenu(handlerName); … … 151 151 for (Pair<String, URL> pair : dataURLs) { 152 152 if (pair != null && pair.a != null && pair.b != null) { 153 item = handlerMenu.add(new DownloadDataAction( pair.a, pair.b));153 item = handlerMenu.add(new DownloadDataAction(module, pair.a, pair.b)); 154 154 } 155 155 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/actions/DownloadDataAction.java
r28050 r30303 23 23 import org.openstreetmap.josm.Main; 24 24 import org.openstreetmap.josm.actions.JosmAction; 25 import org.openstreetmap.josm.plugins.opendata.core.modules.Module; 25 26 import org.openstreetmap.josm.tools.CheckParameterUtil; 26 27 … … 29 30 private final URL url; 30 31 31 public DownloadDataAction( String name, URL url) {32 public DownloadDataAction(Module module, String name, URL url) { 32 33 super(false); 33 34 CheckParameterUtil.ensureParameterNotNull(name, "name"); 34 35 CheckParameterUtil.ensureParameterNotNull(url, "url"); 35 36 putValue(Action.NAME, name); 36 putValue("toolbar", "opendata_download_"+name.toLowerCase().replace(" ", "_"));37 putValue("toolbar", ("opendata_download_"+module.getDisplayedName()+"_"+name).toLowerCase().replace(" ", "_")); 37 38 this.url = url; 38 39 } -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/archive/ZipImporter.java
r28696 r30303 16 16 package org.openstreetmap.josm.plugins.opendata.core.io.archive; 17 17 18 import java.io.File; 18 19 import java.io.InputStream; 19 20 … … 38 39 } 39 40 } 41 42 @Override 43 public boolean acceptFile(File pathname) { 44 return super.acceptFile(pathname) && !pathname.getName().endsWith(".osm.zip"); 45 } 40 46 }
Note:
See TracChangeset
for help on using the changeset viewer.