## Library

We release the latest version of sets of functions (library) for calculating world grid square codes (compatible extension to JIS X0410) in various programming languages.

If you use these libraries, you must declare that you include the library developed by Prof. Dr. Aki-Hiro Sato akihiro(at)fttsus.org and distributed from Research Institute for World Grid Squares riwgs(at)fttsus.org and that these libraries have been developed under the R&D project JST PRESTO (JPMJPR1504) and the R&D project JST MIRAI (JPMJMI20B6) funded by the Japan Science and Technology Agency (JST). This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(c) Research Institute for World Grid Squares, 2015-2022, All Right Reserved.

R (Version 1.81 : Released on 12 December 2022)

https://www.fttsus.org/worldmesh/R/worldmesh.R

source("https://www.fttsus.org/worldmesh/R/worldmesh.R")

JavaScript (Version 1.75 : Released on 13 April 2022)

https://www.fttsus.org/worldmesh/js/worldmesh.js

<script src="https://www.fttsus.jp/worldmesh/js/worldmesh.js"></script>

PHP (Version 1.75 : Released on 13 April 2022)

include_once("worldmesh.php");

Python (Version 1.8 : Released on 12 December 2022)

https://www.fttsus.org/worldmesh/python/worldmesh.py

iimport httpimport
with httpimport.remote_repo('https://www.fttsus.org/worldmesh/python'):
import worldmesh

Java (Version 1.65 : Released on 13 April 2022)

https://www.fttsus.org/worldmesh/java/worldmesh.java

### List of Functions

• meshcode_to_latlong(meshcode,  extension = F, spec=””): calculate north-western geographic position of the grid (latitude, longitude) from meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• meshcode_to_latlong_NW(meshcode, extension = F, spec=””): calculate north-western geographic position of the grid (latitude, longitude) from meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• meshcode_to_latlong_SW(meshcode, extension = F, spec=””): calculate the geographic position (latitude, longitude) at the south-western corner of the grid with meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• meshcode_to_latlong_NE(meshcode, extension = F, spec=””): calculate the geographic position (latitude, longitude) at the north-eastern corner of the grid with meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• meshcode_to_latlong_SE(meshcode, extension = F, spec=””): calculate the geographic position (latitude, longitude) at the south-eastern corner of the grid with meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• meshcode_to_latlong_grid(meshcode, extension = F, spec=””): calculate the geographic positions (latitude0, longitude0, latitude1, longitude1) at the north-western and south-eastern corner of the grid with meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• cal_meshcode(latitude,longitude): calculate a basic (third-level) grid square code (10 digits) from a geographical position (latitude, longitude)
• cal_meshcode1(latitude,longitude): calculate a first-level grid square code (6 digits) from a geographical position (latitude, longitude)
• cal_meshcode2(latitude,longitude): calculate a second-level grid square code (8 digits) from a geographical position (latitude, longitude)
• cal_meshcode3(latitude,longitude): calculate a third-level grid square code (10 digits) from a geographical position (latitude, longitude)
• cal_meshcode4(latitude,longitude): calculate a fourth-level grid square code (11 digits) from a geographical position (latitude, longitude)
• cal_meshcode5(latitude,longitude): calculate a fifth-level grid square code (12 digits) from a geographical position (latitude, longitude)
• cal_meshcode6(latitude,longitude): calculate a sixth-level grid square code (13 digits) from a geographical position (latitude, longitude)
• cal_meshcode_ex100m_12(latitude,longitude): calculate an extended 100m (1km / 10) grid square code (12 digits) from a geographical position (latitude, longitude). The grid size is 3 arc-second for latitude and 4.5 arc-second for longitude.
• cal_meshcode_ex100m_13(latitude,longitude): : calculate an extended 100m (500m / 5) grid square code (13 digits) from a geographical position (latitude, longitude) – 3 arc-second for latitude and 4.5 arc-second for longitude.
• cal_meshcode_ex50m_13(latitude,longitude): calculate an extended 50m (100m / 2) grid square code (13 digits) from a geographical position (latitude, longitude) – 1.5 arc-second for latitude and 2.25 arc-second for longitude.
• cal_meshcode_ex50m_14(latitude,longitude): calculate an extended 50m (100m / 2) grid square code (14 digits) from a geographical position (latitude, longitude). The grid size is 1.5 arc-second for latitude and 2.25 arc-second for longitude.
• cal_meshcode_ex10m_14(latitude,longitude): calculate an extended 10m (100m / 10) grid square code (14 digits) from a geographical position (latitude, longitude). The grid size is 0.3 arc-second for latitude and 0.45 arc-second for longitude.
• cal_meshcode_ex1m_16(latitude,longitude): calculate an extended 1m (10m / 10) grid square code (16 digits) from a geographical position (latitude, longitude). The grid size is 0.03 arc-second for latitude and 0.045 arc-second for longitude.
• Vincenty(latitude1, longitude1, latitude2, longitude2): calculate geodesic distance between two point indicated by (I>latitude1, longitude1) and (latitude2, longitude2) based on WGS84 by using the Vincenty formula (1975)
• cal_area_from_meshcode(meshcode, extension=F, spec=””): calculate a size (northern west-to-east span H1, southern west-to-east span H2, north-to-south span W, and a trapezoidal approximation area A) of world grid square indicated by world grid square code meshcode. When you use extended grid square code (ex100m_12, ex100m_13, ex50m_13, ex50m_14, ex10m_14, and ex1m_16), you need to set extension = T, otherwise extension = F (default). Specifically, if you want to use ex100m_13 and ex50m_14, you need to set the spec option as “ex100m_13” and “ex50m_14”, respectively.
• cal_area_from_latlong(latlong): calculate a size (northern west-to-east span H1, southern west-to-east span H2, north-to-south span W, and a trapezoidal approximation area A) of a trapezoidal area indicated by latlong

(c) 2015-2022 Research Institute for World Grid Squares
{"ft_lang_label":"__label__en","ft_lang_prob":0.71350175,"math_prob":0.9182131,"size":8002,"snap":"2023-40-2023-50","text_gpt3_token_len":2177,"char_repetition_ratio":0.1831708,"word_repetition_ratio":0.5604606,"special_character_ratio":0.29030243,"punctuation_ratio":0.17890236,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97986954,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-23T22:05:08Z\",\"WARC-Record-ID\":\"<urn:uuid:45db9ffa-a8f4-4e32-aa9e-2dbec0a760f2>\",\"Content-Length\":\"55990\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8b48b25d-f9d7-4533-b37c-1892a474f0e0>\",\"WARC-Concurrent-To\":\"<urn:uuid:2e8b8472-7fb9-45a9-a581-6dbd80750af2>\",\"WARC-IP-Address\":\"219.94.210.68\",\"WARC-Target-URI\":\"https://www.fttsus.org/worldgrids/en/library/\",\"WARC-Payload-Digest\":\"sha1:JXDLCXLE4VKVOJRBB6MSU4GXSJ7MPSOG\",\"WARC-Block-Digest\":\"sha1:2MA7O4QFXHG6A2ANSHRHUTQLG5FNCASA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506528.3_warc_CC-MAIN-20230923194908-20230923224908-00597.warc.gz\"}"}