mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-04-20 04:09:11 +02:00
Compare commits
No commits in common. "a11ba0487c63d9a03deed2d05b1f67dbb5de48de" and "f620bbc3835fbfe57313480a23bddc9c8b328826" have entirely different histories.
a11ba0487c
...
f620bbc383
@ -120,15 +120,15 @@ void VectorTile::clear()
|
||||
|
||||
void VectorTile::polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Poly> *polygons, QList<MapData::Poly> *lines,
|
||||
MapData::PolyCache *cache, QMutex *cacheLock)
|
||||
MapData::PolyCache *cache, QMutex *lock)
|
||||
{
|
||||
SubFile::Handle *rgnHdl = 0, *lblHdl = 0, *netHdl = 0, *nodHdl = 0,
|
||||
*nodHdl2 = 0;
|
||||
|
||||
_lock.lock();
|
||||
lock->lock();
|
||||
|
||||
if (_loaded < 0) {
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -139,23 +139,18 @@ void VectorTile::polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
nodHdl = new SubFile::Handle(file, _nod);
|
||||
|
||||
if (!load(*rgnHdl, *lblHdl, *netHdl, *nodHdl)) {
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
delete rgnHdl; delete lblHdl; delete netHdl; delete nodHdl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QList<SubDiv*> subdivs = _tre->subdivs(file, rect, zoom);
|
||||
|
||||
cacheLock->lock();
|
||||
|
||||
for (int i = 0; i < subdivs.size(); i++) {
|
||||
SubDiv *subdiv = subdivs.at(i);
|
||||
|
||||
MapData::Polys *polys = cache->object(subdiv);
|
||||
if (!polys) {
|
||||
cacheLock->unlock();
|
||||
|
||||
quint32 shift = _tre->shift(subdiv->bits());
|
||||
|
||||
if (!rgnHdl) {
|
||||
@ -164,10 +159,8 @@ void VectorTile::polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
netHdl = new SubFile::Handle(file, _net);
|
||||
}
|
||||
|
||||
if (!subdiv->initialized() && !_rgn->subdivInit(*rgnHdl, subdiv)) {
|
||||
cacheLock->lock();
|
||||
if (!subdiv->initialized() && !_rgn->subdivInit(*rgnHdl, subdiv))
|
||||
continue;
|
||||
}
|
||||
|
||||
polys = new MapData::Polys();
|
||||
|
||||
@ -193,7 +186,6 @@ void VectorTile::polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
if (lines)
|
||||
copyPolys(rect, &polys->lines, lines);
|
||||
|
||||
cacheLock->lock();
|
||||
cache->insert(subdiv, polys);
|
||||
} else {
|
||||
copyPolys(rect, &polys->polygons, polygons);
|
||||
@ -202,21 +194,20 @@ void VectorTile::polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
}
|
||||
}
|
||||
|
||||
cacheLock->unlock();
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
|
||||
delete rgnHdl; delete lblHdl; delete netHdl; delete nodHdl; delete nodHdl2;
|
||||
}
|
||||
|
||||
void VectorTile::points(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Point> *points, MapData::PointCache *cache, QMutex *cacheLock)
|
||||
QList<MapData::Point> *points, MapData::PointCache *cache, QMutex *lock)
|
||||
{
|
||||
SubFile::Handle *rgnHdl = 0, *lblHdl = 0;
|
||||
|
||||
_lock.lock();
|
||||
lock->lock();
|
||||
|
||||
if (_loaded < 0) {
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -227,32 +218,25 @@ void VectorTile::points(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
SubFile::Handle netHdl(file, _net);
|
||||
|
||||
if (!load(*rgnHdl, *lblHdl, netHdl, nodHdl)) {
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
delete rgnHdl; delete lblHdl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
QList<SubDiv*> subdivs = _tre->subdivs(file, rect, zoom);
|
||||
|
||||
cacheLock->lock();
|
||||
|
||||
for (int i = 0; i < subdivs.size(); i++) {
|
||||
SubDiv *subdiv = subdivs.at(i);
|
||||
|
||||
QList<MapData::Point> *pl = cache->object(subdiv);
|
||||
if (!pl) {
|
||||
cacheLock->unlock();
|
||||
|
||||
if (!rgnHdl) {
|
||||
rgnHdl = new SubFile::Handle(file, _rgn);
|
||||
lblHdl = new SubFile::Handle(file, _lbl);
|
||||
}
|
||||
|
||||
if (!subdiv->initialized() && !_rgn->subdivInit(*rgnHdl, subdiv)) {
|
||||
cacheLock->lock();
|
||||
if (!subdiv->initialized() && !_rgn->subdivInit(*rgnHdl, subdiv))
|
||||
continue;
|
||||
}
|
||||
|
||||
pl = new QList<MapData::Point>;
|
||||
|
||||
@ -264,28 +248,26 @@ void VectorTile::points(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
|
||||
copyPoints(rect, pl, points);
|
||||
|
||||
cacheLock->lock();
|
||||
cache->insert(subdiv, pl);
|
||||
} else
|
||||
copyPoints(rect, pl, points);
|
||||
}
|
||||
|
||||
cacheLock->unlock();
|
||||
_lock.unlock();
|
||||
lock->unlock();
|
||||
|
||||
delete rgnHdl; delete lblHdl;
|
||||
}
|
||||
|
||||
void VectorTile::elevations(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Elevation> *elevations, MapData::ElevationCache *cache,
|
||||
QMutex *cacheLock)
|
||||
QMutex *lock)
|
||||
{
|
||||
SubFile::Handle *hdl = 0;
|
||||
|
||||
_demLock.lock();
|
||||
lock->lock();
|
||||
|
||||
if (_demLoaded < 0) {
|
||||
_demLock.unlock();
|
||||
lock->unlock();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -293,7 +275,7 @@ void VectorTile::elevations(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
hdl = new SubFile::Handle(file, _dem);
|
||||
|
||||
if (!loadDem(*hdl)) {
|
||||
_demLock.unlock();
|
||||
lock->unlock();
|
||||
delete hdl;
|
||||
return;
|
||||
}
|
||||
@ -303,25 +285,19 @@ void VectorTile::elevations(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
// the given zoom (we prefer rendering quality rather than speed). For
|
||||
// maps with a single level this has no effect.
|
||||
int level = qMax(0, _dem->level(zoom) - 1);
|
||||
|
||||
QList<const DEMTile*> tiles(_dem->tiles(rect, level));
|
||||
|
||||
cacheLock->lock();
|
||||
|
||||
for (int i = 0; i < tiles.size(); i++) {
|
||||
const DEMTile *tile = tiles.at(i);
|
||||
|
||||
MapData::Elevation *el = cache->object(tile);
|
||||
if (!el) {
|
||||
cacheLock->unlock();
|
||||
|
||||
if (!el) {
|
||||
if (!hdl)
|
||||
hdl = new SubFile::Handle(file, _dem);
|
||||
|
||||
el = _dem->elevations(*hdl, level, tile);
|
||||
if (!el->m.isNull())
|
||||
elevations->append(*el);
|
||||
|
||||
cacheLock->lock();
|
||||
cache->insert(tile, el);
|
||||
} else {
|
||||
if (!el->m.isNull())
|
||||
@ -329,8 +305,7 @@ void VectorTile::elevations(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
}
|
||||
}
|
||||
|
||||
cacheLock->unlock();
|
||||
_demLock.unlock();
|
||||
lock->unlock();
|
||||
|
||||
delete hdl;
|
||||
}
|
||||
|
@ -32,13 +32,12 @@ public:
|
||||
|
||||
void polys(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Poly> *polygons, QList<MapData::Poly> *lines,
|
||||
MapData::PolyCache *cache, QMutex *cacheLock);
|
||||
MapData::PolyCache *cache, QMutex *lock);
|
||||
void points(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Point> *points, MapData::PointCache *cache,
|
||||
QMutex *cacheLock);
|
||||
QList<MapData::Point> *points, MapData::PointCache *cache, QMutex *lock);
|
||||
void elevations(QFile *file, const RectC &rect, const Zoom &zoom,
|
||||
QList<MapData::Elevation> *elevations, MapData::ElevationCache *cache,
|
||||
QMutex *cacheLock);
|
||||
QMutex *lock);
|
||||
|
||||
static bool isTileFile(SubFile::Type type)
|
||||
{
|
||||
@ -93,7 +92,6 @@ private:
|
||||
SubFile *_gmp;
|
||||
|
||||
int _loaded, _demLoaded;
|
||||
QMutex _lock, _demLock;
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -219,10 +219,10 @@ bool MapData::readTags(SubFile &subfile, int count,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MapData::readSubFiles(QFile &file)
|
||||
bool MapData::readSubFiles()
|
||||
{
|
||||
/* both _pointFile and _pathFile can be used here */
|
||||
QDataStream stream(&file);
|
||||
QDataStream stream(&_pointFile);
|
||||
|
||||
for (int i = 0; i < _subFiles.size(); i++) {
|
||||
const SubFileInfo &f = _subFiles.at(i);
|
||||
@ -422,7 +422,8 @@ bool MapData::readHeader(QFile &file)
|
||||
return true;
|
||||
}
|
||||
|
||||
MapData::MapData(const QString &fileName) : _fileName(fileName), _valid(false)
|
||||
MapData::MapData(const QString &fileName)
|
||||
: _pointFile(fileName), _pathFile(fileName), _valid(false)
|
||||
{
|
||||
QFile file(fileName);
|
||||
|
||||
@ -459,13 +460,17 @@ RectC MapData::bounds() const
|
||||
|
||||
void MapData::load()
|
||||
{
|
||||
QFile file(_fileName);
|
||||
if (file.open(QIODevice::ReadOnly | QIODevice::Unbuffered))
|
||||
readSubFiles(file);
|
||||
_pointFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
|
||||
_pathFile.open(QIODevice::ReadOnly | QIODevice::Unbuffered);
|
||||
|
||||
readSubFiles();
|
||||
}
|
||||
|
||||
void MapData::clear()
|
||||
{
|
||||
_pointFile.close();
|
||||
_pathFile.close();
|
||||
|
||||
_pathCache.clear();
|
||||
_pointCache.clear();
|
||||
|
||||
@ -489,14 +494,14 @@ void MapData::clearTiles()
|
||||
bool MapData::pathCb(VectorTile *tile, void *context)
|
||||
{
|
||||
PathCTX *ctx = (PathCTX*)context;
|
||||
ctx->data->paths(ctx->file, tile, ctx->rect, ctx->zoom, ctx->list);
|
||||
ctx->data->paths(tile, ctx->rect, ctx->zoom, ctx->list);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MapData::pointCb(VectorTile *tile, void *context)
|
||||
{
|
||||
PointCTX *ctx = (PointCTX*)context;
|
||||
ctx->data->points(ctx->file, tile, ctx->rect, ctx->zoom, ctx->list);
|
||||
ctx->data->points(tile, ctx->rect, ctx->zoom, ctx->list);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -509,14 +514,13 @@ int MapData::level(int zoom) const
|
||||
return _subFiles.size() - 1;
|
||||
}
|
||||
|
||||
void MapData::points(QFile &file, const RectC &rect, int zoom,
|
||||
QList<Point> *list)
|
||||
void MapData::points(const RectC &rect, int zoom, QList<Point> *list)
|
||||
{
|
||||
if (!rect.isValid())
|
||||
return;
|
||||
|
||||
int l(level(zoom));
|
||||
PointCTX ctx(file, this, rect, zoom, list);
|
||||
PointCTX ctx(this, rect, zoom, list);
|
||||
double min[2], max[2];
|
||||
|
||||
min[0] = rect.left();
|
||||
@ -527,58 +531,53 @@ void MapData::points(QFile &file, const RectC &rect, int zoom,
|
||||
_tiles.at(l)->Search(min, max, pointCb, &ctx);
|
||||
}
|
||||
|
||||
void MapData::points(QFile &file, VectorTile *tile, const RectC &rect,
|
||||
int zoom, QList<Point> *list)
|
||||
void MapData::points(const VectorTile *tile, const RectC &rect, int zoom,
|
||||
QList<Point> *list)
|
||||
{
|
||||
Key key(tile, zoom);
|
||||
|
||||
tile->lock.lock();
|
||||
_pointLock.lock();
|
||||
|
||||
_pointCacheLock.lock();
|
||||
QList<Point> *tilePoints = _pointCache.object(key);
|
||||
|
||||
if (!tilePoints) {
|
||||
_pointCacheLock.unlock();
|
||||
QList<Point> *p = new QList<Point>();
|
||||
if (readPoints(file, tile, zoom, p)) {
|
||||
if (readPoints(tile, zoom, p)) {
|
||||
copyPoints(rect, p, list);
|
||||
_pointCacheLock.lock();
|
||||
_pointCache.insert(key, p);
|
||||
_pointCacheLock.unlock();
|
||||
} else
|
||||
delete p;
|
||||
} else {
|
||||
} else
|
||||
copyPoints(rect, tilePoints, list);
|
||||
_pointCacheLock.unlock();
|
||||
}
|
||||
|
||||
_pathCacheLock.lock();
|
||||
_pointLock.unlock();
|
||||
|
||||
|
||||
_pathLock.lock();
|
||||
|
||||
QList<Path> *tilePaths = _pathCache.object(key);
|
||||
|
||||
if (!tilePaths) {
|
||||
_pathCacheLock.unlock();
|
||||
QList<Path> *p = new QList<Path>();
|
||||
if (readPaths(file, tile, zoom, p)) {
|
||||
if (readPaths(tile, zoom, p)) {
|
||||
copyPoints(rect, p, list);
|
||||
_pathCacheLock.lock();
|
||||
_pathCache.insert(key, p);
|
||||
_pathCacheLock.unlock();
|
||||
} else
|
||||
delete p;
|
||||
} else {
|
||||
} else
|
||||
copyPoints(rect, tilePaths, list);
|
||||
_pathCacheLock.unlock();
|
||||
}
|
||||
|
||||
tile->lock.unlock();
|
||||
_pathLock.unlock();
|
||||
}
|
||||
|
||||
void MapData::paths(QFile &file, const RectC &searchRect,
|
||||
const RectC &boundsRect, int zoom, QList<Path> *list)
|
||||
void MapData::paths(const RectC &searchRect, const RectC &boundsRect, int zoom,
|
||||
QList<Path> *list)
|
||||
{
|
||||
if (!searchRect.isValid())
|
||||
return;
|
||||
|
||||
int l(level(zoom));
|
||||
PathCTX ctx(file, this, boundsRect, zoom, list);
|
||||
PathCTX ctx(this, boundsRect, zoom, list);
|
||||
double min[2], max[2];
|
||||
|
||||
min[0] = searchRect.left();
|
||||
@ -589,38 +588,32 @@ void MapData::paths(QFile &file, const RectC &searchRect,
|
||||
_tiles.at(l)->Search(min, max, pathCb, &ctx);
|
||||
}
|
||||
|
||||
void MapData::paths(QFile &file, VectorTile *tile, const RectC &rect, int zoom,
|
||||
void MapData::paths(const VectorTile *tile, const RectC &rect, int zoom,
|
||||
QList<Path> *list)
|
||||
{
|
||||
Key key(tile, zoom);
|
||||
|
||||
tile->lock.lock();
|
||||
_pathLock.lock();
|
||||
|
||||
_pathCacheLock.lock();
|
||||
QList<Path> *cached = _pathCache.object(key);
|
||||
|
||||
if (!cached) {
|
||||
_pathCacheLock.unlock();
|
||||
QList<Path> *p = new QList<Path>();
|
||||
if (readPaths(file, tile, zoom, p)) {
|
||||
if (readPaths(tile, zoom, p)) {
|
||||
copyPaths(rect, p, list);
|
||||
_pathCacheLock.lock();
|
||||
_pathCache.insert(key, p);
|
||||
_pathCacheLock.unlock();
|
||||
} else
|
||||
delete p;
|
||||
} else {
|
||||
} else
|
||||
copyPaths(rect, cached, list);
|
||||
_pathCacheLock.unlock();
|
||||
}
|
||||
|
||||
tile->lock.unlock();
|
||||
_pathLock.unlock();
|
||||
}
|
||||
|
||||
bool MapData::readPaths(QFile &file, const VectorTile *tile, int zoom,
|
||||
QList<Path> *list)
|
||||
bool MapData::readPaths(const VectorTile *tile, int zoom, QList<Path> *list)
|
||||
{
|
||||
const SubFileInfo &info = _subFiles.at(level(zoom));
|
||||
SubFile subfile(file, info.offset, info.size);
|
||||
SubFile subfile(_pathFile, info.offset, info.size);
|
||||
int rows = info.max - info.min + 1;
|
||||
QVector<unsigned> paths(rows);
|
||||
quint32 blocks, unused, val, cnt = 0;
|
||||
@ -705,11 +698,10 @@ bool MapData::readPaths(QFile &file, const VectorTile *tile, int zoom,
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MapData::readPoints(QFile &file, const VectorTile *tile, int zoom,
|
||||
QList<Point> *list)
|
||||
bool MapData::readPoints(const VectorTile *tile, int zoom, QList<Point> *list)
|
||||
{
|
||||
const SubFileInfo &info = _subFiles.at(level(zoom));
|
||||
SubFile subfile(file, info.offset, info.size);
|
||||
SubFile subfile(_pointFile, info.offset, info.size);
|
||||
int rows = info.max - info.min + 1;
|
||||
QVector<unsigned> points(rows);
|
||||
quint32 val, unused, cnt = 0;
|
||||
|
@ -58,15 +58,14 @@ public:
|
||||
{return point.layer < other.point.layer;}
|
||||
};
|
||||
|
||||
const QString &fileName() const {return _fileName;}
|
||||
RectC bounds() const;
|
||||
Range zooms() const
|
||||
{return Range(_subFiles.first().min, _subFiles.last().max);}
|
||||
int tileSize() const {return _tileSize;}
|
||||
|
||||
void points(QFile &file, const RectC &rect, int zoom, QList<Point> *list);
|
||||
void paths(QFile &file, const RectC &searchRect, const RectC &boundsRect,
|
||||
int zoom, QList<Path> *set);
|
||||
void points(const RectC &rect, int zoom, QList<Point> *list);
|
||||
void paths(const RectC &searchRect, const RectC &boundsRect, int zoom,
|
||||
QList<Path> *set);
|
||||
unsigned tagId(const QByteArray &name) const {return _keys.value(name);}
|
||||
|
||||
void load();
|
||||
@ -90,15 +89,12 @@ private:
|
||||
|
||||
size_t offset;
|
||||
Coordinates pos;
|
||||
QMutex lock;
|
||||
};
|
||||
|
||||
struct PathCTX {
|
||||
PathCTX(QFile &file, MapData *data, const RectC &rect, int zoom,
|
||||
QList<Path> *list)
|
||||
: file(file), data(data), rect(rect), zoom(zoom), list(list) {}
|
||||
PathCTX(MapData *data, const RectC &rect, int zoom, QList<Path> *list)
|
||||
: data(data), rect(rect), zoom(zoom), list(list) {}
|
||||
|
||||
QFile &file;
|
||||
MapData *data;
|
||||
const RectC ▭
|
||||
int zoom;
|
||||
@ -106,11 +102,9 @@ private:
|
||||
};
|
||||
|
||||
struct PointCTX {
|
||||
PointCTX(QFile &file, MapData *data, const RectC &rect, int zoom,
|
||||
QList<Point> *list)
|
||||
: file(file), data(data), rect(rect), zoom(zoom), list(list) {}
|
||||
PointCTX(MapData *data, const RectC &rect, int zoom, QList<Point> *list)
|
||||
: data(data), rect(rect), zoom(zoom), list(list) {}
|
||||
|
||||
QFile &file;
|
||||
MapData *data;
|
||||
const RectC ▭
|
||||
int zoom;
|
||||
@ -149,18 +143,16 @@ private:
|
||||
bool readTagInfo(SubFile &hdr, QVector<TagSource> &tags);
|
||||
bool readMapInfo(SubFile &hdr, QByteArray &projection, bool &debugMap);
|
||||
bool readHeader(QFile &file);
|
||||
bool readSubFiles(QFile &file);
|
||||
bool readSubFiles();
|
||||
void clearTiles();
|
||||
|
||||
int level(int zoom) const;
|
||||
void paths(QFile &file, VectorTile *tile, const RectC &rect, int zoom,
|
||||
void paths(const VectorTile *tile, const RectC &rect, int zoom,
|
||||
QList<Path> *list);
|
||||
void points(QFile &file, VectorTile *tile, const RectC &rect, int zoom,
|
||||
QList<Point> *list);
|
||||
bool readPaths(QFile &file, const VectorTile *tile, int zoom,
|
||||
QList<Path> *list);
|
||||
bool readPoints(QFile &file, const VectorTile *tile, int zoom,
|
||||
void points(const VectorTile *tile, const RectC &rect, int zoom,
|
||||
QList<Point> *list);
|
||||
bool readPaths(const VectorTile *tile, int zoom, QList<Path> *list);
|
||||
bool readPoints(const VectorTile *tile, int zoom, QList<Point> *list);
|
||||
|
||||
static bool readTags(SubFile &subfile, int count,
|
||||
const QVector<TagSource> &tags, QVector<Tag> &list);
|
||||
@ -169,7 +161,7 @@ private:
|
||||
|
||||
friend HASH_T qHash(const MapData::Key &key);
|
||||
|
||||
QString _fileName;
|
||||
QFile _pointFile, _pathFile;
|
||||
RectC _bounds;
|
||||
quint16 _tileSize;
|
||||
QVector<SubFileInfo> _subFiles;
|
||||
@ -179,7 +171,7 @@ private:
|
||||
|
||||
QCache<Key, QList<Path> > _pathCache;
|
||||
QCache<Key, QList<Point> > _pointCache;
|
||||
QMutex _pathCacheLock, _pointCacheLock;
|
||||
QMutex _pathLock, _pointLock;
|
||||
|
||||
bool _valid;
|
||||
QString _errorString;
|
||||
|
@ -408,10 +408,6 @@ void RasterTile::fetchData(QList<MapData::Path> &paths,
|
||||
QList<MapData::Point> &points) const
|
||||
{
|
||||
QPoint ttl(_rect.topLeft());
|
||||
QFile file(_data->fileName());
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Unbuffered))
|
||||
return;
|
||||
|
||||
QRectF pathRect(QPointF(ttl.x() - PATHS_EXTENT, ttl.y() - PATHS_EXTENT),
|
||||
QPointF(ttl.x() + _rect.width() + PATHS_EXTENT, ttl.y() + _rect.height()
|
||||
@ -423,15 +419,15 @@ void RasterTile::fetchData(QList<MapData::Path> &paths,
|
||||
_transform.img2proj(pathRect.bottomRight()));
|
||||
RectD searchRectD(_transform.img2proj(searchRect.topLeft()),
|
||||
_transform.img2proj(searchRect.bottomRight()));
|
||||
_data->paths(file, searchRectD.toRectC(_proj, 20),
|
||||
pathRectD.toRectC(_proj, 20), _zoom, &paths);
|
||||
_data->paths(searchRectD.toRectC(_proj, 20), pathRectD.toRectC(_proj, 20),
|
||||
_zoom, &paths);
|
||||
|
||||
QRectF pointRect(QPointF(ttl.x() - TEXT_EXTENT, ttl.y() - TEXT_EXTENT),
|
||||
QPointF(ttl.x() + _rect.width() + TEXT_EXTENT, ttl.y() + _rect.height()
|
||||
+ TEXT_EXTENT));
|
||||
RectD pointRectD(_transform.img2proj(pointRect.topLeft()),
|
||||
_transform.img2proj(pointRect.bottomRight()));
|
||||
_data->points(file, pointRectD.toRectC(_proj, 20), _zoom, &points);
|
||||
_data->points(pointRectD.toRectC(_proj, 20), _zoom, &points);
|
||||
}
|
||||
|
||||
MatrixD RasterTile::elevation(int extend) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user