Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Marble
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
Marble
Commits
06658a44
Commit
06658a44
authored
Jul 03, 2016
by
Dennis Nienhüser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce memory consumption a bit
parent
b4dd2682
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
12 deletions
+14
-12
src/lib/marble/geodata/data/GeoDataCoordinates.cpp
src/lib/marble/geodata/data/GeoDataCoordinates.cpp
+3
-3
src/lib/marble/geodata/data/GeoDataCoordinates.h
src/lib/marble/geodata/data/GeoDataCoordinates.h
+2
-2
src/lib/marble/geodata/data/GeoDataCoordinates_p.h
src/lib/marble/geodata/data/GeoDataCoordinates_p.h
+1
-1
src/lib/marble/geodata/data/GeoDataLineString.cpp
src/lib/marble/geodata/data/GeoDataLineString.cpp
+4
-4
src/lib/marble/geodata/data/GeoDataLineString_p.h
src/lib/marble/geodata/data/GeoDataLineString_p.h
+4
-2
No files found.
src/lib/marble/geodata/data/GeoDataCoordinates.cpp
View file @
06658a44
...
@@ -1285,15 +1285,15 @@ qreal GeoDataCoordinates::utmNorthing() const{
...
@@ -1285,15 +1285,15 @@ qreal GeoDataCoordinates::utmNorthing() const{
return
GeoDataCoordinatesPrivate
::
lonLatToNorthing
(
d
->
m_lon
,
d
->
m_lat
);
return
GeoDataCoordinatesPrivate
::
lonLatToNorthing
(
d
->
m_lon
,
d
->
m_lat
);
}
}
int
GeoDataCoordinates
::
detail
()
const
quint8
GeoDataCoordinates
::
detail
()
const
{
{
return
d
->
m_detail
;
return
d
->
m_detail
;
}
}
void
GeoDataCoordinates
::
setDetail
(
const
int
det
)
void
GeoDataCoordinates
::
setDetail
(
quint8
detail
)
{
{
detach
();
detach
();
d
->
m_detail
=
det
;
d
->
m_detail
=
det
ail
;
}
}
GeoDataCoordinates
GeoDataCoordinates
::
rotateAround
(
const
GeoDataCoordinates
&
axis
,
qreal
angle
,
Unit
unit
)
const
GeoDataCoordinates
GeoDataCoordinates
::
rotateAround
(
const
GeoDataCoordinates
&
axis
,
qreal
angle
,
Unit
unit
)
const
...
...
src/lib/marble/geodata/data/GeoDataCoordinates.h
View file @
06658a44
...
@@ -255,13 +255,13 @@ class GEODATA_EXPORT GeoDataCoordinates
...
@@ -255,13 +255,13 @@ class GEODATA_EXPORT GeoDataCoordinates
* @brief return the detail flag
* @brief return the detail flag
* detail range: 0 for most important points, 5 for least important
* detail range: 0 for most important points, 5 for least important
*/
*/
int
detail
()
const
;
quint8
detail
()
const
;
/**
/**
* @brief set the detail flag
* @brief set the detail flag
* @param det detail
* @param det detail
*/
*/
void
setDetail
(
const
int
detail
);
void
setDetail
(
quint8
detail
);
/**
/**
* @brief Rotates one coordinate around another.
* @brief Rotates one coordinate around another.
...
...
src/lib/marble/geodata/data/GeoDataCoordinates_p.h
View file @
06658a44
...
@@ -206,7 +206,7 @@ class GeoDataCoordinatesPrivate
...
@@ -206,7 +206,7 @@ class GeoDataCoordinatesPrivate
qreal
m_lon
;
qreal
m_lon
;
qreal
m_lat
;
qreal
m_lat
;
qreal
m_altitude
;
// in meters above sea level
qreal
m_altitude
;
// in meters above sea level
int
m_detail
;
quint8
m_detail
;
QAtomicInt
ref
;
QAtomicInt
ref
;
/* UTM Ellipsoid model constants (actual values here are for WGS84) */
/* UTM Ellipsoid model constants (actual values here are for WGS84) */
...
...
src/lib/marble/geodata/data/GeoDataLineString.cpp
View file @
06658a44
...
@@ -132,7 +132,7 @@ GeoDataCoordinates GeoDataLineStringPrivate::findDateLine( const GeoDataCoordina
...
@@ -132,7 +132,7 @@ GeoDataCoordinates GeoDataLineStringPrivate::findDateLine( const GeoDataCoordina
return
findDateLine
(
previousCoords
,
interpolatedCoords
,
recursionCounter
);
return
findDateLine
(
previousCoords
,
interpolatedCoords
,
recursionCounter
);
}
}
int
GeoDataLineStringPrivate
::
levelForResolution
(
qreal
resolution
)
const
{
quint8
GeoDataLineStringPrivate
::
levelForResolution
(
qreal
resolution
)
const
{
if
(
m_previousResolution
==
resolution
)
return
m_level
;
if
(
m_previousResolution
==
resolution
)
return
m_level
;
m_previousResolution
=
resolution
;
m_previousResolution
=
resolution
;
...
@@ -227,10 +227,10 @@ void GeoDataLineStringPrivate::optimize (GeoDataLineString& lineString) const
...
@@ -227,10 +227,10 @@ void GeoDataLineStringPrivate::optimize (GeoDataLineString& lineString) const
if
(
lineString
.
size
()
<
2
)
return
;
if
(
lineString
.
size
()
<
2
)
return
;
// Calculate the least non-zero detail-level by checking the bounding box
// Calculate the least non-zero detail-level by checking the bounding box
int
startLevel
=
levelForResolution
(
(
lineString
.
latLonAltBox
().
width
()
+
lineString
.
latLonAltBox
().
height
()
)
/
2
);
quint8
startLevel
=
levelForResolution
(
(
lineString
.
latLonAltBox
().
width
()
+
lineString
.
latLonAltBox
().
height
()
)
/
2
);
int
currentLevel
=
startLevel
;
quint8
currentLevel
=
startLevel
;
int
maxLevel
=
startLevel
;
quint8
maxLevel
=
startLevel
;
GeoDataCoordinates
currentCoords
;
GeoDataCoordinates
currentCoords
;
lineString
.
first
().
setDetail
(
startLevel
);
lineString
.
first
().
setDetail
(
startLevel
);
...
...
src/lib/marble/geodata/data/GeoDataLineString_p.h
View file @
06658a44
...
@@ -87,7 +87,7 @@ class GeoDataLineStringPrivate : public GeoDataGeometryPrivate
...
@@ -87,7 +87,7 @@ class GeoDataLineStringPrivate : public GeoDataGeometryPrivate
const
GeoDataCoordinates
&
currentCoords
,
const
GeoDataCoordinates
&
currentCoords
,
int
recursionCounter
)
const
;
int
recursionCounter
)
const
;
int
levelForResolution
(
qreal
resolution
)
const
;
quint8
levelForResolution
(
qreal
resolution
)
const
;
qreal
resolutionForLevel
(
int
level
)
const
;
qreal
resolutionForLevel
(
int
level
)
const
;
void
optimize
(
GeoDataLineString
&
lineString
)
const
;
void
optimize
(
GeoDataLineString
&
lineString
)
const
;
...
@@ -101,7 +101,9 @@ class GeoDataLineStringPrivate : public GeoDataGeometryPrivate
...
@@ -101,7 +101,9 @@ class GeoDataLineStringPrivate : public GeoDataGeometryPrivate
// been calculated. Saves performance.
// been calculated. Saves performance.
TessellationFlags
m_tessellationFlags
;
TessellationFlags
m_tessellationFlags
;
mutable
qreal
m_previousResolution
;
mutable
qreal
m_previousResolution
;
mutable
qreal
m_level
;};
mutable
quint8
m_level
;
};
}
// namespace Marble
}
// namespace Marble
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment