use of ch.interlis.ili2c.metamodel.NumericalType in project ili2db by claeis.
the class FromXtfRecordConverter method getP.
public double getP(LineType type) {
if (typeCache.containsKey(type)) {
return ((Double) typeCache.get(type)).doubleValue();
}
double p;
CoordType coordType = (CoordType) type.getControlPointDomain().getType();
NumericalType[] dimv = coordType.getDimensions();
int accuracy = ((NumericType) dimv[0]).getMaximum().getAccuracy();
if (accuracy == 0) {
p = 0.5;
} else {
p = Math.pow(10.0, -accuracy);
// EhiLogger.debug("accuracy "+accuracy+", p "+p);
}
typeCache.put(type, new Double(p));
return p;
}
Aggregations