-
-
Save thany/a21281f2d9847d1c94c8c9d8a2447968 to your computer and use it in GitHub Desktop.
wget http://post.denso-communications.jp/dn/navicon_start.php --method=POST --body-data="lat=35.872722875676274&lng=139.73869658316153" -O - -q | grep -Po '(?<=id="mapcode">)([^<]*)' |
@MrZuerrer
That's amazing. And goes way above my sense of comprehension.
Nice to see more people interested in Japan Mapcode.
I think for practical use I would not mind when visiting Japan again that the actual destination is a few 100m away from what my App says, because we need to find a parking spot anyway. And we use it to visit tourist attractions, not Ms Tanamakas house...
But a bit weird Denso keeps it a secret.
@MrZuerrer
Brilliant work! It's weird that we "have to" reverse-engineer it, as @bespired said, but it's pretty amazing how you were able to come up with those numbers. I'm curious, are they based off of any type of logic, or just magic numbers to "make it work", so to speak?
My use case involved solving a puzzle with the solution pointing to a particular public phone in Osaka. Hence my need for precision.
The parameters I used are "well" documented. You can find one such example in https://gis-lab.info/docs/nima-tr8350.2-wgs84fin.pdf. Documentation, however, is not meant for the uninitiated such as me... But I am persistent ;-)
BTW... I used Mapion in the past but did not realize they also provide MapCode. I will refine my PowerShell / Selenium script to drive the Mapion web page (e.g. https://www.mapion.co.jp/m2/34.735775957141,135.55287836095266,16) and with a few simulated clicks I can get the MapCode.
This addresses my requirements in a pragmatic way and given I typically need less than 50 waypoints, I can easily feed the coordinates to the script and collect the MapCodes.
Hi there
We recently hired a car in Hokkaido and came across MapCodes for the first time. I thought it would be cool to use MapCode instead of WGS coordinates or telephone numbers for POI lists for future travels. This is, how I landed here.
I noticed the same problem a while ago with deviations of typically a few hundred meters between WGS coordinates and those of NTTs public telephones shown on their map (e.g. https://publictelephone.ntt-east.co.jp/ptd/map/guidemap/135928390_505721060).
After a lot of investigations, I found the correct method to transform coordinates from Tokyo datum to WGS84. The method is called "Molodensky transformation".
The parameters I used to obtain correct results were:
I used the following Python code to verify correctness of the conversion:
The results correctly show "my" two public telephones at (34.71162167071122 135.51966303882074) and (34.736431415423006 135.55711700823204), respectively. As always with these things... your mileage may vary ;-)
Best regards and good luck with your project
Peter