A water loss and leak detection app that helps users find and locate leaks, even small or hard-to-detect ones, anywhere in the water system
Rails 7, React, Leaflet, gcoord, Docker, Ansible
Engineering & Construction
Custom Software Development
Web
7 members
2.5 months
The client company, NeptunusDetect, is a global technology leader and innovator in intelligent water loss and leak detection technologies.
It’s a third-generation privately owned enterprise with headquarters in Baar, Switzerland, and regional offices in Europe, North and Latin America, the Middle East, Southeast Asia, and Australia.
They needed to adapt their leak detection app for the Chinese market to fit its special coordinate system standards.
The company decided to enter the Chinese market but faced significant challenges right away.
When their Chinese distributors placed some sensors, they found them located in a river. This was a major issue. Another problem was legal — to use map navigation software in China, the software and the company must be registered in China.
NeptunusDetect’s previous pipeline monitoring app faced several notable challenges:
The client approached us to help solve these problems.
Our work with them included two stages: the Proof of Concept (PoC) and the Minimum Viable Product (MVP). In the PoC stage, we integrated the client’s API to test its compatibility with Chinese map providers.
Later on, we built a system that allowed the client to switch between different map providers easily. This let us pull data from the client’s app and it was important for the client because each map provider displayed cities and towns differently.
For example, one provider might show a small town in a location, while another might show a waste lot or land property.
The prices of these providers also varied. At first, the client chose the free option with Open Street Map, but later, we switched to Baidu Map to better fit their needs.
So, our first objective was to review Chinese map providers. We were looking for a solution that would comply with legal requirements and ensure that the data was highly accurate and up to date.
We needed to choose the right map provider to adapt our app to the Chinese market. Each provider has its own features and challenges, so this choice was important for a further smooth transition into the Chinese geolocation environment.
We focused on several main Chinese map providers:
And others.
We chose a combination of Leaflet and React libraries to combine map providers in a single application and compare them without dealing with each provider’s APIs.
Leaflet is a lightweight but powerful library for creating interactive maps, while React is ideal for building dynamic user interfaces.
We used the Leaflet.ChineseTmsProviders repository to simplify the integration of various Chinese map providers.
This tool provided us with ready-made configurations for various Chinese map providers, significantly speeding up the map development and integration process. It also allowed us to test about eight map providers quickly.
After carefully setting up the app using Chinese map providers, we were convinced that everything would work perfectly.
But the reality was different. The data coming from the clients was still displayed incorrectly. So, we needed to find out what had gone wrong. The answer was in the coordinates system.
As it turned out, China has its unique coordinate system standards and map datum.
An international standard is WGS-84 (Earth coordinates) or World Geodetic System, where 84 is the latest revision of this standard applied in 1984.
Chinese regulators require approved map services to use standard GCJ-02.
GCJ-02 is based on WGS-84 and uses an obfuscation algorithm, adding random offsets to the latitude and longitude to improve national security. If the WGS-84 point is placed on the GCJ-02 map, the average location offset will be about 300-500m.
Baidu, one of the licensed base maps in China, implemented yet another abstraction, adding further obfuscation to GCJ-02.
It’s called BD-09 (Baidu, formulated in 2009). The primary purpose was to protect Baidu’s data so competitors couldn’t easily duplicate it. Baidu has internal tools to shift between the three coordinate systems, but it only made GCJ-02 to BD-09 public to encourage using their standard for tiles, search coordinates, etc.
To solve this problem, we used the gcoord library, which provides a simple and efficient way to convert coordinates between different systems.
This solution allowed us to adapt the data from the clients to the unique Chinese coordinate systems, thus ensuring an accurate and correct display of geospatial information in the app.
The JetRuby team has developed a Minimum Viable Product (MVP) that leverages advanced technology and a user-friendly design to tackle key challenges:
Our team developed NeptunusDetect’s MVP, which offered a simple and flexible solution that met China’s specific rules and needs.
Here are the main benefits:
A strong map-switching feature kept services running, even when regulations could change.
Users could see real-time data and past information, which made managing pipelines more efficient.
Upgrades in language and design provided a smooth experience for both English and Chinese speakers.
JetRuby helped NeptunusDetect develop an MVP, paving the way for better pipeline management around the world.
We’ve once again proved that success on a global scale requires adaptability and continuous learning. This project reinforced the value of flexible thinking, openness to new ideas, and strong teamwork.
We hope that our experience will serve as a useful lesson and inspiration for other developers seeking to overcome borders and adapt their products for a global audience.
We look forward to discussing your ideas and bringing them to life
By submitting request you agree to our Privacy Policy
Thank you for contacting us
Our manager will get back to you shortly. While waiting, you may visit our portfolio.
We use cookies to make Jetruby better. By clicking "Accept cookies", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. OK, I want to read more