Ejemplo n.º 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);
  }
Ejemplo n.º 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);
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }
Ejemplo n.º 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;
  }