mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Compare commits
No commits in common. "14afa87f5b30c2564d477997b5c71f6a18752179" and "d4f48f71bb9d8373d942b8f8f5ac47da044d074f" have entirely different histories.
14afa87f5b
...
d4f48f71bb
@ -153,7 +153,7 @@
|
|||||||
<!-- City areas -->
|
<!-- City areas -->
|
||||||
<rule e="way" closed="yes" k="landuse" v="cemetery">
|
<rule e="way" closed="yes" k="landuse" v="cemetery">
|
||||||
<area src=":/patterns/cemetery.svg" symbol-width="30" symbol-height="28"/>
|
<area src=":/patterns/cemetery.svg" symbol-width="30" symbol-height="28"/>
|
||||||
<rule e="way" k="*" v="*" zoom-min="15">
|
<rule e="way" k="*" v="*" zoom-max="19">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -185,12 +185,14 @@
|
|||||||
<!-- Area overlays -->
|
<!-- Area overlays -->
|
||||||
<rule e="way" k="landuse" v="military" zoom-min="10">
|
<rule e="way" k="landuse" v="military" zoom-min="10">
|
||||||
<area src=":/patterns/military-area.svg" symbol-height="32"/>
|
<area src=":/patterns/military-area.svg" symbol-height="32"/>
|
||||||
|
<rule e="way" k="military" v="range|base|airfield|training_area" zoom-max="16">
|
||||||
<caption fill="#ff4040" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
<caption fill="#ff4040" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="boundary" v="protected_area|national_park" zoom-min="10" zoom-max="14">
|
</rule>
|
||||||
|
<rule e="way" k="boundary" v="protected_area|national_park" zoom-min="10">
|
||||||
<rule e="way" k="protect_class" v="pr_2">
|
<rule e="way" k="protect_class" v="pr_2">
|
||||||
<area src=":/patterns/nature-reserve.svg" symbol-height="32"/>
|
<area src=":/patterns/nature-reserve.svg" symbol-height="32"/>
|
||||||
<rule e="way" k="*" v="*" zoom-max="12">
|
<rule e="way" k="*" v="*" zoom-max="16">
|
||||||
<caption fill="#9ac269" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
<caption fill="#9ac269" font-size="10" font-style="italic" text-transform="uppercase" k="name" stroke="#ffffff" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -202,16 +204,12 @@
|
|||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="building" v="civic">
|
<rule e="way" k="building" v="civic">
|
||||||
<area fill="#cfc4b3" stroke="#cdccc4" stroke-width="0.1"/>
|
<area fill="#cfc4b3" stroke="#cdccc4" stroke-width="0.1"/>
|
||||||
<rule e="way" k="*" v="*" zoom-min="16">
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" priority="-10"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="building" v="cathedral|church|basilica">
|
<rule e="way" k="building" v="cathedral|church|basilica">
|
||||||
<area fill="#a19d96" stroke="#cdccc4" stroke-width="0.1"/>
|
<area fill="#a19d96" stroke="#cdccc4" stroke-width="0.1"/>
|
||||||
<rule e="way" k="*" v="*" zoom-min="16">
|
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
|
||||||
|
|
||||||
<rule e="any" k="addr:housenumber" v="*" zoom-min="19">
|
<rule e="any" k="addr:housenumber" v="*" zoom-min="19">
|
||||||
<caption fill="#aaaaaa" font-size="9" k="addr:housenumber" priority="-100"/>
|
<caption fill="#aaaaaa" font-size="9" k="addr:housenumber" priority="-100"/>
|
||||||
@ -287,23 +285,13 @@
|
|||||||
<!-- Roads & tracks -->
|
<!-- Roads & tracks -->
|
||||||
<rule e="way" k="highway" v="footway|path" zoom-min="16">
|
<rule e="way" k="highway" v="footway|path" zoom-min="16">
|
||||||
<rule e="way" k="area" v="~|no">
|
<rule e="way" k="area" v="~|no">
|
||||||
<rule e="way" k="tunnel" v="~|no">
|
|
||||||
<line stroke="#aba083" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
<line stroke="#aba083" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="tunnel" v="yes|true">
|
|
||||||
<line stroke="#eeeeee" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="highway" v="steps" zoom-min="16">
|
<rule e="way" k="highway" v="steps" zoom-min="16">
|
||||||
<rule e="way" k="area" v="~|no">
|
<rule e="way" k="area" v="~|no">
|
||||||
<rule e="way" k="tunnel" v="~|no">
|
|
||||||
<line stroke="#38352b" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
<line stroke="#38352b" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" k="tunnel" v="yes|true">
|
|
||||||
<line stroke="#eeeeee" stroke-dasharray="2,1" stroke-linecap="butt" stroke-width="0.2"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<rule e="way" k="highway" v="track">
|
<rule e="way" k="highway" v="track">
|
||||||
@ -524,13 +512,10 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- Town & vilage names -->
|
<!-- Town & vilage names -->
|
||||||
<rule e="node" k="place" v="locality" zoom-min="14">
|
<rule e="node" k="place" v="locality" zoom-min="12">
|
||||||
<caption fill="#000000" font-size="10" k="name" priority="10" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="10" k="name" priority="10" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="place" v="hamlet" zoom-min="12">
|
<rule e="node" k="place" v="village|hamlet" zoom-min="11">
|
||||||
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
|
||||||
</rule>
|
|
||||||
<rule e="node" k="place" v="village" zoom-min="11">
|
|
||||||
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
<caption fill="#000000" font-size="12" k="name" priority="20" stroke="#FFFFFF" stroke-width="1"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="place" v="town" zoom-min="9">
|
<rule e="node" k="place" v="town" zoom-min="9">
|
||||||
@ -584,10 +569,10 @@
|
|||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
<!-- City POIs -->
|
<!-- City POIs -->
|
||||||
<rule e="any" k="amenity|building" v="hospital" zoom-min="15">
|
<rule e="any" k="amenity|building" v="hospital" zoom-min="14">
|
||||||
<rule e="any" k="name" v="*">
|
<rule e="any" k="name" v="*">
|
||||||
<symbol id="hospital" src=":/POI/hospital-11.svg" symbol-width="11" priority="20"/>
|
<symbol id="hospital" src=":/POI/hospital-11.svg" symbol-width="11" priority="20"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="16">
|
<rule e="any" k="*" v="*" zoom-min="15">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="hospital"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="hospital"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
@ -596,22 +581,18 @@
|
|||||||
<symbol id="doctor" src=":/POI/doctor-11.svg" symbol-width="11"/>
|
<symbol id="doctor" src=":/POI/doctor-11.svg" symbol-width="11"/>
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="doctor"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="doctor"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="police" zoom-min="15">
|
<rule e="any" k="amenity|building" v="police" zoom-min="14">
|
||||||
<symbol id="police" src=":/POI/police-11.svg" symbol-width="11" priority="19"/>
|
<symbol id="police" src=":/POI/police-11.svg" symbol-width="11" priority="19"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="police"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="police"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="fire_station" zoom-min="15">
|
<rule e="any" k="amenity|building" v="fire_station" zoom-min="14">
|
||||||
<symbol id="fire-station" src=":/POI/fire-station-11.svg" symbol-width="11" priority="18"/>
|
<symbol id="fire-station" src=":/POI/fire-station-11.svg" symbol-width="11" priority="18"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="fire-station"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="fire-station"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="barrier" v="border_control|checkpoint" zoom-min="15">
|
|
||||||
<symbol id="checkpoint" src=":/POI/entrance-alt1-11.svg" symbol-width="11" priority="20"/>
|
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="checkpoint"/>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<rule e="any" k="aeroway" v="helipad" zoom-min="14">
|
<rule e="any" k="aeroway" v="helipad" zoom-min="14">
|
||||||
<symbol id="heliport" src=":/POI/heliport-11.svg" symbol-width="11"/>
|
<symbol id="heliport" src=":/POI/heliport-11.svg" symbol-width="11"/>
|
||||||
@ -717,7 +698,7 @@
|
|||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity|building" v="library" zoom-min="16">
|
<rule e="any" k="amenity|building" v="library" zoom-min="16">
|
||||||
<symbol id="library" src=":/POI/library-11.svg" symbol-width="11"/>
|
<symbol id="library" src=":/POI/lbrary-11.svg" symbol-width="11"/>
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
<rule e="any" k="*" v="*" zoom-min="17">
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="library"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="library"/>
|
||||||
</rule>
|
</rule>
|
||||||
@ -755,18 +736,6 @@
|
|||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="castle"/>
|
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="castle"/>
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="any" k="amenity" v="townhall" zoom-min="16">
|
|
||||||
<symbol id="townhall" src=":/POI/town-hall-11.svg" symbol-width="11"/>
|
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="townhall"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
|
||||||
<rule e="any" k="amenity" v="school|university" zoom-min="16">
|
|
||||||
<symbol id="school" src=":/POI/school-11.svg" symbol-width="11"/>
|
|
||||||
<rule e="any" k="*" v="*" zoom-min="17">
|
|
||||||
<caption fill="#000000" font-size="10" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="1" symbol-id="school"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
|
||||||
|
|
||||||
<rule e="any" k="sport" v="swimming" zoom-min="16">
|
<rule e="any" k="sport" v="swimming" zoom-min="16">
|
||||||
<symbol id="swimming" src=":/POI/swimming-11.svg" symbol-width="11"/>
|
<symbol id="swimming" src=":/POI/swimming-11.svg" symbol-width="11"/>
|
||||||
|
@ -697,12 +697,11 @@ bool MapData::readPoints(const VectorTile *tile, int zoom, QList<Point> *list)
|
|||||||
|
|
||||||
for (unsigned i = 0; i < points[zoom - info.min]; i++) {
|
for (unsigned i = 0; i < points[zoom - info.min]; i++) {
|
||||||
qint32 lat, lon;
|
qint32 lat, lon;
|
||||||
Point p(subfile.pos());
|
|
||||||
|
|
||||||
if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
|
if (!(subfile.readVInt32(lat) && subfile.readVInt32(lon)))
|
||||||
return false;
|
return false;
|
||||||
p.coordinates = Coordinates(tile->pos.lon() + MD(lon),
|
Point p(Coordinates(tile->pos.lon() + MD(lon),
|
||||||
tile->pos.lat() + MD(lat));
|
tile->pos.lat() + MD(lat)));
|
||||||
|
|
||||||
if (!subfile.readByte(sb))
|
if (!subfile.readByte(sb))
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,7 +37,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Point {
|
struct Point {
|
||||||
Point(quint64 id) : id(id) {}
|
Point(const Coordinates &c) : id(qHash(c)), coordinates(c) {}
|
||||||
|
|
||||||
quint64 id;
|
quint64 id;
|
||||||
Coordinates coordinates;
|
Coordinates coordinates;
|
||||||
|
@ -161,6 +161,7 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
QList<const Style::TextRender*> labels(_style->areaLabels(_zoom));
|
QList<const Style::TextRender*> labels(_style->areaLabels(_zoom));
|
||||||
QList<const Style::Symbol*> symbols(_style->areaSymbols(_zoom));
|
QList<const Style::Symbol*> symbols(_style->areaSymbols(_zoom));
|
||||||
QList<PathText> items;
|
QList<PathText> items;
|
||||||
|
QSet<QByteArray> set;
|
||||||
|
|
||||||
for (int i = 0; i < paths.size(); i++) {
|
for (int i = 0; i < paths.size(); i++) {
|
||||||
const PainterPath &path = paths.at(i);
|
const PainterPath &path = paths.at(i);
|
||||||
@ -206,12 +207,17 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
|
|
||||||
QPointF pos = p.p->path->labelPos.isNull()
|
QPointF pos = p.p->path->labelPos.isNull()
|
||||||
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
||||||
|
if (p.ti && p.lbl && set.contains(*p.lbl))
|
||||||
|
continue;
|
||||||
|
|
||||||
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
||||||
hColor);
|
hColor);
|
||||||
if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect())
|
if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect())
|
||||||
&& !item->collides(textItems))
|
&& !item->collides(textItems)) {
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
else
|
if (p.ti && p.lbl)
|
||||||
|
set.insert(*p.lbl);
|
||||||
|
} else
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user