Changeset 35272 in osm for applications/editors/josm/plugins/opendata/modules
- Timestamp:
- 2020-01-11T18:53:28+01:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse
- Files:
-
- 5 deleted
- 40 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseConstants.java
r34095 r35272 5 5 6 6 public interface ToulouseConstants extends FrenchConstants { 7 7 8 8 /** 9 9 * Sources and Refs … … 13 13 public static final String SOURCE_TISSEO = "Tisséo SMTC"; 14 14 public static final String REF_TOULOUSE_METROPOLE = "ref:FR:ToulouseMetropole"; 15 15 16 16 /** 17 17 * Wiki … … 22 22 * Portal 23 23 */ 24 public static final String PORTAL = "http ://data.toulouse-metropole.fr";24 public static final String PORTAL = "https://data.toulouse-metropole.fr"; 25 25 26 26 /** -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java
r35269 r35272 14 14 import org.openstreetmap.josm.plugins.opendata.core.modules.ModuleInformation; 15 15 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 16 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.associations.Club3eAgeHandler;17 16 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.BureauxVoteDecoupageHandler; 18 17 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.BureauxVoteHandler; 18 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.Club3eAgeHandler; 19 19 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.MairieAnnexeHandler; 20 20 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.MairieHandler; … … 23 23 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete.SecteursHandler; 24 24 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.BibliothequesHandler; 25 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.EquipementCulturel BalmaHandler;25 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.EquipementCulturelHandler; 26 26 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.LudothequeHandler; 27 27 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.MuseeHandler; 28 28 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.culture.TheatreHandler; 29 29 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance.CrechesHandler; 30 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance.EcoleBalmaHandler;31 30 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance.EcoleElementaireHandler; 32 31 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance.EcoleMaternelleHandler; 33 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.enfance.PetiteEnfanceEtJeunesseBalmaHandler;34 32 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.environnement.RecupEmballageHandler; 35 33 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.environnement.RecupVerreHandler; … … 39 37 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.services.MarchesPleinVentHandler; 40 38 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.services.PointsLumineuxHandler; 41 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveBalmaHandler;42 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveToulouseHandler;43 39 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.topographie.AltimetrieVoieHandler; 44 40 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.transport.AiresPietonnesHandler; … … 100 96 handlers.add(RecupVerreHandler.class); 101 97 handlers.add(ReseauTisseoHandler.class); 102 handlers.add(EcoleBalmaHandler.class); 103 handlers.add(PetiteEnfanceEtJeunesseBalmaHandler.class); 104 handlers.add(EquipementCulturelBalmaHandler.class); 105 handlers.add(InstallationSportiveBalmaHandler.class); 98 handlers.add(EquipementCulturelHandler.class); 106 99 handlers.add(ChantiersPonctuelsHandler.class); 107 100 handlers.add(ChantiersLineairesHandler.class); 108 handlers.add(InstallationSportiveToulouseHandler.class);109 101 handlers.add(StationsAutoPartageHandler.class); 110 102 handlers.add(MarchesPleinVentHandler.class); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/ToulouseDataSetHandler.java
r35269 r35272 42 42 * Categories 43 43 */ 44 public static final DataSetCategory CAT_ASSOCIATIONS = new DataSetCategory("Associations", "people.png");45 44 public static final DataSetCategory CAT_CITOYENNETE = new DataSetCategory("Citoyenneté", "presets/service/townhall.svg"); 46 45 public static final DataSetCategory CAT_CULTURE = new DataSetCategory("Culture", "presets/sightseeing/arts_centre.svg"); … … 55 54 public static final DataSetCategory CAT_URBANISME = new DataSetCategory("Urbanisme", "presets/place/city.svg"); 56 55 57 public ToulouseDataSetHandler( intportalId) {58 init(portalId); 59 } 60 61 public ToulouseDataSetHandler( intportalId, String relevantTag) {56 public ToulouseDataSetHandler(String portalId) { 57 init(portalId); 58 } 59 60 public ToulouseDataSetHandler(String portalId, String relevantTag) { 62 61 super(relevantTag); 63 62 init(portalId); 64 63 } 65 64 66 public ToulouseDataSetHandler( intportalId, boolean relevantUnion, String... relevantTags) {65 public ToulouseDataSetHandler(String portalId, boolean relevantUnion, String... relevantTags) { 67 66 super(relevantUnion, relevantTags); 68 67 init(portalId); 69 68 } 70 69 71 public ToulouseDataSetHandler( intportalId, String... relevantTags) {70 public ToulouseDataSetHandler(String portalId, String... relevantTags) { 72 71 this(portalId, false, relevantTags); 73 72 } 74 73 75 public ToulouseDataSetHandler( intportalId, boolean relevantUnion, Tag... relevantTags) {74 public ToulouseDataSetHandler(String portalId, boolean relevantUnion, Tag... relevantTags) { 76 75 super(relevantUnion, relevantTags); 77 76 init(portalId); 78 77 } 79 78 80 private void init( intportalId) {79 private void init(String portalId) { 81 80 try { 82 81 setLicense(new ToulouseLicense()); 83 if (portalId > 0) {84 String url = PORTAL + "/ les-donnees/-/opendata/card/" + portalId + "--";85 setLocalPortalURL(url );86 setDataURL(url +"/resource/document");82 if (portalId != null) { 83 String url = PORTAL + "/explore/dataset/" + portalId; 84 setLocalPortalURL(url + "/information/"); 85 setDataURL(url + "/download/?format=geojson&timezone=Europe/Paris"); 87 86 } 88 87 addTool(new SplitByMunicipality()); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/BureauxVoteDecoupageHandler.java
r30340 r35272 9 9 10 10 public BureauxVoteDecoupageHandler() { 11 super( 14401, "boundary=polling_station");11 super("elections-2019-decoupage-des-bureaux-de-vote", "boundary=polling_station"); 12 12 setWikiPage("Découpage des bureaux de vote"); 13 13 setCategory(CAT_CITOYENNETE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/BureauxVoteHandler.java
r30340 r35272 9 9 10 10 public BureauxVoteHandler() { 11 super( 12550, "polling_station");12 setWikiPage(" Bureaux de vote 2012");11 super("elections-2017-lieux-de-vote", "polling_station"); 12 setWikiPage("Elections 2017 - Lieux de vote"); 13 13 setCategory(CAT_CITOYENNETE); 14 14 } … … 23 23 for (Relation r : ds.getRelations()) { 24 24 replace(r, "TEXT", "name"); 25 r.put("polling_station", "201 2");25 r.put("polling_station", "2017"); 26 26 r.put("building", "yes"); 27 27 String name = r.getName(); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/Club3eAgeHandler.java
r35270 r35272 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets. associations;2 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.citoyennete; 3 3 4 4 import org.apache.commons.text.WordUtils; … … 10 10 11 11 public Club3eAgeHandler() { 12 super( 12587, "social_facility=outreach", "social_facility:for=senior");12 super("clubs-du-3eme-age", "social_facility=outreach", "social_facility:for=senior"); 13 13 setWikiPage("Clubs du 3ème âge"); 14 setCategory(CAT_ ASSOCIATIONS);14 setCategory(CAT_CITOYENNETE); 15 15 } 16 16 -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/MairieAnnexeHandler.java
r30340 r35272 6 6 7 7 public class MairieAnnexeHandler extends MairieHandler { 8 8 9 9 public MairieAnnexeHandler() { 10 super( 12560, "Mairies annexes");10 super("mairies-annexes", "Mairies de quartier"); 11 11 setCategory(CAT_CITOYENNETE); 12 12 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/MairieHandler.java
r30340 r35272 9 9 10 10 public MairieHandler() { 11 this( 12554, "Mairies");11 this("mairies", "Mairies"); 12 12 setCategory(CAT_CITOYENNETE); 13 13 } 14 15 protected MairieHandler( intportalId, String wikiPage) {14 15 protected MairieHandler(String portalId, String wikiPage) { 16 16 super(portalId, "amenity=townhall"); 17 17 setWikiPage(wikiPage); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/PolesTerritoriauxHandler.java
r30340 r35272 9 9 10 10 public PolesTerritoriauxHandler() { 11 super( 12568);12 setName("Pôles territoriaux 11 super("poles-territoriaux"); 12 setName("Pôles territoriaux"); 13 13 setCategory(CAT_CITOYENNETE); 14 14 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/QuartiersHandler.java
r35269 r35272 9 9 10 10 public QuartiersHandler() { 11 super( 12574, "admin_level=11");12 setWikiPage("Quartiers de proximité");11 super("quartiers-de-democratie-locale0", "admin_level=11"); 12 setWikiPage("Quartiers de démocratie locale"); 13 13 setCategory(CAT_CITOYENNETE); 14 14 setMenuIcon("presets/misc/boundaries.svg"); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/citoyennete/SecteursHandler.java
r35269 r35272 9 9 10 10 public SecteursHandler() { 11 super( 12580, "admin_level=10");11 super("secteurs-de-democratie-locale", "admin_level=10"); 12 12 setWikiPage("Secteurs de proximité"); 13 13 setCategory(CAT_CITOYENNETE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/culture/BibliothequesHandler.java
r30340 r35272 9 9 10 10 public BibliothequesHandler() { 11 super( 12402, "amenity=library");11 super("mediatheques-bibliotheques-et-bibliobus", "amenity=library"); 12 12 setWikiPage("Médiathèques, bibliothèques et bibliobus"); 13 13 setCategory(CAT_CULTURE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/culture/EquipementCulturelHandler.java
r35270 r35272 6 6 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 7 7 8 public class EquipementCulturel BalmaHandler extends ToulouseDataSetHandler {8 public class EquipementCulturelHandler extends ToulouseDataSetHandler { 9 9 10 public EquipementCulturel BalmaHandler() {11 super( 13997);10 public EquipementCulturelHandler() { 11 super("equipements-culturels1"); 12 12 setWikiPage("Équipements Culturels"); 13 13 setCategory(CAT_CULTURE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/culture/LudothequeHandler.java
r30340 r35272 9 9 10 10 public LudothequeHandler() { 11 super( 12420, "amenity=toy_library");11 super("ludotheques", "amenity=toy_library"); 12 12 setWikiPage("Ludothèques"); 13 13 setCategory(CAT_CULTURE); 14 14 } 15 15 16 16 @Override 17 17 public boolean acceptsFilename(String filename) { -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/culture/MuseeHandler.java
r33518 r35272 10 10 11 11 public MuseeHandler() { 12 super( 12426, "tourism=museum");12 super("musees", "tourism=museum"); 13 13 setWikiPage("Musées"); 14 14 setCategory(CAT_CULTURE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/culture/TheatreHandler.java
r30340 r35272 9 9 10 10 public TheatreHandler() { 11 super( 12448, "amenity=theatre");12 setWikiPage("Théâtres ");11 super("theatres-et-salles-de-spectacles", "amenity=theatre"); 12 setWikiPage("Théâtres et salles de spectacles"); 13 13 setCategory(CAT_CULTURE); 14 14 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/enfance/CrechesHandler.java
r33518 r35272 10 10 11 11 public CrechesHandler() { 12 super( 12462, "amenity=kindergarten");12 super("creches1", "amenity=kindergarten"); 13 13 setWikiPage("Crèches"); 14 14 setCategory(CAT_ENFANCE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/enfance/EcoleElementaireHandler.java
r33518 r35272 10 10 11 11 public EcoleElementaireHandler() { 12 super( 12474, "amenity=school");12 super("ecoles-elementaires-publiques", "amenity=school"); 13 13 setWikiPage("Écoles élémentaires publiques"); 14 14 setCategory(CAT_ENFANCE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/enfance/EcoleMaternelleHandler.java
r30340 r35272 9 9 10 10 public EcoleMaternelleHandler() { 11 super( 12490, "amenity=school");11 super("ecoles-maternelles-publiques", "amenity=school"); 12 12 setWikiPage("Écoles maternelles publiques"); 13 13 setCategory(CAT_ENFANCE); 14 for (String forbidden : new String[]{"élémentaire", "primaire","collège","lycée","secondaire"}) {14 for (String forbidden : new String[]{"élémentaire", "primaire", "collège", "lycée", "secondaire"}) { 15 15 addForbiddenTag("school:FR="+forbidden); 16 16 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/environnement/RecupEmballageHandler.java
r30340 r35272 9 9 10 10 public RecupEmballageHandler() { 11 super( 12494, "amenity=recycling");11 super("recup-emballage", "amenity=recycling"); 12 12 setWikiPage("Récup' Emballage"); 13 13 setCategory(CAT_ENVIRONNEMENT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/environnement/RecupVerreHandler.java
r30340 r35272 9 9 10 10 public RecupVerreHandler() { 11 super( 12496, "amenity=recycling");11 super("recup-verre", "amenity=recycling"); 12 12 setWikiPage("Récup' Verre"); 13 13 setCategory(CAT_ENVIRONNEMENT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/environnement/StationEpurationHandler.java
r30340 r35272 9 9 10 10 public StationEpurationHandler() { 11 super( 12500, "man_made=wastewater_plant");11 super("stations-d-epurations", "man_made=wastewater_plant"); 12 12 setWikiPage("Stations d'épuration"); 13 13 setCategory(CAT_ENVIRONNEMENT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/patrimoine/Parcelles1680Handler.java
r30340 r35272 9 9 10 10 public Parcelles1680Handler() { 11 super( 12514);11 super("parcellaire-de-1680"); 12 12 setName("Parcellaire de 1680"); 13 13 setCategory(CAT_PATRIMOINE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/patrimoine/Parcelles1830Handler.java
r30340 r35272 9 9 10 10 public Parcelles1830Handler() { 11 super( 12534);11 super("parcellaire-de-1830"); 12 12 setName("Parcellaire de 1830"); 13 13 setCategory(CAT_PATRIMOINE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/services/MarchesPleinVentHandler.java
r33518 r35272 10 10 11 11 public MarchesPleinVentHandler() { 12 super( 19640, "amenity=marketplace");13 setName("Marchés de pleinvent");12 super("marches-couverts-et-de-plein-vent", "amenity=marketplace"); 13 setName("Marchés couverts et de plein-vent"); 14 14 setCategory(CAT_SERVICES); 15 15 setSingleProjection(wgs84); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/services/PointsLumineuxHandler.java
r30340 r35272 9 9 10 10 public PointsLumineuxHandler() { 11 super( 25051, "highway=street_lamp");11 super("points-lumineux", "highway=street_lamp"); 12 12 setName("Points lumineux"); 13 13 setCategory(CAT_SERVICES); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/topographie/AltimetrieVoieHandler.java
r30340 r35272 7 7 8 8 public class AltimetrieVoieHandler extends ToulouseDataSetHandler { 9 9 10 10 public AltimetrieVoieHandler() { 11 super( 12660, "ele");11 super("altimetrie-des-voies", "ele"); 12 12 setName("Altimétrie des voies"); 13 13 setCategory(CAT_TOPOGRAPHIE); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/AiresPietonnesHandler.java
r30340 r35272 9 9 10 10 public AiresPietonnesHandler() { 11 super( 19687, "Street", "highway=pedestrian");11 super("aires-pietonnes", "Street", "highway=pedestrian"); 12 12 setName("Aires piétonnes"); 13 13 setCategory(CAT_TRANSPORT); … … 22 22 public void updateDataSet(DataSet ds) { 23 23 super.updateDataSet(ds); 24 24 25 25 for (Way w : ds.getWays()) { 26 26 w.put("highway", "pedestrian"); … … 39 39 } 40 40 } 41 41 42 42 @Override 43 43 protected String getStreetId(Way w) { -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/ChantiersHandler.java
r30340 r35272 9 9 10 10 public ChantiersHandler(int portalId, String name) { 11 super( portalId, "highway=construction");11 super("chantiers-en-cours", "highway=construction"); 12 12 setWikiPage("Chantiers en cours"); 13 13 setName(name); 14 14 setCategory(CAT_TRANSPORT); 15 15 } 16 16 17 17 @Override 18 18 public void updateDataSet(DataSet ds) { -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/HorodateurHandler.java
r35269 r35272 9 9 import org.openstreetmap.josm.data.osm.Node; 10 10 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 11 import org.openstreetmap.josm.tools.Logging; 11 12 12 13 public class HorodateurHandler extends ToulouseDataSetHandler { 13 14 14 15 public HorodateurHandler() { 15 super( 12540, "vending=parking_tickets");16 super("horodateurs", "vending=parking_tickets"); 16 17 setWikiPage("Horodateurs"); 17 18 setCategory(CAT_TRANSPORT); … … 40 41 String opening_hours = ""; 41 42 if (m.matches()) { 42 for (int i = 1; i <=m.groupCount(); i++) {43 for (int i = 1; i <= m.groupCount(); i++) { 43 44 if (m.group(i) != null) { 44 45 if (!opening_hours.isEmpty()) { … … 50 51 opening_hours += parseHour(m2.group(1)) + "-" + parseHour(m2.group(2)); 51 52 } else { 52 System.err.println(m.group(i)+" does not match "+p2);53 Logging.error(m.group(i)+" does not match "+p2); 53 54 } 54 55 } 55 56 } 56 57 } else { 57 System.err.println(horaire+" does not match "+p);58 Logging.error(horaire+" does not match "+p); 58 59 } 59 60 return opening_hours; … … 72 73 n.remove("Reglementation"); 73 74 n.remove("color"); 74 replace(n, "commune", "operator", new ValueReplacer() { 75 @Override 76 public String replace(String value) { 77 return "Mairie de "+WordUtils.capitalizeFully(value); 78 } 79 }); 80 replace(n, "horaire", "opening_hours", new ValueReplacer() { 81 @Override 82 public String replace(String value) { 83 return parseOpeningHours(value); 84 } 85 }); 86 replace(n, "maj_date", "source:date", new ValueReplacer() { 87 @Override 88 public String replace(String value) { 89 return value.substring(0, 4)+"-"+value.substring(4, 6)+"-"+value.substring(6, 8); 90 } 91 }); 75 replace(n, "commune", "operator", value -> "Mairie de "+WordUtils.capitalizeFully(value)); 76 replace(n, "horaire", "opening_hours", this::parseOpeningHours); 77 replace(n, "maj_date", "source:date", value -> value.substring(0, 4)+"-"+value.substring(4, 6)+"-"+value.substring(6, 8)); 92 78 replace(n, "observations", "note"); 93 replace(n, "quartier_residant", "parking:ticket:zone", new ValueReplacer() { 94 @Override 95 public String replace(String value) { 96 return WordUtils.capitalizeFully(value.trim()) 97 .replace(" Iv", " IV").replace("Sebastopol", "Sébastopol") 98 .replace("St ", "Saint-").replace("Peri", "Péri"); 99 } 100 }); 79 replace(n, "quartier_residant", "parking:ticket:zone", value -> WordUtils.capitalizeFully(value.trim()) 80 .replace(" Iv", " IV").replace("Sebastopol", "Sébastopol") 81 .replace("St ", "Saint-").replace("Peri", "Péri")); 101 82 } 102 83 } -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/MetroStationHandler.java
r35269 r35272 9 9 10 10 public MetroStationHandler() { 11 super( 12542, "subway=yes");11 super("stations-de-metro", "subway=yes"); 12 12 setName("Stations de métro"); 13 13 setCategory(CAT_TRANSPORT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/PMRHandler.java
r35269 r35272 9 9 10 10 public PMRHandler() { 11 super( 12538, "amenity=parking_space");11 super("pmr", "amenity=parking_space"); 12 12 setWikiPage("PMR"); 13 13 setCategory(CAT_TRANSPORT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/PistesCyclablesHandler.java
r30701 r35272 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.transport; 3 4 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaQueryType.NODE; 5 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaQueryType.WAY; 6 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaRecurseType.NODE_RELATION; 7 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaRecurseType.RELATION_WAY; 8 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaRecurseType.WAY_NODE; 9 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaRecurseType.WAY_RELATION; 3 10 4 11 import java.util.Arrays; … … 12 19 import org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi; 13 20 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 14 15 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaQueryType.*; 16 import static org.openstreetmap.josm.plugins.opendata.core.io.OverpassApi.OaRecurseType.*; 21 import org.openstreetmap.josm.tools.Logging; 17 22 18 23 public class PistesCyclablesHandler extends ToulouseDataSetHandler { 19 24 20 25 protected final Map<String, Collection<String>> map = new HashMap<>(); 21 26 22 27 private String streetField; 23 28 24 29 public PistesCyclablesHandler() { 25 30 this("Nom_voie"); 26 31 setCategory(CAT_TRANSPORT); 27 32 } 28 33 29 34 public PistesCyclablesHandler(String streetField) { 30 super(12544, true, "cycleway", "cycleway:right", "cycleway:left", "cycleway:both", "highway=cycleway", "ramp:bicycle=yes", "bicycle=yes", "barrier=cycle_barrier"); 35 super("reseau-cyclable-et-vert", true, 36 "cycleway", "cycleway:right", "cycleway:left", "cycleway:both", "highway=cycleway", "ramp:bicycle=yes", "bicycle=yes", "barrier=cycle_barrier"); 31 37 setWikiPage("Réseau cyclable et vert"); 32 38 addForbiddenTag("cycleway=no"); 33 39 this.streetField = streetField; 34 map.put("secondary", Arrays.asList( new String[] {"AVENUE", "Av ", "av ", "Avenue ", "avenue ", "BOULEVARD ", "bd ", "ALLEE", "Allee", "allee",35 "PONT ", "Pont ", "PORT ", "ROUTE ", "Rte ", "BOULINGRIN", "boulingrin" }));36 map.put("residential", Arrays.asList( new String[] {"CHEMIN ", "Chemin ", "chemin ", "IMPASSE ", "imp ", "PLACE ", "Place ", "place ",37 "RUE ", "Rue ", "rue ", "QUAI", "VOIE ", "grand rue" }));40 map.put("secondary", Arrays.asList("AVENUE", "Av ", "av ", "Avenue ", "avenue ", "BOULEVARD ", "bd ", "ALLEE", "Allee", "allee", 41 "PONT ", "Pont ", "PORT ", "ROUTE ", "Rte ", "BOULINGRIN", "boulingrin")); 42 map.put("residential", Arrays.asList("CHEMIN ", "Chemin ", "chemin ", "IMPASSE ", "imp ", "PLACE ", "Place ", "place ", 43 "RUE ", "Rue ", "rue ", "QUAI", "VOIE ", "grand rue")); 38 44 } 39 45 40 46 @Override 41 47 public boolean acceptsFilename(String filename) { 42 48 return acceptsKmzTabFilename(filename, "Pistes_Cyclables"); 43 49 } 44 50 45 51 @Override 46 52 protected String getOverpassApiQueries(String bbox, String... conditions) { 47 return OverpassApi.query(bbox, NODE, conditions) + "\n" + 53 return OverpassApi.query(bbox, NODE, conditions) + "\n" + 48 54 OverpassApi.recurse(NODE_RELATION, RELATION_WAY, WAY_NODE) + "\n" + 49 55 OverpassApi.query(bbox, WAY, conditions) + "\n" + … … 65 71 return null; 66 72 } 67 73 68 74 @Override 69 75 public void updateDataSet(DataSet ds) { … … 71 77 72 78 w.remove("name"); 73 79 74 80 String obs_type = w.get("obs_type"); 75 81 if (obs_type.equals("bande")) { … … 89 95 w.put("zone:maxspeed", "FR:30"); 90 96 } else { 91 System.out.println(obs_type);97 Logging.info(obs_type); 92 98 } 93 99 94 100 String name = w.get(streetField); 95 101 if (name != null) { 96 102 w.remove(streetField); 97 103 98 104 if (w.get("highway") == null && applyHighwayTag(name, w) == null) { 99 105 w.put("highway", "road"); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/ReseauTisseoHandler.java
r34095 r35272 11 11 import org.openstreetmap.josm.plugins.opendata.core.io.NeptuneReader; 12 12 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.ToulouseDataSetHandler; 13 import org.openstreetmap.josm.tools.Logging; 13 14 14 15 public class ReseauTisseoHandler extends ToulouseDataSetHandler { 15 16 16 17 private static final URL neptuneSchemaUrl = ReseauTisseoHandler.class.getResource(TOULOUSE_NEPTUNE_XSD); 17 18 18 19 public ReseauTisseoHandler() { 19 super( 14022, "network=fr_tisseo");20 super("tisseo-offre-de-transport-neptune", "network=fr_tisseo"); 20 21 NeptuneReader.registerSchema(neptuneSchemaUrl); 21 22 setName("Réseau Tisséo (Métro, Bus, Tram)"); … … 28 29 return acceptsZipFilename(filename, "14022-reseau-tisseo-metro-bus-tram-") || filename.toLowerCase().endsWith(OdConstants.XML_EXT); 29 30 } 30 31 31 32 @Override 32 33 public boolean acceptsFile(File file) { 33 return acceptsFilename(file.getName()) 34 return acceptsFilename(file.getName()) 34 35 && (file.getName().toLowerCase().endsWith(OdConstants.ZIP_EXT) || NeptuneReader.acceptsXmlNeptuneFile(file, neptuneSchemaUrl)); 35 36 } … … 45 46 return new URL("https://wiki.openstreetmap.org/wiki/Toulouse/Transports_en_commun#Réseau_Tisséo"); 46 47 } catch (MalformedURLException e) { 47 e.printStackTrace();48 Logging.error(e); 48 49 } 49 50 return null; -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/StationsAutoPartageHandler.java
r30563 r35272 10 10 11 11 public StationsAutoPartageHandler() { 12 super( 19163, "amenity=car_sharing");12 super("stations-d-auto-partage", "amenity=car_sharing"); 13 13 setName("Stations d'auto partage"); 14 14 setCategory(CAT_TRANSPORT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/TramwayStationHandler.java
r35269 r35272 9 9 10 10 public TramwayStationHandler() { 11 super( 12611, "tram=yes");11 super("stations-de-tramway", "tram=yes"); 12 12 setName("Stations de tramway"); 13 13 setCategory(CAT_TRANSPORT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/VeloToulouseHandler.java
r33518 r35272 10 10 11 11 public VeloToulouseHandler() { 12 super( 12546, "amenity=bicycle_rental");12 super("velo-toulouse", "amenity=bicycle_rental"); 13 13 setWikiPage("Vélô Toulouse"); 14 14 setCategory(CAT_TRANSPORT); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/Zone30Handler.java
r30340 r35272 7 7 8 8 public class Zone30Handler extends VoirieHandler { 9 9 10 10 public Zone30Handler() { 11 super( 12548, "Street", "maxspeed=30");11 super("zones-30", "Street", "maxspeed=30"); 12 12 setWikiPage("Zones 30"); 13 13 setCategory(CAT_TRANSPORT); … … 18 18 return acceptsKmzTabFilename(filename, "Zone30"); 19 19 } 20 20 21 21 @Override 22 22 public void updateDataSet(DataSet ds) { 23 23 super.updateDataSet(ds); 24 24 25 25 for (Way w : ds.getWays()) { 26 26 w.put("zone:maxspeed", "FR:30"); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/CommuneHandler.java
r35269 r35272 9 9 10 10 public CommuneHandler() { 11 super( 12582, "admin_level=8");11 super("communes", "admin_level=8"); 12 12 setName("Communes"); 13 13 setCategory(CAT_URBANISME); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/NumerosRueHandler.java
r30701 r35272 15 15 16 16 public NumerosRueHandler() { 17 super( 12673, "addr:housenumber");17 super("numero-de-rue", "addr:housenumber"); 18 18 setWikiPage("Numéros de rue"); 19 19 setCategory(CAT_URBANISME); … … 28 28 public void updateDataSet(DataSet ds) { 29 29 Map<String, Relation> associatedStreets = new HashMap<>(); 30 30 31 31 for (Node n : ds.getNodes()) { 32 32 replace(n, "no", "addr:housenumber"); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/SanisetteHandler.java
r30340 r35272 9 9 10 10 public SanisetteHandler() { 11 super( 12584, "amenity=toilets");11 super("sanisettes", "amenity=toilets"); 12 12 setWikiPage("Sanisettes"); 13 13 setCategory(CAT_URBANISME); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/VoirieHandler.java
r35269 r35272 22 22 23 23 public VoirieHandler() { 24 this( 12693, "lib_off", "highway");24 this("filaire-de-voirie", "lib_off", "highway"); 25 25 setName("Filaire de voirie"); 26 26 setCategory(CAT_URBANISME); … … 28 28 } 29 29 30 protected VoirieHandler( intportalId, String streetField, String relevantTag) {30 protected VoirieHandler(String portalId, String streetField, String relevantTag) { 31 31 super(portalId, relevantTag); 32 32 this.streetField = streetField; 33 map.put("motorway", Arrays.asList( new String[] {"A6", "AUTOROUTE "}));34 map.put("trunk", Arrays.asList( new String[] {"ROCADE "}));35 map.put("secondary", Arrays.asList( new String[] {"AV ", "BD ", "ALL ", "PONT ", "RTE ", "PORT ", "BOULINGRIN"}));36 map.put("residential", Arrays.asList( new String[] {"RUE ", "GRANDE-RUE ", "PROM ", "CHE", "CAMINOT ", "IMP ", "COURS ",37 "LOT ", "ANC", "VIEUX ", "PL ", "CLOS ", "CITE ", "RESIDENCE ", "SENTIER ", "QU ", "SQ ", "VOIE ", "ESP " }));38 map.put("unclassified", Arrays.asList( new String[] {"ZONE "}));39 map.put("road", Arrays.asList( new String[] {"VA "}));33 map.put("motorway", Arrays.asList("A6", "AUTOROUTE ")); 34 map.put("trunk", Arrays.asList("ROCADE ")); 35 map.put("secondary", Arrays.asList("AV ", "BD ", "ALL ", "PONT ", "RTE ", "PORT ", "BOULINGRIN")); 36 map.put("residential", Arrays.asList("RUE ", "GRANDE-RUE ", "PROM ", "CHE", "CAMINOT ", "IMP ", "COURS ", 37 "LOT ", "ANC", "VIEUX ", "PL ", "CLOS ", "CITE ", "RESIDENCE ", "SENTIER ", "QU ", "SQ ", "VOIE ", "ESP ")); 38 map.put("unclassified", Arrays.asList("ZONE ")); 39 map.put("road", Arrays.asList("VA ")); 40 40 } 41 41
Note:
See TracChangeset
for help on using the changeset viewer.