Perhaps this logic should be placed in a separate library as it requires testing and validation. Nevertheless, these are the requirements:
- we need support for storing user-inputted GCJ-02 coordinates (Chinese maps legally do not use WGS-84).
- from research: forward conversion (WGS-84 to GCJ-02) is reliable but reverse is lossy.
- if supporting Baidu maps, we need bidirectional conversion of BD-09 and GCJ-02. We should not store BD-09 coordinates if possible.
Perhaps this logic should be placed in a separate library as it requires testing and validation. Nevertheless, these are the requirements: