coordtransform is a coordinate transformation library that converts between Baidu coordinates (BD09), Chinese national survey coordinates also known as Mars coordinates (GCJ02), and WGS84 geographic coordinates.
The tool addresses the problem of coordinate system misalignment that arises when working with location data from different sources in China. Different mapping services and device APIs return coordinates in different systems: GPS devices and international map providers use WGS84, Chinese mobile devices and services like Amap use GCJ02, and Baidu's SDK and maps use BD09. The library provides conversion functions between all three systems, allowing developers to normalize coordinates regardless of their source before using them in web GIS visualization or other applications.
The tool suits developers building location-aware applications in China who need to reconcile coordinates from multiple sources. It works in Node.js and browser environments, supporting both AMD module loading and direct script inclusion. Developers should choose this if they are integrating Baidu SDK data with other mapping systems, or combining location data from iOS native libraries, Android devices, or services like Amap. The README identifies related implementations in Python, Go, and a command-line version, but makes no comparative claims about this JavaScript version.
The project maintains implementations across multiple programming languages and provides a command-line tool variant for direct GeoJSON conversion. The library is distributed through npm and documented with a project homepage.