if (lmx.getLandmark() != null)
lmx.setLandmark(null);
} else
lmx = objectFactory.createLmx();
LandmarkCollectionType landmarkCollectionType = lmx.getLandmarkCollection();
if (landmarkCollectionType == null)
landmarkCollectionType = objectFactory.createLandmarkCollectionType();
landmarkCollectionType.setName(asRouteName(route.getName()));
landmarkCollectionType.setDescription(asDescription(route.getDescription()));
List<LandmarkType> landmarkTypeList = landmarkCollectionType.getLandmark();
landmarkTypeList.clear();
List<Wgs84Position> positions = route.getPositions();
for (int i = startIndex; i < endIndex; i++) {
Wgs84Position position = positions.get(i);