Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Maplat - Map technology explanation, for implem...

Maplat - Map technology explanation, for implementation based on Map API other than OpenLayers/maplat-coordinates

How to transform coordinate systems in Maplat

Code for History

September 12, 2021
Tweet

More Decks by Code for History

Other Decks in Technology

Transcript

  1. - Map technology explanation, for implementation based on Map API

    other than OpenLayers Kohei Otsuka – Code for History 1
  2. List of terms for understanding Maplat principles (coordinates) Terms Meaning

    Accurate map Inaccurate map merc EPSG:3857 (Web Mercator) EPSG:3857 EPSG:3857 xy XY in each coordinate system EPSG:3857 XY starting point at the top left of the image (pixel coordinates when not scaled) sysCoord Convenience coordinates for processing with the map API (coordinates used to set up marker pins in the original map API) For OpenLayers, EPSG:3857 For OpenLayers, EPSG:3857 for convenience (not related to actual geographic coordinates) 3 Quote from https://github.com/code4history/MaplatCore/issues/19
  3. List of terms for understanding Maplat principles (area) Terms Meaning

    Note size Display range in pixel width, height radius Display range radius in sysCoord definition Calculated based on a circle half the size of the size, not the full ”size” range viewPoint Center point + zoom + rotate in sysCoord definition sysCoord s 5 points in sysCoord definition (center, top, bottom, left, right) xys 5 points in xy definition mercs 5 points in merc definition 4 Quote from https://github.com/code4history/MaplatCore/issues/19
  4. Maplat map switching principle 5 Map coordinates A Map coordinates

    B Get center, zoom, rotate viewPoint2SysCoords SysCoords xys mercs Set center, zoom, rotate SysCoords xys sysCoords2Xys xys2Mercs sysCoords2ViewPoint xys2SysCoords mercs2Xys
  5. How to use several Maplat libraries (1) 6 Get center,

    zoom, rotate SysCoords xys mercs Set center, zoom, rotate SysCoords xys sysCoords2Xys xys2Mercs xys2SysCoords mercs2Xys MaplatCore Internally used MaplatTin 5 times Internally used MaplatTin 5 times Map coordinates A Map coordinates B viewPoint2SysCoords sysCoords2ViewPoint
  6. Maplat MaplatCore 7 Foreground map OpenLayers Background map OpenLayers Map

    display control Coordinates transformation UI How to use several Maplat libraries (2)
  7. Maplat MaplatCore MaplatSwitch 8 UI Make this process independent as

    MaplatSwitch in the future How to use several Maplat libraries (3) Foreground map OpenLayers Background map OpenLayers Map display control Coordinates transformation
  8. How to realize Maplat 9 Overlay Switch ※ If you

    want to use OpenLayers as a map API, it is already implemented in Maplat/MaplatCore, and you can optionally switch between Overlay/Switch, so assume that you want to use other map APIs. Foreground map Map API Background map Map API Map API MaplatCore or MaplatSwitch Realtime control MaplatCore or MaplatSwitch Coordinates transformation Switch displaying map
  9. Maplat原理理解の用語一覧 (座標) 呼称 意味 正確な地図 不正確な地図 merc EPSG:3857 (Webメルカ トル)

    EPSG:3857 EPSG:3857 xy 各座標系でのXY EPSG:3857 画像左上起点XY (非縮小時 のピクセル座標) sysCoord 地図APIで処理するための 便宜的座標 (オリジナルの 地図APIでマーカーピンを 立てたりする際に使う座 標) OpenLayersの場合は EPSG:3857 OpenLayersの場合は、 便宜的なEPSG:3857 (実際 の地理座標とは無関係) 11 Quote from https://github.com/code4history/MaplatCore/issues/19
  10. Maplat原理理解の用語一覧 (領域) 呼称 意味 備考 size pixelでの表示範囲 width, height radius

    sysCoord定義での表示範囲半径 sizeの範囲いっぱいいっぱいではな く、半分の大きさの円を元に算出 viewPoint sysCoord定義での中心点+zoom+rotate sysCoord s sysCoord定義での中心点+上下左右4点の5 点 xys xy定義での中心点+上下左右4点の5点 mercs merc定義での中心点+上下左右4点の5点 12 Quote from https://github.com/code4history/MaplatCore/issues/19
  11. Maplat地図切り替えの原理 13 地図座標系A 地図座標系B center, zoom, rotate 取得 viewPoint2SysCoords SysCoords

    xys mercs center, zoom, rotate 設定 SysCoords xys sysCoords2Xys xys2Mercs sysCoords2ViewPoint xys2SysCoords mercs2Xys
  12. Maplatライブラリ使い分け (1) 14 地図座標系A 地図座標系B center, zoom, rotate 取得 viewPoint2SysCoords

    SysCoords xys mercs center, zoom, rotate 設定 SysCoords xys sysCoords2Xys xys2Mercs sysCoords2ViewPoint xys2SysCoords mercs2Xys MaplatCore 内部的にMaplatTin を5回利用 内部的にMaplatTin を5回利用
  13. Maplat MaplatCore MaplatSwitch Maplatライブラリ使い分け (3) 16 前景地図 OpenLayers 背景地図 OpenLayers

    地図表示制御 座標系変換処理 UI 将来的にこの部分をMaplatSwitch として分割予定