|
GEOS 3.15.0beta1
|
Utility classes for GEOS. More...
Classes | |
| class | AssertionFailedException |
| Indicates a bug in GEOS code. More... | |
| class | GeometricShapeFactory |
| Computes various kinds of common geometric shapes. More... | |
| class | GEOSException |
| Base class for all GEOS exceptions. More... | |
| class | IllegalArgumentException |
| Indicates one or more illegal arguments. More... | |
| class | IllegalStateException |
| Indicates an illegal state. More... | |
| class | Interrupt |
| Used to manage interruption requests and callbacks. More... | |
| class | TopologyException |
| Indicates an invalid or inconsistent topological situation encountered during processing. More... | |
| class | UnsupportedOperationException |
| Indicates that the requested operation is unsupported. More... | |
Typedefs | |
| typedef std::function< void(double, const char *)> | ProgressFunction |
Functions | |
| std::ostream & | operator<< (std::ostream &os, const Profile &) |
| Return a string representing the Profile. | |
| std::ostream & | operator<< (std::ostream &os, const Profiler &) |
| Return a string representing the Profiler. | |
| template<typename T> | |
| void | ensureNoCurvedComponents (const T &geom) |
| template<typename T> | |
| void | ensureNoCurvedComponents (const T *geom) |
| double | sym_round (double val) |
| Symmetric Rounding Algorithm. | |
| double | java_math_round (double val) |
| Asymmetric Rounding Algorithm. | |
| double | rint_vc (double val) |
| Equivalent to Java Math.rint(). | |
| double | round (double val) |
| double | clamp (double x, double min, double max) |
| Equivalent to std::clamp() in C++17. | |
| void | ProgressFunctionIteration (ProgressFunction &progressFunction, size_t i, size_t iterCount, size_t &iNotify, size_t notificationInterval) |
| ProgressFunction | CreateScaledProgressFunction (double ratioMin, double ratioMax, ProgressFunction &progressFunction) |
| bool | endsWith (const std::string &s, const std::string &suffix) |
| bool | endsWith (const std::string &s, char suffix) |
| bool | startsWith (const std::string &s, const std::string &prefix) |
| bool | startsWith (const std::string &s, char prefix) |
| void | toUpper (std::string &s) |
Utility classes for GEOS.
| typedef std::function<void(double, const char*)> geos::util::ProgressFunction |
Signature of a progression function.
Such function takes a progression ratio (between 0 and 1), and an optional message.
| ProgressFunction geos::util::CreateScaledProgressFunction | ( | double | ratioMin, |
| double | ratioMax, | ||
| ProgressFunction & | progressFunction ) |
Create a scaled progress function.
Sometimes when an operation wants to report progress, it actually invokes several subprocesses which also take a ProgressFunction, and it is desirable to map the progress of each sub operation into a portion of 0.0 to 1.0 progress of the overall process. The scaled progress function can be used for this.
For each subsection a scaled progress function is created and instead of passing the overall progress func down to the sub functions, the scale progress function is passed instead.
| ratioMin | the value to which 0.0 in the sub operation is mapped. |
| ratioMax | the value to which 1.0 is the sub operation is mapped. |
| progressFunction | the overall progress function. |
| void geos::util::ProgressFunctionIteration | ( | ProgressFunction & | progressFunction, |
| size_t | i, | ||
| size_t | iterCount, | ||
| size_t & | iNotify, | ||
| size_t | notificationInterval ) |
Do progress function related processing for an iteration loop of iterCount iterations.
This function will invoke (*progressFunction) every notificationInterval iteration.
This function will return, or throw a geos::util::InterruptedException.
A typical use is:
| progressFunction | Progress function |
| i | Current index of loop iteration. |
| iterCount | Total number of loop iteration. |
| iNotify | Notification counter, updated by this function. Must be set by the caller (before the loop) to 0. |
| notificationInterval | Notification interval (e.g. iterCount / 100). |
|
inline |
Default rounding method for GEOS
References java_math_round().