68 #include <internal/HeightMapper.h>
71 #ifdef CHECK_MEMORY_LEAKS
73 #endif // CHECK_MEMORY_LEAKS
98 HeightMapper::loadIfSet(oc);
165 const std::string& type) {
168 std::string exceptMsg =
"";
171 for (std::vector<std::string>::const_iterator file = files.begin(); file != files.end(); ++file) {
173 WRITE_ERROR(
"Could not open " + type +
"-file '" + *file +
"'.");
174 exceptMsg =
"Process Error";
179 parser->parse(file->c_str());
182 }
catch (
const XMLException& toCatch) {
184 +
"\n The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
186 exceptMsg = std::string(toCatch.what()) +
"\n The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
188 exceptMsg =
"The " + type +
" could not be loaded from '" + handler->
getFileName() +
"'.";
192 if (exceptMsg !=
"") {
204 const HeightMapper& hm = HeightMapper::get();
221 if (maxLength > 0 && from.
size() > 1) {
224 for (
int i = 0; i < (
int) from.
size(); i++) {
230 for (
int i = 0; i < (
int)copy.
size() - 1; i++) {
231 Position start = from[i + inserted];
232 Position end = from[i + inserted + 1];
233 SUMOReal length = copy[i].distanceTo(copy[i + 1]);
234 const Position step = (end - start) * (maxLength / length);
236 while (length > maxLength) {
239 from.
insertAt(i + inserted + 1, start + (step * steps));
247 for (
int i = 0; i < (
int) from.
size(); i++) {