What the data for this category looks like
Data sources for this category include the territorial spatial basic information platform, natural resource survey and monitoring data, population and economic statistics data, and remote sensing image materials. Daily processed documents cover territorial spatial master plans, detailed plans, special plans, planning implementation evaluation reports, and public opinion summary materials. The data update frequency is annual. Fields include spatial coordinates, constraint indicators, population and economic statistics values, facility layout information, and other fields. Units involve square kilometers, number of people, meters and other spatial and statistical dimensions. The data also includes unstructured public opinion text and structured planning approval form data.
What constraints do these characteristics impose on the "database and operations" link
The annual update feature requires the database to support bulk import of full historical data and incremental updates, while being compatible with multi-source heterogeneous data formats. Differences in fields and spatial attributes of multi-source data require the database to support mixed structured and unstructured data storage, as well as spatial index query capabilities. Unstructured text from public opinion summaries and long-form content from planning documents create significant storage and parsing overhead, so reasonable cache and index mechanisms must be configured. Data processing errors can delay planning approval, so complete data backup and verification processes are needed to prevent data loss or format errors from affecting subsequent steps.
How to set the configurations
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
MONGODB_URI | mongodb://[username]:[password]@host:port/dbname?authSource=admin | Stores unstructured planning documents, public opinion text, and image metadata, adapting to the flexible storage needs of multi-source data |
PG_URL | postgresql://[user]:[pass]@host:port/geo_db?sslmode=require | Stores structured spatial fields and constraint indicator data, supporting spatial queries and multi-table association analysis |
DB_MAX_LINK | 20–30 | Meets concurrent connection requirements during annual bulk data import, preventing import failures caused by exhausted database connections |
REDIS_URL | redis://:password@host:port/0 | Caches frequently queried spatial indexes and public opinion summary data, reducing load pressure on the primary database |
Reference only; verify against the target FastGPT release and deployment documentation.
Three common mistakes
- Connection timeout on startup: The symptom is console output of the
connection timed outerror. The cause is that the host address configured inMONGODB_URIdoes not open access permissions for the corresponding port, or the database instance does not allow access from the IP range of the deployment environment. - Knowledge base cannot import Excel files, and only the first two columns are read when importing CSV: The symptom is a prompt indicating unsupported format when uploading an Excel file, and only the first two columns of data are loaded when importing a CSV file. The cause is that the preprocessing plugin for the corresponding file format is not configured, and parsing adaptation for multi-column data is not enabled.
- AI workflow does not reference database query results: The symptom is that the generated planning report does not include spatial indicators or statistical data returned by the database. The cause is that the workflow node does not correctly bind the database query results to the AI context, or the
DB_MAX_LINKconfiguration is too low, causing query results to not return normally.
How to confirm the configuration is correct
- Execute the built-in database connectivity test script to verify the connection status of
MONGODB_URIandPG_URL, confirming no timeout or permission errors are present. - Upload a single Excel-format planning document and CSV test data containing multiple columns, checking that import and reading of all configured fields work normally.
- Trigger a small-scale bulk data import task, observing that database connection counts remain within the range set by
DB_MAX_LINK, with no exhausted connection logs. - Execute a workflow bound to database queries, checking that the generated report includes spatial indicators and statistical data returned by the database, confirming the results are correctly referenced.
The values provided here are common starting points and should be measured against the reader's own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-28.