Skip to content

Peach Groce Store (PGS): POI, the Mars Coordinate System and Coordinate Conversion ​

What this software is ​

This page introduces a small program the author wrote herself, Peach Groce Store (PGS) v1.3, nicknamed “桃屁屁” (Tao Pi Pi). She spent more than 20 days conceiving, designing and coding it. The program needs no installation — just double-click “桃屁屁.exe” to run it. At present its only function is a coordinate tool, covering the commonly used conversions between degrees-minutes-seconds and decimal degrees, and between WGS84 and the Mars coordinate system.

Data are stored in tables: the program reads *.xlsx files, the coordinate tool works on columns ordered as longitude and latitude, the converted data are written into the third and fourth columns, and anything can be stored after the fourth column. A “Help” button is built into the program. Before introducing the software, the text first explains how to obtain POI (point of interest) data, and what the Mars coordinate system (GCJ-02, the encrypted coordinate system defined by the national surveying and mapping authority) is, how Baidu's coordinate system and Tianditu's CGCS2000 differ from it, and why coordinate correction is needed.

What you can use it for ​

  • Batch conversion between degrees-minutes-seconds and decimal degrees
  • Batch conversion between WGS84 and the Mars coordinate system (GCJ-02)
  • Converting the longitude/latitude columns of an xlsx table directly

-1- POI ​

Today, let's talk about the business of "points"

First, we need some points

All right, then let's use POI

What is POI? Please look here

↓

今天我们来谈谈POI (Let's talk about POI today)

↑

(Today's word count is quite large, so there is no need to pad it out with explanations of terms ⸮ᵔᴥᵔ?)

OK, we know the meaning now. How to obtain it? Please look here

↓

POI数据获取脚本分享 (Sharing a POI data acquisition script)

↑

Of course there are also many ready-made routines that you can get at once

For example: 06长三角2021年POI分享(18类)(Yangtze River Delta integration series: 06 — Sharing the 2021 POI of the Yangtze River Delta (18 categories))

-2- The Mars coordinate system ​

All right, the cook has obtained the rice; after that comes another coordinate system problem. This coordinate system is not that coordinate system: it is the GCJ-02 coordinate system customised by the National Administration of Surveying, Mapping and Geoinformation, known as the "Mars coordinate system", which is essentially an encryption of the real position that makes it shift non-linearly

The Amap (Gaode), Google China and Tencent Maps that we commonly use are all in the GCJ-02 coordinate system. Baidu is rather special: it says "I am different from you; I want encryption as well — not only the longitude and latitude, but the Mercator metre coordinates too!", and so there came bd09ll: Baidu longitude-latitude coordinates, and bd09mc: Baidu Mercator metre coordinates

Question: Why convert?

Answer: Strictly speaking it is not called conversion; it is an encryption and decryption process. If you don't correct the offset, the bank might be in the river — wouldn't you panic?

Compared with the above coordinate systems, Tianditu is much more considerate. Why? Because what it provides is the CGCS2000 coordinate system. Although the CGCS2000 coordinate system has a tiny difference from the WGS84 reference ellipsoid, Cheng Pengfei, president of the Chinese Academy of Surveying and Mapping, said: for the same point, the longitude is the same under the CGCS2000 ellipsoid and the WGS84 ellipsoid, and the maximum difference in latitude is about 0.11 mm (not an actual distance). There are differences in small areas, but they can be ignored in large areas

-3- Tao Pi Pi ​

After searching high and low, I couldn't find a program that matched my senior sister's aesthetics

Forget it, I'll write one myself

My goal is: to write software from the user's point of view

So my senior sister spent more than 20 days conceiving, designing and coding it

Yes, the very person who was still typing code on New Year's Eve

Finally (Peach Groce Store PGS v1.3) is online~

Nicknamed "桃屁屁" (Tao Pi Pi) (I refuse this nickname ⎝>෴<⎠)

You will get a compressed package; download and unzip it (obviously)

Double-click this "桃屁屁.exe" (Tao Pi Pi.exe). No installation is needed. At present the functions are only the coordinate tools, including the commonly used conversion between degrees-minutes-seconds and decimal degrees, and between WGS84 and the Mars coordinate system

How to use it? Super simple. The data are stored in a table, which can read "*.xlsx" format files. At present the coordinate tools all sort by the two columns of longitude and latitude; the third and fourth columns will store the converted data, and data can be stored arbitrarily after the fourth column

The degrees-minutes-seconds and degrees conversion software can recognise automatically~

Degrees --> degrees-minutes-seconds

Degrees-minutes-seconds --> degrees

The format for the WGS84 and Mars coordinate conversion is "°"

Remember to have a header row. If you can't remember the details, it doesn't matter: my senior sister has very considerately written a "Help document" button

As for this little program, I plan to keep writing it. If you fellows have any needs, you can contact me. When there are more needs, I will write them into "Tao Pi Pi" and provide them to everyone for free use~.