1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-24 07:34:22 +02:00

Compare commits

..

6 Commits
13.30 ... 13.31

Author SHA1 Message Date
cd44f350e1 Split light rails from trams 2024-11-22 08:12:05 +01:00
90534c991c Added missing rails 2024-11-22 07:52:52 +01:00
071b16f76d Use the boundingbox center instead of the centroid like Mapsforge does 2024-11-21 19:05:08 +01:00
6d450023b0 Centroid computation cleanup 2024-11-21 17:52:54 +01:00
890985bacd Fixed debug builds 2024-11-21 10:59:32 +01:00
496065b549 Version++ 2024-11-21 10:58:00 +01:00
5 changed files with 11 additions and 25 deletions

View File

@ -1,4 +1,4 @@
version: 13.30.{build}
version: 13.31.{build}
configuration:
- Release

View File

@ -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>

View File

@ -3,7 +3,7 @@ unix:!macx:!android {
} else {
TARGET = GPXSee
}
VERSION = 13.30
VERSION = 13.31
QT += core \

View File

@ -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"

View File

@ -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();
}