mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-24 07:34:22 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
cd44f350e1 | |||
90534c991c | |||
071b16f76d | |||
6d450023b0 | |||
890985bacd | |||
496065b549 |
@ -1,4 +1,4 @@
|
||||
version: 13.30.{build}
|
||||
version: 13.31.{build}
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
@ -466,6 +466,9 @@
|
||||
<line stroke="#ffffff" stroke-width="0.4608" stroke-dasharray="2,2" stroke-linecap="butt" scale="all"/>
|
||||
</rule>
|
||||
</rule>
|
||||
<rule e="way" k="railway" v="narrow_gauge|light_rail|funicular" zoom-min="15">
|
||||
<line stroke="#414141" stroke-width="0.2" stroke-linecap="butt"/>
|
||||
</rule>
|
||||
<rule e="way" k="railway" v="tram" zoom-min="15">
|
||||
<line stroke="#717171" stroke-width="0.2" stroke-linecap="butt"/>
|
||||
</rule>
|
||||
@ -485,6 +488,9 @@
|
||||
<line stroke="#878787" stroke-width="0.4144" stroke-linecap="butt" stroke-dasharray="2,1" scale="all"/>
|
||||
</rule>
|
||||
</rule>
|
||||
<rule e="way" k="railway" v="narrow_gauge|light_rail|funicular" zoom-min="15">
|
||||
<line stroke="#414141" stroke-width="0.2" stroke-linecap="butt" stroke-dasharray="12,4"/>
|
||||
</rule>
|
||||
<rule e="way" k="railway" v="tram" zoom-min="15">
|
||||
<line stroke="#717171" stroke-width="0.2" stroke-linecap="butt" stroke-dasharray="12,4"/>
|
||||
</rule>
|
||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 13.30
|
||||
VERSION = 13.31
|
||||
|
||||
|
||||
QT += core \
|
||||
|
@ -37,7 +37,7 @@ Unicode true
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "13.30"
|
||||
!define VERSION "13.31"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
|
@ -19,26 +19,6 @@ using namespace Mapsforge;
|
||||
#define KEY_REF "ref"
|
||||
#define KEY_ELE "ele"
|
||||
|
||||
|
||||
static Coordinates centroid(const Polygon &polygon)
|
||||
{
|
||||
double area = 0;
|
||||
double cx = 0, cy = 0;
|
||||
const QVector<Coordinates> &v = polygon.first();
|
||||
|
||||
for (int i = 0; i < v.count(); i++) {
|
||||
int j = (i == v.count() - 1) ? 0 : i + 1;
|
||||
double f = (v.at(i).lon() * v.at(j).lat() - v.at(j).lon() * v.at(i).lat());
|
||||
area += f;
|
||||
cx += (v.at(i).lon() + v.at(j).lon()) * f;
|
||||
cy += (v.at(i).lat() + v.at(j).lat()) * f;
|
||||
}
|
||||
|
||||
double factor = 1.0 / (3.0 * area);
|
||||
|
||||
return Coordinates(cx * factor, cy * factor);
|
||||
}
|
||||
|
||||
static void copyPaths(const RectC &rect, const QList<MapData::Path> *src,
|
||||
QList<MapData::Path> *dst)
|
||||
{
|
||||
@ -710,7 +690,7 @@ bool MapData::readPaths(const VectorTile *tile, int zoom, QList<Path> *list)
|
||||
p.point.coordinates = Coordinates(outline.first().lon() + MD(lon),
|
||||
outline.first().lat() + MD(lat));
|
||||
else if (p.closed)
|
||||
p.point.coordinates = centroid(p.poly);
|
||||
p.point.coordinates = p.poly.boundingRect().center();
|
||||
|
||||
list->append(p);
|
||||
}
|
||||
@ -796,7 +776,7 @@ QDebug operator<<(QDebug dbg, const Mapsforge::MapData::Tag &tag)
|
||||
QDebug operator<<(QDebug dbg, const MapData::Path &path)
|
||||
{
|
||||
dbg.nospace() << "Path(" << path.poly.boundingRect() << ", "
|
||||
<< path.tags << ")";
|
||||
<< path.point.tags << ")";
|
||||
return dbg.space();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user