Big Data 16 min read

Beidou Grid Code: Theory, Implementation, and Urban Management Applications

This article introduces the Beidou Grid Code, its theoretical foundation in GeoSOT, detailed hierarchical encoding rules, implementation challenges using MySQL and JPA, and showcases practical urban management applications such as case reporting, hotspot analysis, indoor positioning, and data security.

Zhengtong Technical Team
Zhengtong Technical Team
Zhengtong Technical Team
Beidou Grid Code: Theory, Implementation, and Urban Management Applications

1. Introduction

Beidou grid code, derived from the rapidly developing Earth partition theory, has become a representative standard in this research field. Digital ZhengTong collaborated with Ningbo Smart City Management Center in 2011 to apply the grid code in city management, receiving national strategic emerging industry funding and completing the first phase of the Ningbo Smart City Management project in 2012.

In recent years, ZhengTong has kept pace with the new trend of Beidou applications, accumulating richer technical and case experience.

Ningbo City Management Center applies Beidou satellite positioning, domestic remote sensing, and other high‑precision technologies to grid‑based city management, pioneering a national first and winning the 2015 Satellite Navigation Technology Progress Award.

2. Beidou Grid Code Overview

The Beidou grid code (Beidou Grid Position Code) was developed by the Beidou Office together with Peking University and other institutions based on the GeoSOT global spatial partition theory (a national 973 project). It is now a new spatial position output standard of the China Beidou system.

The two‑dimensional grid and encoding follow the GeoSOT grid partition defined in GJB 8896‑2017, linking the 1:100 000 and 1:50 000 standard topographic map grids. Eight hierarchical layers are defined, each with fixed size and scale, forming the Beidou grid code output format.

In simple terms, the space represented by a Beidou grid code can be imagined as a screen where each grid code corresponds to a pixel, and a string of characters encodes the pixel’s position.

3. Practical Case Study

3.1 Workflow

To introduce Beidou grid codes into case reporting and achieve unit‑grid queries, two steps are required:

Convert the unit‑grid layer into Beidou grid codes for storage.

Use the grid codes to perform point‑in‑polygon (PIP) judgments and obtain the unit‑grid code of a case.

3.2 Implementation Challenges

Although the Beidou grid code is designed for big‑data scenarios, the prototype uses MySQL to reduce system complexity and focus on conversion logic and data structure design.

Two core problems arise during data dumping:

(1) How to convert and achieve point‑in‑polygon judgment?

First, each unit‑grid feature’s vertices are converted into Beidou grid codes, producing a set of codes for the feature’s outline. To support PIP, edges are interpolated and encrypted, generating additional grid codes along each edge so that the feature becomes a closed set of grid codes.

Feature vertex conversion to Beidou grid code (illustration)

After edge interpolation, the feature is represented by a finite set of grid codes forming a closed area. Point‑in‑polygon judgment then checks whether a point’s grid code falls within the horizontal and vertical intervals defined by the feature’s grid codes.

Edge interpolation and PIP illustration

(2) How to store the data efficiently?

Appropriate indexes are essential, but the focus here is on a sharding storage scheme. After interpolation, a layer’s grid code count can increase dramatically (e.g., a layer with 2 380 units generates over 1.8 million one‑meter grid codes). A three‑table design is used: a layer table for metadata, a feature table for attributes, and a code table for the interpolated grid codes.

To avoid cross‑layer interference, each layer’s grid codes are stored in a separate code table (sharding by layer primary key), ensuring query isolation.

The JPA mapping was adapted from one‑to‑one to one‑to‑many to support this design. The core mapping code is shown below:

3.3 Results

(1) Implemented a database storage scheme for converting shapefile layers to Beidou grid codes.

(2) Achieved point‑in‑polygon queries based on Beidou grid codes with performance comparable to GeoServer WFS.

4. Exploration of Urban Management Applications Based on Beidou Grid Code

4.1 Linking Cases to Grid Codes

During case reporting, the corresponding Beidou grid code is displayed and stored, enabling rapid statistical analysis of cases at various scales within a jurisdiction.

4.2 Re‑occurring Hotspot Analysis

By associating completed cases with their grid codes, the distribution of frequently re‑reported hotspots can be analyzed, helping focus on persistent problem areas. This approach has been applied in the Shenyang project.

4.3 Similar Case Statistics

Cases of the same sub‑type, reported on the same day and in close proximity are considered similar. Matching new reports against existing grid‑coded cases can automatically identify duplicates, reducing redundant reporting and lowering management costs.

4.4 Indoor Positioning Using Grid Codes

Traditional satellite positioning fails indoors due to signal blockage. By binding building outlines to fine‑grained grid collections, field workers can mark grid codes at building entrances and for each household, achieving precise indoor location for reporting and dispatch.

4.5 Vector Data Encryption

Sensitive vector data (administrative grids, pipelines, etc.) can be de‑identified by converting coordinates to grid codes of appropriate precision, reducing dimensionality and enhancing data security during transmission.

4.6 "Beidou" Solution for ZhengTong’s Autonomous Vehicle

In January 2022, ZhengTong launched the Qiji autonomous grid vehicle, integrating Beidou positioning and differential correction to achieve centimeter‑level accuracy. The vehicle’s sensors collect urban management data, which is encoded with Beidou grid codes for storage and downstream analysis.

5. Summary and Outlook

Advantages:

Achieves data de‑identification by pixelating geographic coordinates.

One‑dimensional encoding simplifies spatial retrieval compared with traditional (x, y) pairs.

Facilitates local updates of feature vertices.

Disadvantages:

Large data volume increases storage consumption, though storage is relatively cheap and the trade‑off favors performance.

Further work is needed to meet OGC standards; once standardized, the solution can be reused.

The Beidou grid code is a new data standard still in its growth phase. Its technology and application scenarios continue to evolve, and Digital ZhengTong will keep actively exploring more practical urban‑management cases.

big dataspatial indexingGISlocation encodingBeidouGrid CodeUrban Management
Zhengtong Technical Team
Written by

Zhengtong Technical Team

How do 700+ nationwide projects deliver quality service? What inspiring stories lie behind dozens of product lines? Where is the efficient solution for tens of thousands of customer needs each year? This is Zhengtong Digital's technical practice sharing—a bridge connecting engineers and customers!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.