Changeset 30701 in osm for applications/editors/josm/plugins/opendata/modules
- Timestamp:
- 2014-10-04T17:28:45+02:00 (10 years ago)
- Location:
- applications/editors/josm/plugins/opendata/modules
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/administration/GeoFlaHandler.java
r30340 r30701 178 178 179 179 private Pair<String, URL> getGeoflaURL(String name, String urlSuffix) throws MalformedURLException { 180 return new Pair< String, URL>(name, new URL("http://professionnels.ign.fr/sites/default/files/"+urlSuffix));180 return new Pair<>(name, new URL("http://professionnels.ign.fr/sites/default/files/"+urlSuffix)); 181 181 } 182 182 183 183 @Override 184 184 public List<Pair<String, URL>> getDataURLs() { 185 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();185 List<Pair<String, URL>> result = new ArrayList<>(); 186 186 try { 187 187 result.add(getGeoflaURL("Départements France métropolitaine et Corse", "GEOFLADept_FR_Corse_AV_L93.zip")); -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/agriculture/RegistreParcellaireHandler.java
r30340 r30701 117 117 118 118 private Pair<String, URL> getRpgURL(String number, String name) throws MalformedURLException { 119 return new Pair< String, URL>(number+" - "+name, new URL("http://www.data.gouv.fr/var/download/ign/RPG_2010_"+number+".ZIP"));119 return new Pair<>(number+" - "+name, new URL("http://www.data.gouv.fr/var/download/ign/RPG_2010_"+number+".ZIP")); 120 120 } 121 121 122 122 @Override 123 123 public List<Pair<String, URL>> getDataURLs() { 124 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();124 List<Pair<String, URL>> result = new ArrayList<>(); 125 125 try { 126 126 for (FrenchAdministrativeUnit dpt : FrenchAdministrativeUnit.allDepartments) { -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/AssainissementHandler.java
r30340 r30701 38 38 @Override 39 39 public List<Pair<String, URL>> getDataURLs() { 40 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();40 List<Pair<String, URL>> result = new ArrayList<>(); 41 41 try { 42 result.add(new Pair< String, URL>("Données 2009", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2.php")));43 result.add(new Pair< String, URL>("Données 2010", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2010.php")));44 result.add(new Pair< String, URL>("Données 2011", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2011.php")));42 result.add(new Pair<>("Données 2009", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2.php"))); 43 result.add(new Pair<>("Données 2010", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2010.php"))); 44 result.add(new Pair<>("Données 2011", new URL("http://www.assainissement.developpement-durable.gouv.fr/telecharger2_2011.php"))); 45 45 } catch (MalformedURLException e) { 46 46 e.printStackTrace(); … … 53 53 private Node nodeWithKeys; 54 54 55 private final Set<String> interestingKeys = new HashSet< String>();55 private final Set<String> interestingKeys = new HashSet<>(); 56 56 57 57 public InternalOdsHandler() { -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/ForetsPubliquesHandler.java
r30340 r30701 109 109 @Override 110 110 public List<Pair<String, URL>> getDataURLs() { 111 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();111 List<Pair<String, URL>> result = new ArrayList<>(); 112 112 try { 113 113 for (FrenchAdministrativeUnit region : FrenchAdministrativeUnit.allRegions) { … … 123 123 124 124 private Pair<String, URL> getForetURL(String code, String regionName) throws MalformedURLException { 125 return new Pair< String, URL>("PublicForests_"+regionName, new URL(FRENCH_PORTAL+"var/download/"+"for_publ_v2011_reg"+code+".zip"));125 return new Pair<>("PublicForests_"+regionName, new URL(FRENCH_PORTAL+"var/download/"+"for_publ_v2011_reg"+code+".zip")); 126 126 } 127 127 } -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/ecologie/InventaireForestierNationalHandler.java
r30340 r30701 81 81 @Override 82 82 public List<Pair<String, URL>> getDataURLs() { 83 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();83 List<Pair<String, URL>> result = new ArrayList<>(); 84 84 try { 85 85 for (int year = 2010; year >= 2005; year--) { … … 94 94 95 95 private Pair<String, URL> getIfnURL(int year, String name, String type) throws MalformedURLException { 96 return new Pair< String, URL>(name+" "+year, new URL("http://www.ifn.fr/spip/IMG/csv/placettes_"+type+"_"+year+".csv"));96 return new Pair<>(name+" "+year, new URL("http://www.ifn.fr/spip/IMG/csv/placettes_"+type+"_"+year+".csv")); 97 97 } 98 98 } -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/hydrologie/EauxDeSurfaceHandler.java
r30340 r30701 94 94 @Override 95 95 public List<Pair<String, URL>> getDataURLs() { 96 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();96 List<Pair<String, URL>> result = new ArrayList<>(); 97 97 try { 98 98 for (WaterAgency wa : waterAgencies) { … … 106 106 107 107 private Pair<String, URL> getDownloadURL(WaterAgency a) throws MalformedURLException { 108 return new Pair< String, URL>("SurfaceWater_"+a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip"));108 return new Pair<>("SurfaceWater_"+a.name, new URL("http://www.rapportage.eaufrance.fr/sites/default/files/SIG/FR"+a.code+"_SW.zip")); 109 109 } 110 110 -
applications/editors/josm/plugins/opendata/modules/fr.datagouvfr/src/org/openstreetmap/josm/plugins/opendata/modules/fr/datagouvfr/datasets/transport/Route500Handler.java
r30340 r30701 44 44 @Override 45 45 public List<Pair<String, URL>> getDataURLs() { 46 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();46 List<Pair<String, URL>> result = new ArrayList<>(); 47 47 try { 48 48 for (FrenchAdministrativeUnit dpt : FrenchAdministrativeUnit.allDepartments) { … … 58 58 59 59 private Pair<String, URL> getRoute500URL(String code, String name) throws MalformedURLException { 60 return new Pair< String, URL>(name, new URL(OSMFR_PORTAL+"ROUTE500_1-1_SHP_LAMB93_D"+code+"_2012-11-21.7z"));60 return new Pair<>(name, new URL(OSMFR_PORTAL+"ROUTE500_1-1_SHP_LAMB93_D"+code+"_2012-11-21.7z")); 61 61 } 62 62 } -
applications/editors/josm/plugins/opendata/modules/fr.lemans/src/org/openstreetmap/josm/plugins/opendata/modules/fr/lemans/datasets/LeMansDataSetHandler.java
r30340 r30701 75 75 @Override 76 76 public List<Pair<String, URL>> getDataURLs() { 77 List<Pair<String, URL>> result = new ArrayList< Pair<String,URL>>();77 List<Pair<String, URL>> result = new ArrayList<>(); 78 78 try { 79 if (kmzUuid != null && !kmzUuid.isEmpty()) result.add(new Pair< String, URL>(getName() + " (KMZ)", new URL(PORTAL + "download.do?uuid=" + kmzUuid)));80 if (shpUuid != null && !shpUuid.isEmpty()) result.add(new Pair< String, URL>(getName() + " (SHP)", new URL(PORTAL + "download.do?uuid=" + shpUuid)));79 if (kmzUuid != null && !kmzUuid.isEmpty()) result.add(new Pair<>(getName() + " (KMZ)", new URL(PORTAL + "download.do?uuid=" + kmzUuid))); 80 if (shpUuid != null && !shpUuid.isEmpty()) result.add(new Pair<>(getName() + " (SHP)", new URL(PORTAL + "download.do?uuid=" + shpUuid))); 81 81 } catch (MalformedURLException e) { 82 82 e.printStackTrace(); -
applications/editors/josm/plugins/opendata/modules/fr.paris/src/org/openstreetmap/josm/plugins/opendata/modules/fr/paris/datasets/urbanisme/SanisettesHandler.java
r30340 r30701 50 50 public void updateDataSet(DataSet ds) { 51 51 52 List<Way> sourceWays = new ArrayList< Way>(ds.getWays());53 List<List<Way>> waysToCombine = new ArrayList< List<Way>>();52 List<Way> sourceWays = new ArrayList<>(ds.getWays()); 53 List<List<Way>> waysToCombine = new ArrayList<>(); 54 54 55 55 for (Iterator<Way> it = sourceWays.iterator(); it.hasNext();) { … … 57 57 it.remove(); 58 58 if (!wayProcessed(w, waysToCombine)) { 59 List<Way> list = new ArrayList< Way>();59 List<Way> list = new ArrayList<>(); 60 60 list.add(w); 61 61 boolean finished = false; 62 List<Way> sourceWays2 = new ArrayList< Way>(sourceWays);62 List<Way> sourceWays2 = new ArrayList<>(sourceWays); 63 63 while (!finished) { 64 64 int before = list.size(); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java
r30340 r30701 113 113 114 114 private static final Collection<Relation> getBoundaries(int admin_level) { 115 Collection<Relation> result = new TreeSet< Relation>(new Comparator<Relation>() {115 Collection<Relation> result = new TreeSet<>(new Comparator<Relation>() { 116 116 @Override 117 117 public int compare(Relation o1, Relation o2) { -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/transport/PistesCyclablesHandler.java
r30340 r30701 18 18 public class PistesCyclablesHandler extends ToulouseDataSetHandler { 19 19 20 protected final Map<String, Collection<String>> map = new HashMap< String, Collection<String>>();20 protected final Map<String, Collection<String>> map = new HashMap<>(); 21 21 22 22 private String streetField; -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/NumerosRueHandler.java
r30340 r30701 27 27 @Override 28 28 public void updateDataSet(DataSet ds) { 29 Map<String, Relation> associatedStreets = new HashMap< String, Relation>();29 Map<String, Relation> associatedStreets = new HashMap<>(); 30 30 31 31 for (Node n : ds.getNodes()) { -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/datasets/urbanisme/VoirieHandler.java
r30340 r30701 17 17 public class VoirieHandler extends ToulouseDataSetHandler { 18 18 19 protected final Map<String, Collection<String>> map = new HashMap< String, Collection<String>>();19 protected final Map<String, Collection<String>> map = new HashMap<>(); 20 20 21 21 private String streetField; … … 65 65 @Override 66 66 public void updateDataSet(DataSet ds) { 67 Map<String, Relation> associatedStreets = new HashMap< String, Relation>();67 Map<String, Relation> associatedStreets = new HashMap<>(); 68 68 69 69 for (Way w : ds.getWays()) {
Note:
See TracChangeset
for help on using the changeset viewer.