Changeset 29653 in osm for applications
- Timestamp:
- 2013-06-12T22:43:44+02:00 (12 years ago)
- Location:
- applications/editors/josm/plugins/opendata
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseConstants.java
r29493 r29653 59 59 public static final DataSetCategory CAT_ENVIRONNEMENT = new DataSetCategory("Environnement", ""); 60 60 public static final DataSetCategory CAT_PATRIMOINE = new DataSetCategory("Patrimoine", ""); 61 public static final DataSetCategory CAT_SERVICES = new DataSetCategory("Services", ""); 61 62 public static final DataSetCategory CAT_SPORT = new DataSetCategory("Sport", ""); 62 63 public static final DataSetCategory CAT_TOPOGRAPHIE = new DataSetCategory("Topographie", ""); -
applications/editors/josm/plugins/opendata/modules/fr.toulouse/src/org/openstreetmap/josm/plugins/opendata/modules/fr/toulouse/ToulouseModule.java
r29493 r29653 51 51 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.patrimoine.Parcelles1680Handler; 52 52 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.patrimoine.Parcelles1830Handler; 53 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.services.MarchesPleinVentHandler; 53 54 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveBalmaHandler; 54 55 import org.openstreetmap.josm.plugins.opendata.modules.fr.toulouse.datasets.sport.InstallationSportiveToulouseHandler; … … 114 115 handlers.add(InstallationSportiveToulouseHandler.class); 115 116 handlers.add(StationsAutoPartageHandler.class); 117 handlers.add(MarchesPleinVentHandler.class); 116 118 } 117 119 -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/OdConstants.java
r29493 r29653 129 129 * Coordinates fields 130 130 */ 131 public static final String X_STRING = "X|LON|LONGI| LONGITUDE.*|EASTING";132 public static final String Y_STRING = "Y|LAT|LATI| LATITUDE.*|NORTHING";131 public static final String X_STRING = "X|LON|LONGI|.*LONGITUDE.*|EASTING"; 132 public static final String Y_STRING = "Y|LAT|LATI|.*LATITUDE.*|NORTHING"; 133 133 134 134 // The list of all ProjectionPatterns (filled at each constructor call) -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/tabular/SpreadSheetReader.java
r29493 r29653 183 183 } 184 184 185 for (int i = 0; i<fields.length; i++) { 185 if (fields.length > header.length) { 186 Main.warn(tr("Invalid file. Bad length on line {0}. Expected {1} columns, got {2}.", lineNumber, header.length, fields.length)); 187 Main.warn(Arrays.toString(fields)); 188 } 189 190 for (int i = 0; i<Math.min(fields.length, header.length); i++) { 186 191 try { 187 if (i >= header.length) { 188 throw new IllegalArgumentException(tr("Invalid file. Bad length on line {0}. Expected {1} columns, got {2}.", lineNumber, header.length, i+1)); 189 } else { 190 boolean coordinate = false; 191 for (CoordinateColumns c : columns) { 192 EastNorth en = ens.get(c); 193 if (i == c.xCol) { 194 coordinate = true; 195 en.setLocation(parseDouble(fields[i]), en.north()); 196 if (handler != null) { 197 handler.setXCol(i); 198 } 199 } else if (i == c.yCol) { 200 coordinate = true; 201 en.setLocation(en.east(), parseDouble(fields[i])); 202 if (handler != null) { 203 handler.setYCol(i); 204 } 205 } 206 } 207 if (!coordinate) { 208 if (!fields[i].isEmpty()) { 209 nodes.values().iterator().next().put(header[i], fields[i]); 210 } 211 } 212 } 192 boolean coordinate = false; 193 for (CoordinateColumns c : columns) { 194 EastNorth en = ens.get(c); 195 if (i == c.xCol) { 196 coordinate = true; 197 en.setLocation(parseDouble(fields[i]), en.north()); 198 if (handler != null) { 199 handler.setXCol(i); 200 } 201 } else if (i == c.yCol) { 202 coordinate = true; 203 en.setLocation(en.east(), parseDouble(fields[i])); 204 if (handler != null) { 205 handler.setYCol(i); 206 } 207 } 208 } 209 if (!coordinate) { 210 if (!fields[i].isEmpty()) { 211 nodes.values().iterator().next().put(header[i], fields[i]); 212 } 213 } 213 214 } catch (ParseException e) { 214 215 System.err.println("Warning: Parsing error on line "+lineNumber+": "+e.getMessage()); -
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/modules/AbstractModule.java
r28896 r29653 134 134 result.add(handlerClass.newInstance()); 135 135 } catch (Throwable t) { 136 System.err.println( t.getClass().getName()+": "+t.getMessage());136 System.err.println("Cannot instantiate "+handlerClass+" because of "+t.getClass().getName()+": "+t.getMessage()); 137 137 } 138 138 }
Note:
See TracChangeset
for help on using the changeset viewer.