提交 876c43bc 编写于 作者: A archosm

Extend max level to 20 from 18.

For morden osm server, Tile level has been extended to 20 from 18.
上级 7df42aec
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>640</width> <width>640</width>
<height>481</height> <height>483</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="maximum"> <property name="maximum">
<number>18</number> <number>20</number>
</property> </property>
<property name="pageStep"> <property name="pageStep">
<number>4</number> <number>4</number>
...@@ -480,8 +480,6 @@ ...@@ -480,8 +480,6 @@
</customwidgets> </customwidgets>
<resources> <resources>
<include location="resource/resource.qrc"/> <include location="resource/resource.qrc"/>
<include location="resource/resource.qrc"/>
<include location="resource/resource.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>
......
...@@ -192,8 +192,8 @@ namespace QTVOSM{ ...@@ -192,8 +192,8 @@ namespace QTVOSM{
if (event->delta()<0) if (event->delta()<0)
{ {
nLevel++; nLevel++;
if (nLevel>18) if (nLevel>20)
nLevel=18; nLevel=20;
} }
else if (event->delta()>0) else if (event->delta()>0)
{ {
...@@ -337,7 +337,7 @@ namespace QTVOSM{ ...@@ -337,7 +337,7 @@ namespace QTVOSM{
\fn layer_tiles::RegImages \fn layer_tiles::RegImages
\param nX col (x) tile id og this level nLevel \param nX col (x) tile id og this level nLevel
\param nY row (y) tile id og this level nLevel \param nY row (y) tile id og this level nLevel
\param nLevel current level. In osm, nlevel often take 0~18 \param nLevel current level. In osm, nlevel often take 0~20
\return bool succeeded. \return bool succeeded.
*/ */
bool layer_tiles::RegImages(int nX, int nY,int nLevel) bool layer_tiles::RegImages(int nX, int nY,int nLevel)
......
...@@ -750,7 +750,7 @@ namespace QTVOSM{ ...@@ -750,7 +750,7 @@ namespace QTVOSM{
/*! /*!
\brief convert Mercator to World. World Points is according to current level, \brief convert Mercator to World. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_MK2World \fn tilesviewer::CV_MK2World
...@@ -779,7 +779,7 @@ namespace QTVOSM{ ...@@ -779,7 +779,7 @@ namespace QTVOSM{
/*! /*!
\brief convert World to Mercator. World Points is according to current level, \brief convert World to Mercator. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2MK \fn tilesviewer::CV_World2MK
...@@ -807,7 +807,7 @@ namespace QTVOSM{ ...@@ -807,7 +807,7 @@ namespace QTVOSM{
/*! /*!
\brief convert LLA to world. World Points is according to current level, \brief convert LLA to world. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_LLA2World \fn tilesviewer::CV_LLA2World
...@@ -838,7 +838,7 @@ namespace QTVOSM{ ...@@ -838,7 +838,7 @@ namespace QTVOSM{
/*! /*!
\brief convert world to LLA. World Points is according to current level, \brief convert world to LLA. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2LLA \fn tilesviewer::CV_World2LLA
...@@ -870,7 +870,7 @@ namespace QTVOSM{ ...@@ -870,7 +870,7 @@ namespace QTVOSM{
\brief convert Device Points to World. Device Points is according to current viewport, \brief convert Device Points to World. Device Points is according to current viewport,
point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right, to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_DP2World \fn tilesviewer::CV_DP2World
...@@ -902,7 +902,7 @@ namespace QTVOSM{ ...@@ -902,7 +902,7 @@ namespace QTVOSM{
\brief convert World to Device Points. Device Points is according to current viewport, \brief convert World to Device Points. Device Points is according to current viewport,
point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right, to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18 the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED! This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2DP \fn tilesviewer::CV_World2DP
...@@ -935,7 +935,7 @@ namespace QTVOSM{ ...@@ -935,7 +935,7 @@ namespace QTVOSM{
/*! /*!
\brief convert percentage coord to world. World Points is according \brief convert percentage coord to world. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right, to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18. Percentage coord is a the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20. Percentage coord is a
level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5 level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5
at top-left, 0.5,0.5 at bottom-right at top-left, 0.5,0.5 at bottom-right
This approach is LEVEL RELATED! This approach is LEVEL RELATED!
...@@ -962,7 +962,7 @@ namespace QTVOSM{ ...@@ -962,7 +962,7 @@ namespace QTVOSM{
/*! /*!
\brief convert world to percentage coord. World Points is according \brief convert world to percentage coord. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right, to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18. Percentage coord is a the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20. Percentage coord is a
level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5 level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5
at top-left, 0.5,0.5 at bottom-right at top-left, 0.5,0.5 at bottom-right
This approach is LEVEL RELATED! This approach is LEVEL RELATED!
......
...@@ -42,7 +42,7 @@ namespace QTVOSM{ ...@@ -42,7 +42,7 @@ namespace QTVOSM{
//Center Lat,Lon //Center Lat,Lon
double m_dCenterX; //percentage, -0.5~0.5 double m_dCenterX; //percentage, -0.5~0.5
double m_dCenterY; //percentage, -0.5~0.5 double m_dCenterY; //percentage, -0.5~0.5
int m_nLevel; //0-18 int m_nLevel; //0-20
//layers //layers
QList < layer_interface * > m_listLayers; QList < layer_interface * > m_listLayers;
QSet < layer_interface * > m_setLayers; QSet < layer_interface * > m_setLayers;
......
...@@ -23,10 +23,11 @@ namespace QTVOSM{ ...@@ -23,10 +23,11 @@ namespace QTVOSM{
* 2.LLA, latitude, longitude and altitude * 2.LLA, latitude, longitude and altitude
* *
* 3.World Coordinate: uint:Pixel. * 3.World Coordinate: uint:Pixel.
* Map system have different zoom level, from 0 to 18. * Map system have different zoom level, from 0 to 20.
* At level 0, the Mercator Square is mapped onto a 256x256 tile. * At level 0, the Mercator Square is mapped onto a 256x256 tile.
* At level 1, the Mercator Square is mapped onto a 512x512 tile. * At level 1, the Mercator Square is mapped onto a 512x512 tile.
* At level 18,the Mercator Square is mapped onto a 67108864 x 67108864 tile. (size is 256 * 2 ^18) * At level 18,the Mercator Square is mapped onto a 67108864 x 67108864 tile. (size is 256 * 2 ^18)
* At level 20,the Mercator Square is mapped onto a 268435456 x 268435456 tile. (size is 256 * 2 ^20)
* the coord direction of .World Coordinate is some different from Mercator projection. * the coord direction of .World Coordinate is some different from Mercator projection.
* top-left is 0,0, right-bottom is 256 * 2 ^level-1,256 * 2 ^level-1 * top-left is 0,0, right-bottom is 256 * 2 ^level-1,256 * 2 ^level-1
* *
......
...@@ -13,7 +13,7 @@ namespace QTVP_GEOMARKER{ ...@@ -13,7 +13,7 @@ namespace QTVP_GEOMARKER{
* *
* The scene uses World Pixel Coordinate system, which has a commection between zoom level. * The scene uses World Pixel Coordinate system, which has a commection between zoom level.
* You can learn more principle about coordinates in the comments of class viewer_interface. in zoom level 0, * You can learn more principle about coordinates in the comments of class viewer_interface. in zoom level 0,
* world pixel size is 256x256, level 1 is 512x512, level 18 is 67108864 x 67108864 * world pixel size is 256x256, level 1 is 512x512, level 18 is 67108864 x 67108864,level 20 will be 268435456 x 268435456.
* Since the scene coord will be zoomed in / out together with level change, all graphics items' coords should * Since the scene coord will be zoomed in / out together with level change, all graphics items' coords should
* be recalculated in time. the method adjust_item_coords will do this automatically, * be recalculated in time. the method adjust_item_coords will do this automatically,
* and in this function, virtual function geoItemBase::adjust_coords will be called sequentially. * and in this function, virtual function geoItemBase::adjust_coords will be called sequentially.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册