2016/12/23 SAS.PLANET 国土地理院のマップソースをゴニョってみた
Unfortunately this text is in Japanese only.[SAS.Planet でGARMIN BirdsEye JNXファイルを作ってみた] の記事のコメントで国土地理院のマップソースの うp request いただいたので、自分用にと適当に作成したものだったので見直してみました。
GISとは無縁だし、ロシア語のwiki見た結果ですので当てにはできませんが一応動作してるので。
動作検証は、この時点の最新 SAS.Planet Release.160707 です。
出典表示等、できる限りのことはやりましたが使用にあたっては全て使用者の責任にてよろしくです。
リンクの物置に入ってます。お約束の自己責任で!
ZIP(国土地理院) : (GISGPS/data/Kokudo.zip)
MD5hash :116203a5964b9aff209c64e1244f88e3
ZIP(Y!) : (GISGPS/data/Yahoo!Japan.zip)
MD5hash :ea3bcf7cfefb75041f58e180107e7bef
最新情報はコチラで → [GPS地図関連]
以下、SAS.GISのwikiとこの時点の最新安定版 SAS.Planet Release.160707 のhackより
展開ルートフォルダを "/" としてます。
/Maps/sas.maps の下に展開してください。
Kokudo
|
*--/Chiriin.zmp
|
*-- params.txt(必須)
*-- GetUrlScript.txt(必須)
*-- 18.bmp
*-- 24.bmp
*-- info.txt
拡張子 .zmp を持つフォルダに最低2つの定義ファイルが必要みたいです。
params.txt ... 地図の定義(必須)
GetUrlScript.txt ... 地図タイル取得URLの定義(必須)
18.bmp ... メニューのアイコン
24.bmp ... メニューのアイコン
info.txt ... 地図の情報
面白いのは GetUrlScript.txt の記述で、SAS.PLANETがDelphiで書かれている事で、Pascalで書ける事です。
テキストファイルですので適宜修正可能です。「Settings」 メニューの 「Map Settings」 でも"Settings"は項目変更・設定、"Listings"は表示可能です。
詳細は本家SASGISのwiki見て下さい。ロシア語を日本語翻訳したら???だったのですが、英語翻訳はだいぶマトモだったので、自動翻訳するなら英語がお勧めです。定義ファイルに関連する一部を転写しておきます。
Description custom card format zmp
For each map service program requires information about the parameters of the service. Description of these options is presented in a zip-archive with the extension .zmp a separate folder with postfix .zmp, which are stored in maps folder.
Archive / folder with the extension / postfix .zmp may contain the following files and folders:
- params.txt (required) - the parameters of the card;
- GetUrlScript.txt (required) - the script which is responsible for the formation of a reference to the map tile, and custom headers;
- info.txt - information on the map;
- graphics files, a link to which is available in the info.txt (eg, maps legend);
- EmptyTiles - directory containing the samples of tiles, which are not downloaded from a server (for example, a fully transparent tiles). In some cases, the server gives "Dummy" in a format different from the format of conventional tiles, for example, conventional tiles - jpg, and "Dummy» - png. SAS.Planeta also overwrites all made tiles in the format specified in the Ext option (see. Below). In such cases, the samples should be used as source files sent by the server, rather than taking it from the cache program.
- 18.bmp - file icons displayed in the menu (bmp, 18 × 18, the pix, background color RGB (255,0,255));
- 24.bmp - file icons displayed on the toolbar (bmp, 24 × 24, the pix, background color RGB (255,0,255)).
The latest version of the program instead of 18.bmp 24.bmp and you can use one file named 24.bmp. The contents of this file - an arbitrary size image as bmp, png, ico, and the other (with the extension bmp).
params.txt
File Options params.txt :
Section [PARAMS]
- asLayer - if equal to 1, the card is used as a layer laid over the main map.
- pNum - serial card number in the menu.
- The GUID - a unique identification card number (GUID generator can be found online, for example here ).
- ParentSubMenu - the name of the parent item menu for the card in Russian.
- ParentSubMenu_en - the name of the parent item menu for the card in English.
- ParentSubMenu_uk - the name of the parent item menu for the card in the Ukrainian language.
- it is possible to specify the hierarchical menu items by dividing the symbol "\" (eg ParentSubMenu = Google \ Planet)
- name - the name of the card in Russian.
- name_en - name card in English.
- name_uk - map name in the Ukrainian language.
- CacheType - cache type that will store the tiles of the card:
- 0 - default
- 1 - GoogleMV
- 2 - SAS.Planet
- 3 - EarthSlicer 1.95
- 4 - GlobalMapper Tiles (GMT)
- 41 of - GlobalMapper Aux
- 42 - GlobalMapper Bing
- 43 - Mobile Atlas Creator (MOBAC)
- 44 - OsmAnd + Tiles
- 45 - Tile Map Service (TMS)
- 5 - Google Earth
- 51 - GoogleEarth Terrain
- 6 - BerkeleyDB
- 61 - BerkeleyDB (Versioned)
- 7 - DBMS (database management system)
- 71 - SQLite3
- 8 - GeoCacher
- 9 - RAM (not written to disk)
- DefURLBase - unchangeable part of the address links to maps tiles.
- projection - a projection map. 1 - Mercator to spheroid, 2 - Mercator to ellipsoid, 3 - latitude / longitude.
- sradiusa - semi-major axis radius of an ellipsoid.
- sradiusb - radius at half-axis ellipsoid.
- The EPSG - the projection of the code card.
- NameInCache - folder name in the cache, which will be recorded tiles card.
- separator - a separator in the form of a horizontal line that appears in the menu after the card (1 - display, 0 - do not display).
- The Ext - expansion of the tile (.jpg, .png, .bmp, .gif ). It specifies the format in which you will be forced to persist card if ContentType other.
- UseDwn - if equal to 1, then download map tiles are allowed.
- The Sleep - the value of the pauses between downloads of individual tiles in milliseconds.
- DefHotKey - hotkeys for this card.
- The ContentType - type of downloaded data (eg, image / jpeg, image / png ). It is possible to use several types simultaneously.
- DefaultContentType - the type that will be used if the server did not return any type or if there is a type of neglect, returned by the server.
- IgnoreContentType - ignoring the type returned by the server.
- DetectContentType - if equal to 1, after loading the tile will perform an analysis of its contents and the correction field Content-Type Header in server response
- MimeTypeSubst - substitution of the type of downloaded data (for example, «image / png8bit = image / png»).
- TILERLEFT, TILERRIGHT, TILERTOP, TILERBOTTOM - options for trimming downloaded tiles to the left, right, top and bottom. If the resulting rectangle does not coincide with a square 256 × 256, and it is more stretched or compressed to this size.
- UsePreloadPage - if equal to 1, use a pre-loads the page (be sure to specify its address).
- PreloadPage - the address of the page pre-loaded.
- RequestHead - custom HTTP-headers (headers), transmitted to the server. The fields must be separated with the \ r \ n (example: RequestHead = Referer: maps.kosmosnimki.ru \ r \ nConnection: Keep-Alive).
- Version - version of the tile corresponds to a variable in Version GetUrlScript.txt.
- MaxConnectToServerCount - the maximum number of threads. The default value is set in section [ZmpDefaultParams] SASPlanet.ini file
- UseMemCache - use in-memory cache (if CacheType = 9 (the RAM-cache) disable this option will result in an error), enabled by default
- MemCacheCapacity - number of tiles cached in memory. Default = 100
- MemCacheTTL - the lifetime of the tiles (milliseconds), cached in memory. Default = 60000 ms. (1 min.)
- MemCacheClearStrategy - cleaning strategy (for TTL) of cached in memory tiles. Valid values: 0 - remove all tiles from the meme-cache if the TTL has expired from the oldest tile; 1 - to remove all tiles from the meme-cache if the TTL expired at the youngest of the tile; 2 - only remove tiles that have expired TTL. The default mode is enabled 1.
- RestartDownloadOnMemCacheTTL - automatically redownload tiles within the visible area of the screen while cleaning mem-cache (only works if UseMemCache = 1). The default is off.
- © = License, - the text of the license, which will be displayed in the upper left corner of the map. Required to comply with the terms of distribution of some cards.
- LayerZOrder - the display order of layers, the default 0. The layers with the higher value will be displayed on top of the layer with a lower value
- IsReadOnly = 1 - use the cache in the "Read Only"
- IteratorSubRectSize - the size of the vertical and horizontal, as measured in standard tile (256x256 pixels) when downloading the so-called "megataylov", ie tiles with the sizes of more than 256x256 pixels. (Only SACS)
- IteratorSubRectAlign - if 0 - the default everything, if not 0 (1 or 2), carried out an exact binding to the size megatayla. If not 1 and 2 - it will be further increased size viewing region was even possible to download, for example, one in the top left tile mode cache + internet shear window left and up. Interpretation of obscure interested to look here . (Only SACS)
- CutCountX = 0 (the number of pieces on the X, optional)
- CutCountY = 0 (respectively Y)
- CutSizeX = 0 (a piece of size X, if not defined - is taken from the 256 parameters)
- CutSizeY = 0 (respectively Y)
- CutTileX = 0 (the position of the requested tile in the overall picture for X)
- CutTileY = 0 (respectively Y)
- CutToSkip = (0,0), (0, -1) list of tiles that you want to miss (relative CutTileX, CutTileY).
Section [ViewInfo]
- The EPSG - the projection of the code card for output to the screen.
Some parameters of the card can be changed within the program file params.txt without editing. To do this, go to Settings → Settings card or press the Ctrl + the Alt + the P . Custom change card settings are stored in maps / maps.ini file.
GetUrlScript.txt
File GetUrlScript.txt contains a script that generates complete reference address on the card files. Scripts are written in the usual Pascal.
info.txt
The file info.txt contains textual information on the map. Use the syntax of the HTML (in particular, it is necessary to separate the paragraphs tagged <BR>). It is also possible to display image files (for example, map legend), using the following tags:
<Img src = "Full path \ image file" /> or
<Img src = "image file"> (if the file is in zmp).
0 件のコメント:
コメントを投稿