Beispiel #1
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;
  }
Beispiel #2
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;
  }
Beispiel #3
0
  bool Database::GetAreasByOffset(const std::list<FileOffset>& offsets,
                                  std::vector<AreaRef>& areas) const
  {
    AreaDataFileRef areaDataFile=GetAreaDataFile();

    if (!areaDataFile) {
      return false;
    }

    StopClock time;

    bool result=areaDataFile->GetByOffset(offsets,areas);

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

    return result;
  }
Beispiel #4
0
  bool Database::GetAreaByOffset(const FileOffset& offset,
                                 AreaRef& area) const
  {
    AreaDataFileRef areaDataFile=GetAreaDataFile();

    if (!areaDataFile) {
      return false;
    }

    StopClock time;

    bool result=areaDataFile->GetByOffset(offset,area);

    time.Stop();

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

    return result;
  }
Beispiel #5
0
  bool Database::GetNodesByOffset(const std::list<FileOffset>& offsets,
                                  std::vector<NodeRef>& nodes) const
  {
    NodeDataFileRef nodeDataFile=GetNodeDataFile();

    if (!nodeDataFile) {
      return false;
    }

    StopClock time;

    bool result=nodeDataFile->GetByOffset(offsets,nodes);

    time.Stop();

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

    return result;
  }
Beispiel #6
0
  bool Database::GetNodeByOffset(const FileOffset& offset,
                                 NodeRef& node) const
  {
    NodeDataFileRef nodeDataFile=GetNodeDataFile();

    if (!nodeDataFile) {
      return false;
    }

    StopClock time;

    bool result=nodeDataFile->GetByOffset(offset,node);

    time.Stop();

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

    return result;
  }