-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #279 from IGNF/issue_278
validator-core: update GeometryComplexityThresholdOption reader option
- Loading branch information
Showing
7 changed files
with
235 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 15 additions & 82 deletions
97
validator-core/src/main/java/fr/ign/validator/geometry/GeometryComplexityThreshold.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,104 +1,37 @@ | ||
package fr.ign.validator.geometry; | ||
|
||
/** | ||
* Defines treshold to determine geometry complexity - maximum point allowed - | ||
* maximum ring (holes) allowed - maximum parts (multigeometry) allowed - | ||
* maximum density (number of point by meters used to describe the geometry) | ||
* | ||
* All threshold work by couple a warning one or an error one | ||
* A couple of warning threshold and an error one - used by geometry complexity | ||
* validator | ||
* | ||
* @author cbouche | ||
* | ||
*/ | ||
public class GeometryComplexityThreshold { | ||
|
||
private int warningPointCount; | ||
private int warningRingCount; | ||
private int warningPartCount; | ||
private double warningDensity; | ||
|
||
private int errorPointCount; | ||
private int errorRingCount; | ||
private int errorPartCount; | ||
private double errorDensity; | ||
|
||
public GeometryComplexityThreshold( | ||
int warningPointCount, int warningRingCount, int warningPartCount, double warningDensity, | ||
int errorPointCount, int errorRingCount, int errorPartCount, double errorDensity) { | ||
|
||
this.warningPointCount = warningPointCount; | ||
this.warningRingCount = warningRingCount; | ||
this.warningPartCount = warningPartCount; | ||
this.warningDensity = warningDensity; | ||
|
||
this.errorPointCount = errorPointCount; | ||
this.errorRingCount = errorRingCount; | ||
this.errorPartCount = errorPartCount; | ||
this.errorDensity = errorDensity; | ||
} | ||
|
||
public int getWarningPointCount() { | ||
return warningPointCount; | ||
} | ||
|
||
public void setWarningPointCount(int warningPointCount) { | ||
this.warningPointCount = warningPointCount; | ||
} | ||
|
||
public int getWarningRingCount() { | ||
return warningRingCount; | ||
} | ||
|
||
public void setWarningRingCount(int warningRingCount) { | ||
this.warningRingCount = warningRingCount; | ||
} | ||
private GeometryThreshold warningThreshold; | ||
|
||
public int getWarningPartCount() { | ||
return warningPartCount; | ||
} | ||
|
||
public void setWarningPartCount(int warningPartCount) { | ||
this.warningPartCount = warningPartCount; | ||
} | ||
|
||
public double getWarningDensity() { | ||
return warningDensity; | ||
} | ||
|
||
public void setWarningDensity(double warningDensity) { | ||
this.warningDensity = warningDensity; | ||
} | ||
|
||
public int getErrorPointCount() { | ||
return errorPointCount; | ||
} | ||
|
||
public void setErrorPointCount(int errorPointCount) { | ||
this.errorPointCount = errorPointCount; | ||
} | ||
|
||
public int getErrorRingCount() { | ||
return errorRingCount; | ||
} | ||
private GeometryThreshold errorThreshold; | ||
|
||
public void setErrorRingCount(int errorRingCount) { | ||
this.errorRingCount = errorRingCount; | ||
public GeometryComplexityThreshold(GeometryThreshold warningThreshold, GeometryThreshold errorThreshold) { | ||
this.warningThreshold = warningThreshold; | ||
this.errorThreshold = errorThreshold; | ||
} | ||
|
||
public int getErrorPartCount() { | ||
return errorPartCount; | ||
public GeometryThreshold getWarningThreshold() { | ||
return warningThreshold; | ||
} | ||
|
||
public void setErrorPartCount(int errorPartCount) { | ||
this.errorPartCount = errorPartCount; | ||
public void setWarningThreshold(GeometryThreshold warningThreshold) { | ||
this.warningThreshold = warningThreshold; | ||
} | ||
|
||
public double getErrorDensity() { | ||
return errorDensity; | ||
public GeometryThreshold getErrorThreshold() { | ||
return errorThreshold; | ||
} | ||
|
||
public void setErrorDensity(double errorDensity) { | ||
this.errorDensity = errorDensity; | ||
public void setErrorThreshold(GeometryThreshold errorThreshold) { | ||
this.errorThreshold = errorThreshold; | ||
} | ||
|
||
} |
71 changes: 71 additions & 0 deletions
71
validator-core/src/main/java/fr/ign/validator/geometry/GeometryThreshold.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
package fr.ign.validator.geometry; | ||
|
||
/** | ||
* Defines treshold to determine geometry complexity - maximum point allowed - | ||
* maximum ring (holes) allowed - maximum parts (multigeometry) allowed - | ||
* maximum density (number of point by meters used to describe the geometry) - | ||
* and maximum point of any ring (used in density control) | ||
* | ||
* @author cbouche | ||
* | ||
*/ | ||
public class GeometryThreshold { | ||
|
||
private int pointCount; | ||
private int partCount; | ||
private int ringCount; | ||
private double density; | ||
private int ringPointCount; | ||
|
||
public GeometryThreshold() { | ||
} | ||
|
||
public GeometryThreshold(int pointCount, int partCount, int ringCount, double density, int ringPointCount) { | ||
this.pointCount = pointCount; | ||
this.partCount = partCount; | ||
this.ringCount = ringCount; | ||
this.density = density; | ||
this.ringPointCount = ringPointCount; | ||
} | ||
|
||
public int getPointCount() { | ||
return pointCount; | ||
} | ||
|
||
public void setPointCount(int pointCount) { | ||
this.pointCount = pointCount; | ||
} | ||
|
||
public int getPartCount() { | ||
return partCount; | ||
} | ||
|
||
public void setPartCount(int partCount) { | ||
this.partCount = partCount; | ||
} | ||
|
||
public int getRingCount() { | ||
return ringCount; | ||
} | ||
|
||
public void setRingCount(int ringCount) { | ||
this.ringCount = ringCount; | ||
} | ||
|
||
public double getDensity() { | ||
return density; | ||
} | ||
|
||
public void setDensity(double density) { | ||
this.density = density; | ||
} | ||
|
||
public int getRingPointCount() { | ||
return ringPointCount; | ||
} | ||
|
||
public void setRingPointCount(int ringPointCount) { | ||
this.ringPointCount = ringPointCount; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.