Example #1
0
  bool Database::GetWaysByOffset(const std::list<FileOffset>& offsets,
                                 std::vector<WayRef>& ways) const
  {
    WayDataFileRef wayDataFile=GetWayDataFile();

    if (wayDataFile.Invalid()) {
      return false;
    }

    return wayDataFile->GetByOffset(offsets,ways);
  }
Example #2
0
  bool Database::GetWaysByOffset(const std::set<FileOffset>& offsets,
                                 std::unordered_map<FileOffset,WayRef>& dataMap) const
  {
    WayDataFileRef wayDataFile=GetWayDataFile();

    if (wayDataFile.Invalid()) {
      return false;
    }

    return wayDataFile->GetByOffset(offsets,dataMap);
  }
Example #3
0
  bool Database::GetWayByOffset(const FileOffset& offset,
                                WayRef& way) const
  {
    WayDataFileRef wayDataFile=GetWayDataFile();

    if (wayDataFile.Invalid()) {
      return false;
    }

    if (wayDataFile->GetByOffset(offset,way)) {
      return true;
    }

    return false;
  }
Example #4
0
  bool Database::GetWaysByOffset(const std::set<FileOffset>& offsets,
                                 std::unordered_map<FileOffset,WayRef>& dataMap) const
  {
    WayDataFileRef wayDataFile=GetWayDataFile();

    if (!wayDataFile) {
      return false;
    }

    StopClock time;

    bool result=wayDataFile->GetByOffset(offsets,dataMap);

    if (time.GetMilliseconds()>100) {
      log.Warn() << "Retrieving ways by offset took " << time.ResultString();
    }

    return result;
  }
Example #5
0
  bool Database::GetWayByOffset(const FileOffset& offset,
                                WayRef& way) const
  {
    WayDataFileRef wayDataFile=GetWayDataFile();

    if (!wayDataFile) {
      return false;
    }

    StopClock time;

    bool result=wayDataFile->GetByOffset(offset,way);

    if (time.GetMilliseconds()>100) {
      log.Warn() << "Retrieving ways by offset took " << time.ResultString();
    }

    return result;
  }