69 #include <internal/HeightMapper.h>
72 #ifdef CHECK_MEMORY_LEAKS
74 #endif // CHECK_MEMORY_LEAKS
99 HeightMapper::loadIfSet(oc);
112 if (oc.
getBool(
"tls.discard-loaded") || oc.
getBool(
"tls.discard-simple")) {
173 const std::string& type) {
175 std::string exceptMsg =
"";
178 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
180 WRITE_ERROR(
"Could not open " + type +
"-file '" + *file +
"'.");
181 exceptMsg =
"Process Error";
188 }
catch (
const XERCES_CPP_NAMESPACE::XMLException& toCatch) {
190 +
"\n The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
192 exceptMsg = std::string(toCatch.what()) +
"\n The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
194 exceptMsg =
"The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
197 if (exceptMsg !=
"") {
209 const HeightMapper& hm = HeightMapper::get();
228 if (maxLength > 0 && from.size() > 1) {
231 for (
int i = 0; i < (
int) from.size(); i++) {
237 for (
int i = 0; i < (
int)copy.size() - 1; i++) {
238 Position start = from[i + inserted];
239 Position end = from[i + inserted + 1];
240 SUMOReal length = copy[i].distanceTo(copy[i + 1]);
241 const Position step = (end - start) * (maxLength / length);
243 while (length > maxLength) {
246 from.
insertAt(i + inserted + 1, start + (step * steps));
254 for (
int i = 0; i < (
int) from.size(); i++) {