Changeset 33654 in osm for applications/editors
- Timestamp:
- 2017-09-22T22:22:46+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/EdigeoFileGEO.java
r33653 r33654 29 29 30 30 /** 31 * Coordinates reference. 31 * Coordinates reference. 7.4.2.1 32 32 */ 33 33 public static class CoorReference extends GeoBlock { … … 38 38 PROJECTED("MAP"); 39 39 40 String code;40 final String code; 41 41 ReferenceType(String code) { 42 42 this.code = code; … … 57 57 THREE_DIM_OR_NO_ALTITUDE(2); 58 58 59 int code;59 final int code; 60 60 AltitudeSystem(int code) { 61 61 this.code = code; … … 76 76 BATHYMETRIC(2); 77 77 78 int code;78 final int code; 79 79 AltitudeSystemType(int code) { 80 80 this.code = code; … … 186 186 /** DIM */ int nDim; 187 187 /** ALS */ AltitudeSystem altitudeSystem; 188 /** */ AltitudeSystemType altitudeSystemType; // TODO189 /** */ String altitudeSystemName = ""; // TODO190 /** */ String altitudeSystemCode = ""; // TODO188 /** ALT */ AltitudeSystemType altitudeSystemType; 189 /** ALN */ String altitudeSystemName = ""; 190 /** ALL */ String altitudeSystemCode = ""; 191 191 /** UNH */ String unitHorizontal = ""; 192 /** */ String unitVertical = ""; // TODO192 /** UNV */ String unitVertical = ""; 193 193 194 194 CoorReference(Lot lot, String type) { … … 204 204 case "DIM": nDim = safeGetInt(r); break; 205 205 case "ALS": altitudeSystem = AltitudeSystem.of(safeGetInt(r)); break; 206 case "ALT": altitudeSystemType = AltitudeSystemType.of(safeGetInt(r)); break; 207 case "ALN": safeGet(r, s -> altitudeSystemName += s); break; 208 case "ALL": safeGet(r, s -> altitudeSystemCode += s); break; 206 209 case "UNH": safeGet(r, s -> unitHorizontal += s); break; 210 case "UNV": safeGet(r, s -> unitVertical += s); break; 207 211 default: 208 212 super.processRecord(r); … … 291 295 292 296 /** 293 * Offset. 297 * Offset. 7.4.2.2 294 298 */ 295 299 public static class Offset extends GeoBlock { 296 300 297 /** */ int nOffsetPoints; // TODO298 /** */ int nControlPoints; // TODO299 /** */ final List<String> offsetPointIds = new ArrayList<>(); // TODO300 /** */ final List<EastNorth> offsetInputCoor = new ArrayList<>(); // TODO301 /** */ final List<EastNorth> offsetReferCoor = new ArrayList<>(); // TODO302 /** */ final List<String> controlPointIds = new ArrayList<>(); // TODO303 /** */ final List<EastNorth> controlInputCoor = new ArrayList<>(); // TODO304 /** */ final List<EastNorth> controlReferCoor = new ArrayList<>(); // TODO301 /** RPC */ int nOffsetPoints; 302 /** RPI */ final List<String> offsetPointIds = new ArrayList<>(); 303 /** RP1 */ final List<EastNorth> offsetInputCoor = new ArrayList<>(); 304 /** RP2 */ final List<EastNorth> offsetReferCoor = new ArrayList<>(); 305 /** CPC */ int nControlPoints; 306 /** CPI */ final List<String> controlPointIds = new ArrayList<>(); 307 /** CP1 */ final List<EastNorth> controlInputCoor = new ArrayList<>(); 308 /** CP2 */ final List<EastNorth> controlReferCoor = new ArrayList<>(); 305 309 306 310 Offset(Lot lot, String type) { 307 311 super(lot, type); 312 } 313 314 @Override 315 void processRecord(EdigeoRecord r) { 316 switch (r.name) { 317 case "RPC": nOffsetPoints = safeGetInt(r); break; 318 case "RPI": safeGet(r, offsetPointIds); break; 319 case "RP1": offsetInputCoor.add(safeGetEastNorth(r)); break; 320 case "RP2": offsetReferCoor.add(safeGetEastNorth(r)); break; 321 case "CPC": nControlPoints = safeGetInt(r); break; 322 case "CPI": safeGet(r, controlPointIds); break; 323 case "CP1": controlInputCoor.add(safeGetEastNorth(r)); break; 324 case "CP2": controlReferCoor.add(safeGetEastNorth(r)); break; 325 default: super.processRecord(r); 326 } 308 327 } 309 328 … … 343 362 return blocks.getInstances(CoorReference.class).get(0); 344 363 } 364 365 /** 366 * Returns the offset descriptor. 367 * @return the offset descriptor 368 */ 369 public Offset getOffset() { 370 return blocks.getInstances(Offset.class).get(0); 371 } 345 372 }
Note:
See TracChangeset
for help on using the changeset viewer.