Changeset 33659 in osm for applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap
- Timestamp:
- 2017-09-24T01:02:48+02:00 (7 years ago)
- Location:
- applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFile.java
r33656 r33659 34 34 35 35 // Remembers the last string read, to handle multiline text (more than 80 chars) with "NEXT" keyword 36 Consumer<String> lastReadString;36 private Consumer<String> lastReadString; 37 37 38 38 Block(String type) { … … 139 139 } 140 140 141 public EdigeoFile read( DataSet ds) throws IOException, ReflectiveOperationException {141 public EdigeoFile read() throws IOException, ReflectiveOperationException { 142 142 try (BufferedReader reader = Files.newBufferedReader(path, StandardCharsets.ISO_8859_1)) { 143 143 String line; … … 207 207 // To be overriden if relevant 208 208 } 209 210 EdigeoFile fill(DataSet ds) { 211 // To be overriden if relevant 212 return this; 213 } 209 214 } -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileDIC.java
r33653 r33659 8 8 import java.util.List; 9 9 10 import org.openstreetmap.josm.data.osm.DataSet;11 10 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileDIC.DicBlock; 12 11 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.ChildBlock; … … 134 133 ObjectDef(Lot lot, String type) { 135 134 super(lot, type); 135 } 136 137 @Override 138 public String toString() { 139 return "ObjectDef [code=" + code + ", charset=" + charset + ", definition=" + definition + ", origin=" 140 + origin + ", type=" + type + ", identifier=" + identifier + ']'; 136 141 } 137 142 } … … 204 209 return Collections.unmodifiableList(descrs); 205 210 } 211 212 @Override 213 public String toString() { 214 return "AttributeDef [type=" + type + ", unit=" + unit + ", values=" + values + ", descrs=" + descrs 215 + ", category=" + category + ", code=" + code + ", definition=" + definition + ", origin=" + origin 216 + ", identifier=" + identifier + ']'; 217 } 206 218 } 207 219 … … 212 224 RelationDef(Lot lot, String type) { 213 225 super(lot, type); 226 } 227 228 @Override 229 public String toString() { 230 return "RelationDef [category=" + category + ", code=" + code + ", charset=" + charset + ", definition=" 231 + definition + ", origin=" + origin + ", type=" + type + ", identifier=" + identifier + "]"; 214 232 } 215 233 } … … 230 248 } 231 249 232 @Override233 public EdigeoFileDIC read(DataSet ds) throws IOException, ReflectiveOperationException {234 super.read(ds);235 return this;236 }237 238 250 /** 239 251 * Returns list of object definitions. -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileGEN.java
r33653 r33659 9 9 import org.openstreetmap.josm.data.Bounds; 10 10 import org.openstreetmap.josm.data.coor.EastNorth; 11 import org.openstreetmap.josm.data.osm.DataSet;12 11 import org.openstreetmap.josm.data.projection.Projection; 13 12 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileGEN.GenBlock; … … 182 181 } 183 182 184 @Override185 public EdigeoFileGEN read(DataSet ds) throws IOException, ReflectiveOperationException {186 super.read(ds);187 return this;188 }189 190 183 /** 191 184 * Returns the geographic bounds. -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileGEO.java
r33654 r33659 10 10 11 11 import org.openstreetmap.josm.data.coor.EastNorth; 12 import org.openstreetmap.josm.data.osm.DataSet;13 12 import org.openstreetmap.josm.data.projection.Projection; 14 13 import org.openstreetmap.josm.data.projection.Projections; … … 349 348 } 350 349 351 @Override352 public EdigeoFileGEO read(DataSet ds) throws IOException, ReflectiveOperationException {353 super.read(ds);354 return this;355 }356 357 350 /** 358 351 * Returns the coordinate reference system. -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileQAL.java
r33653 r33659 8 8 import java.util.List; 9 9 10 import org.openstreetmap.josm.data.osm.DataSet;11 10 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileQAL.QalBlock; 12 11 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.ChildBlock; … … 183 182 lot.qal = this; 184 183 } 185 186 @Override187 public EdigeoFileQAL read(DataSet ds) throws IOException, ReflectiveOperationException {188 super.read(ds);189 return this;190 }191 184 } -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileSCD.java
r33657 r33659 7 7 import java.util.List; 8 8 9 import org.openstreetmap.josm.data.osm.DataSet;10 9 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileDIC.AttributeDef; 11 10 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileDIC.ObjectDef; … … 34 33 abstract static class ScdTaggedDef extends ScdBlock { 35 34 /** AAC */ int nAttributes; 36 /** AAP */ final List< String> attributes = new ArrayList<>();35 /** AAP */ final List<List<String>> lAttributes = new ArrayList<>(); 37 36 /** QAC */ int nQualities; 38 37 // TODO: qualities ? 39 38 39 final List<McdAttributeDef> attributes = new ArrayList<>(); 40 40 41 ScdTaggedDef(Lot lot, String type) { 41 42 super(lot, type); … … 46 47 switch (r.name) { 47 48 case "AAC": nAttributes = safeGetInt(r); break; 48 case "AAP": safeGet(r, attributes); break;49 case "AAP": lAttributes.add(r.values); break; 49 50 case "QAC": nQualities = safeGetInt(r); break; 50 51 default: 51 52 super.processRecord(r); 52 53 } 54 } 55 56 @Override 57 void resolve() { 58 super.resolve(); 59 for (List<String> values : lAttributes) { 60 attributes.add(lot.scd.find(values, McdAttributeDef.class)); 61 } 62 lAttributes.clear(); 53 63 } 54 64 … … 106 116 return super.isValid() && areNotNull(dictRef, kind); 107 117 } 118 119 @Override 120 public String toString() { 121 return "McdObjectDef [dictRef=" + dictRef + ", kind=" + kind + ", nAttributes=" + nAttributes 122 + ", attributes=" + attributes + ", nQualities=" + nQualities + ", type=" + type + ", identifier=" 123 + identifier + ']'; 124 } 108 125 } 109 126 … … 144 161 return super.isValid() && areNotNull(dictRef); 145 162 } 163 164 @Override 165 public String toString() { 166 return "McdAttributeDef [dictRef=" + dictRef + ", nMaxChars=" + nMaxChars + ", nMaxDigits=" + nMaxDigits 167 + ", nMaxExponent=" + nMaxExponent + ", unit=" + unit + ", min=" + min + ", max=" + max + ", type=" 168 + type + ", identifier=" + identifier + ']'; 169 } 146 170 } 147 171 … … 190 214 return super.isValid() && areNotNull(kind); 191 215 } 216 217 @Override 218 public String toString() { 219 return "McdPrimitiveDef [kind=" + kind + ", nAttributes=" + nAttributes + ", attributes=" + attributes 220 + ", nQualities=" + nQualities + ", type=" + type + ", identifier=" + identifier + ']'; 221 } 192 222 } 193 223 … … 250 280 return super.isValid() && areNotNull(dictRef); 251 281 } 282 283 @Override 284 public String toString() { 285 return "McdSemanticRelationDef [dictRef=" + dictRef + ", minCardinal=" + minCardinal + ", maxCardinal=" 286 + maxCardinal + ", scdRef=" + scdRef + ", nOccurences=" + nOccurences + ", attributes=" + attributes 287 + ", type=" + type + ", identifier=" + identifier + ']'; 288 } 252 289 } 253 290 … … 259 296 enum RelationKind { 260 297 IS_COMPOSED_OF("ICO"), 261 IS_ DISPLAYED_BY("IDB"),262 IS_ DISPLAYED_BY_ARC("IDR"),298 IS_MADE_OF("IDB"), 299 IS_MADE_OF_ARC("IDR"), 263 300 HAS_FOR_INITIAL_NODE("IND"), 264 301 HAS_FOR_FINAL_NODE("FND"), … … 301 338 boolean isValid() { 302 339 return super.isValid() && areNotNull(kind); 340 } 341 342 @Override 343 public String toString() { 344 return "McdConstructionRelationDef [kind=" + kind + ", minCardinal=" + minCardinal + ", maxCardinal=" 345 + maxCardinal + ", scdRef=" + scdRef + ", nOccurences=" + nOccurences + ", attributes=" + attributes 346 + ", type=" + type + ", identifier=" + identifier + ']'; 303 347 } 304 348 } … … 320 364 lot.scd = this; 321 365 } 322 323 @Override324 public EdigeoFileSCD read(DataSet ds) throws IOException, ReflectiveOperationException {325 super.read(ds);326 return this;327 }328 366 } -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileTHF.java
r33656 r33659 226 226 EdigeoFileQAL qal; 227 227 final List<EdigeoFileVEC> vec = new ArrayList<>(); 228 final List<EdigeoLotFile<?>> allFiles = new ArrayList<>(); 228 229 229 230 Lot(String type) { … … 254 255 } 255 256 256 void readFiles(Path path , DataSet ds) throws IOException, ReflectiveOperationException {257 void readFiles(Path path) throws IOException, ReflectiveOperationException { 257 258 Path dir = path.getParent(); 258 List<EdigeoFile> allFiles = new ArrayList<>(); 259 allFiles.add(new EdigeoFileGEN(this, genId, dir.resolve(name + genName + ".GEN")).read(ds)); 260 allFiles.add(new EdigeoFileGEO(this, geoId, dir.resolve(name + geoName + ".GEO")).read(ds)); 261 allFiles.add(new EdigeoFileDIC(this, dicId, dir.resolve(name + dicName + ".DIC")).read(ds)); 262 allFiles.add(new EdigeoFileSCD(this, scdId, dir.resolve(name + scdName + ".SCD")).read(ds)); 263 allFiles.add(new EdigeoFileQAL(this, qalId, dir.resolve(name + qalName + ".QAL")).read(ds)); 259 allFiles.add(new EdigeoFileGEN(this, genId, dir.resolve(name + genName + ".GEN")).read()); 260 allFiles.add(new EdigeoFileGEO(this, geoId, dir.resolve(name + geoName + ".GEO")).read()); 261 allFiles.add(new EdigeoFileDIC(this, dicId, dir.resolve(name + dicName + ".DIC")).read()); 262 allFiles.add(new EdigeoFileSCD(this, scdId, dir.resolve(name + scdName + ".SCD")).read()); 263 allFiles.add(new EdigeoFileQAL(this, qalId, dir.resolve(name + qalName + ".QAL")).read()); 264 264 for (int i = 0; i < getNumberOfGeoData(); i++) { 265 allFiles.add(new EdigeoFileVEC(this, vecId.get(i), dir.resolve(name + vecName.get(i) + ".VEC")).read( ds));265 allFiles.add(new EdigeoFileVEC(this, vecId.get(i), dir.resolve(name + vecName.get(i) + ".VEC")).read()); 266 266 } 267 267 allFiles.forEach(EdigeoFile::resolve); … … 276 276 } 277 277 278 void fill(DataSet ds) { 279 allFiles.forEach(f -> f.fill(ds)); 280 } 281 278 282 @Override 279 283 boolean isValid() { … … 472 476 473 477 @Override 474 public EdigeoFileTHF read( DataSet ds) throws IOException, ReflectiveOperationException {475 super.read( ds);478 public EdigeoFileTHF read() throws IOException, ReflectiveOperationException { 479 super.read(); 476 480 for (Lot lot : getLots()) { 477 lot.readFiles(path, ds); 481 lot.readFiles(path); 482 } 483 return this; 484 } 485 486 @Override 487 public EdigeoFileTHF fill(DataSet ds) { 488 super.fill(ds); 489 for (Lot lot : getLots()) { 478 490 //ds.addDataSource(new DataSource(lot.gen.getGeoBounds().getBounds(), support.author)); 491 lot.fill(ds); 479 492 } 480 493 return this; -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileVEC.java
r33656 r33659 9 9 import java.util.List; 10 10 import java.util.Map; 11 import java.util.Objects; 12 import java.util.stream.Collectors; 11 13 12 14 import org.openstreetmap.josm.data.coor.EastNorth; … … 15 17 import org.openstreetmap.josm.data.osm.DataSet; 16 18 import org.openstreetmap.josm.data.osm.Node; 19 import org.openstreetmap.josm.data.osm.OsmPrimitive; 20 import org.openstreetmap.josm.data.osm.Tag; 17 21 import org.openstreetmap.josm.data.osm.Way; 18 22 import org.openstreetmap.josm.data.projection.Projection; 23 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdAttributeDef; 24 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdConstructionRelationDef; 25 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdConstructionRelationDef.RelationKind; 19 26 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdObjectDef; 20 27 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdPrimitiveDef; 21 28 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdRelationDef; 29 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.McdSemanticRelationDef; 22 30 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileSCD.ScdBlock; 23 31 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.ChildBlock; 24 32 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.Lot; 25 33 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileVEC.VecBlock; 34 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoRecord.Nature; 26 35 27 36 /** … … 31 40 32 41 abstract static class VecBlock<T extends ScdBlock> extends ChildBlock { 33 final Class<T> klass; 42 private final Class<T> klass; 43 private final List<RelationBlock> parentRelations = new ArrayList<>(); 34 44 35 45 /** SCP */ T scdRef; 36 46 /** ATC */ int nAttributes; 37 /** ATP */ final List< String> attributeDefs = new ArrayList<>();47 /** ATP */ final List<McdAttributeDef> attributeDefs = new ArrayList<>(); 38 48 /** TEX */ EdigeoCharset charset; 39 /** ATV */ final List< String> attributeValues = new ArrayList<>();49 /** ATV */ final List<EdigeoRecord> lAttributeValues = new ArrayList<>(); 40 50 /** QAC */ int nQualities; 41 51 /** QAP */ final List<String> qualityIndics = new ArrayList<>(); 42 52 53 final List<String> attributeValues = new ArrayList<>(); 54 43 55 VecBlock(Lot lot, String type, Class<T> klass) { 44 56 super(lot, type); 45 this.klass = klass;57 this.klass = Objects.requireNonNull(klass, "klass"); 46 58 } 47 59 … … 51 63 case "SCP": scdRef = lot.scd.find(r.values, klass); break; 52 64 case "ATC": nAttributes = safeGetInt(r); break; 53 case "ATP": safeGet(r, attributeDefs); break;65 case "ATP": attributeDefs.add(lot.scd.find(r.values, McdAttributeDef.class)); break; 54 66 case "TEX": safeGet(r, s -> charset = EdigeoCharset.of(s)); break; 55 case "ATV": safeGet(r, attributeValues); break;67 case "ATV": lAttributeValues.add(r); break; 56 68 case "QAC": nQualities = safeGetInt(r); break; 57 69 case "QAP": safeGet(r, qualityIndics); break; … … 62 74 63 75 @Override 76 void resolve() { 77 super.resolve(); 78 for (EdigeoRecord r : lAttributeValues) { 79 if (r.nature == Nature.COMPOSED) { 80 //attributeValues.add(lot.scd.find(r.values, McdAttributeDef.class).dictRef); 81 attributeValues.add(r.values.toString()); // FIXME 82 } else { 83 attributeValues.add(r.values.get(0)); 84 } 85 } 86 lAttributeValues.clear(); 87 } 88 89 @Override 64 90 boolean isValid() { 65 91 return super.isValid() && areNotNull(scdRef) 66 92 && areSameSize(nAttributes, attributeDefs, attributeValues) 67 93 && areSameSize(nQualities, qualityIndics); 94 } 95 96 final boolean addRelation(RelationBlock relationBlock) { 97 return parentRelations.add(Objects.requireNonNull(relationBlock, "relationBlock")); 98 } 99 100 public final List<RelationBlock> getConstructionRelations() { 101 return parentRelations.stream().filter(r -> r.scdRef instanceof McdConstructionRelationDef).collect(Collectors.toList()); 102 } 103 104 public final List<RelationBlock> getSemanticRelations() { 105 return parentRelations.stream().filter(r -> r.scdRef instanceof McdSemanticRelationDef).collect(Collectors.toList()); 68 106 } 69 107 } … … 129 167 } 130 168 169 @Override 170 public String toString() { 171 return "NodeBlock [identifier=" + identifier + ']'; 172 } 173 131 174 /** 132 175 * Returns the reference to SCD. … … 206 249 switch (r.name) { 207 250 case "TYP": arcType = ArcType.of(safeGetInt(r)); break; 208 case "PTC": nPoints = safeGetInt(r); assert checkNumberOfPoints();break;251 case "PTC": nPoints = safeGetInt(r); break; 209 252 case "COR": points.add(safeGetEastNorth(r)); break; 210 253 default: 211 254 super.processRecord(r); 212 255 } 256 } 257 258 @Override 259 boolean isValid() { 260 return super.isValid() && areNotNull(arcType) && checkNumberOfPoints() && areSameSize(nPoints, points); 261 } 262 263 @Override 264 public String toString() { 265 return "ArcBlock [identifier=" + identifier + ']'; 213 266 } 214 267 … … 231 284 super(lot, type, McdPrimitiveDef.class); 232 285 } 286 287 @Override 288 public String toString() { 289 return "FaceBlock [identifier=" + identifier + ']'; 290 } 233 291 } 234 292 … … 250 308 super.processRecord(r); 251 309 } 310 } 311 312 @Override 313 public String toString() { 314 return "ObjectBlock [identifier=" + identifier + ']'; 252 315 } 253 316 } … … 307 370 @Override 308 371 final void resolve() { 372 super.resolve(); 309 373 for (List<String> values : lElements) { 310 374 VecBlock<?> b = lot.vec.stream().filter(v -> v.subsetId.equals(values.get(1))).findAny() 311 375 .orElseThrow(() -> new IllegalArgumentException(values.toString())) 312 376 .find(values, VecBlock.class); 377 b.addRelation(this); 313 378 elements.add(b); 314 379 compositions.put(b, mCompositions.get(values)); … … 316 381 lElements.clear(); 317 382 mCompositions.clear(); 383 } 384 385 @Override 386 public String toString() { 387 return "RelationBlock [identifier=" + identifier + ']'; 318 388 } 319 389 } … … 353 423 354 424 @Override 355 public EdigeoFileVEC read(DataSet ds) throws IOException, ReflectiveOperationException{356 super. read(ds);425 EdigeoFileVEC fill(DataSet ds) { 426 super.fill(ds); 357 427 Projection proj = lot.geo.getCoorReference().getProjection(); 358 // Nodes 359 for (NodeBlock nb : getNodes()) { 360 assert nb.nAttributes == 0 : nb; 361 assert nb.nQualities == 0 : nb; 362 LatLon ll = proj.eastNorth2latlon(nb.getCoordinate()); 363 if (ds.searchNodes(around(ll)).isEmpty()) { 364 ds.addPrimitive(new Node(ll)); 365 } 366 } 367 // Arcs 368 for (ArcBlock ab : getArcs()) { 369 assert ab.nAttributes == 0 : ab; 370 assert ab.nQualities == 0 : ab; 371 assert ab.nPoints >= 2 : ab; 372 Way w = new Way(); 373 for (EastNorth en : ab.points) { 374 w.addNode(getNodeAt(ds, proj, en)); 375 } 376 ds.addPrimitive(w); 428 for (ObjectBlock obj : getObjects()) { 429 List<RelationBlock> constructionRelations = obj.getConstructionRelations(); 430 switch (obj.scdRef.kind) { 431 case POINT: fillPoint(ds, proj, obj, constructionRelations); break; 432 case LINE: fillLine(ds, proj, obj, constructionRelations); break; 433 case COMPLEX: break; // TODO 434 case AREA: break; // TODO 435 default: throw new IllegalArgumentException(obj.toString()); 436 } 377 437 } 378 438 return this; 439 } 440 441 private static void addPrimitiveAndTags(DataSet ds, ObjectBlock obj, OsmPrimitive osm) { 442 for (int i = 0; i < obj.nAttributes; i++) { 443 osm.put(new Tag(obj.attributeDefs.get(i).identifier, obj.attributeValues.get(i))); 444 } 445 ds.addPrimitive(osm); 446 } 447 448 private static void fillPoint(DataSet ds, Projection proj, ObjectBlock obj, List<RelationBlock> constructionRelations) { 449 assert constructionRelations.size() == 1 : constructionRelations; 450 RelationBlock rel = constructionRelations.get(0); 451 assert rel.scdRef instanceof McdConstructionRelationDef : rel; 452 if (rel.scdRef instanceof McdConstructionRelationDef) { 453 McdConstructionRelationDef crd = (McdConstructionRelationDef) rel.scdRef; 454 assert crd.kind == RelationKind.IS_MADE_OF; 455 assert crd.nAttributes == 0; 456 } 457 for (VecBlock<?> e : rel.elements) { 458 if (e instanceof NodeBlock) { 459 NodeBlock nb = (NodeBlock) e; 460 assert nb.nAttributes == 0; 461 LatLon ll = proj.eastNorth2latlon(nb.getCoordinate()); 462 //if (ds.searchNodes(around(ll)).isEmpty()) { 463 addPrimitiveAndTags(ds, obj, new Node(ll)); 464 //} 465 break; 466 } 467 } 468 } 469 470 private static void fillLine(DataSet ds, Projection proj, ObjectBlock obj, List<RelationBlock> constructionRelations) { 471 assert constructionRelations.size() >= 1 : constructionRelations; 472 // TODO sort relations 473 Way w = new Way(); 474 for (RelationBlock rel : constructionRelations) { 475 assert rel.scdRef instanceof McdConstructionRelationDef : rel; 476 if (rel.scdRef instanceof McdConstructionRelationDef) { 477 McdConstructionRelationDef crd = (McdConstructionRelationDef) rel.scdRef; 478 assert crd.kind == RelationKind.IS_MADE_OF_ARC; 479 assert crd.nAttributes == 0; 480 } 481 for (VecBlock<?> e : rel.elements) { 482 if (e instanceof ArcBlock) { 483 ArcBlock ab = (ArcBlock) e; 484 assert ab.nAttributes == 0 : ab; 485 assert ab.nQualities == 0 : ab; 486 for (EastNorth en : ab.points) { 487 w.addNode(getNodeAt(ds, proj, en)); 488 } 489 } 490 } 491 } 492 assert w.getNodesCount() >= 2; 493 addPrimitiveAndTags(ds, obj, w); 379 494 } 380 495 -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoLotFile.java
r33656 r33659 10 10 import java.util.Objects; 11 11 12 import org.openstreetmap.josm.data.osm.DataSet;13 12 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.ChildBlock; 14 13 import org.openstreetmap.josm.plugins.fr.cadastre.edigeo.EdigeoFileTHF.Lot; … … 46 45 47 46 @Override 48 public EdigeoLotFile<B> read( DataSet ds) throws IOException, ReflectiveOperationException {49 super.read( ds);47 public EdigeoLotFile<B> read() throws IOException, ReflectiveOperationException { 48 super.read(); 50 49 return this; 51 50 } -
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/pci/EdigeoPciReader.java
r33649 r33659 41 41 DataSet data = new DataSet(); 42 42 data.setUploadPolicy(UploadPolicy.DISCOURAGED); 43 EdigeoFileTHF thf = new EdigeoFileTHF(path).read( data);43 EdigeoFileTHF thf = new EdigeoFileTHF(path).read().fill(data); 44 44 data.setName(thf.getSupport().getBlockIdentifier()); 45 45 return data;
Note:
See TracChangeset
for help on using the changeset viewer.