Attribute Reference

To ensure interoperability and ease of use, all layers within the Toril GIS ecosystem share a standardized attribute structure. This uniformity allows for consistent styling, filtering, and multilingual labeling across different datasets.

Data Source & Export Formats

The table below describes the authoritative structure as it exists in the primary PostGIS database. Depending on how you consume this data, attributes may undergo transformations.

While we primarily support GeoPackage (.gpkg), the data can be exported to numerous other formats (such GeoJSON (.geojson) and Shapefile (.shp)). Please note: Changes in data structure are inevitable during export due to varying format specifications. Be prepared for potential loss of nested metadata or attribute truncation in legacy formats.


Attribute Dictionary

Name Type Description
Identity & Classification    
uuid UUID EXTREMELY IMPORTANT. This is the primary key and the “glue” of the entire database. All relational data—including translations in different languages and linked lore—is connected via this field. Never change or regenerate the UUID for existing objects, as it will break all database integrity and linkings.
layer_id Text Internal identifier linking the feature to its specific layer (e.g., srf_civ_populated_places_pt).
feature_class Text Classification of the feature type (e.g., “City”, “Forest”, “Ruins”). This is the primary field for thematic styling. For the full list of allowed values, see Working With Layers and Styles.
feature_rank Integer Importance scale that corresponds to web-map zoom levels. Toril GIS focuses primarily on global and regional scales. Currently, the range is 0 to 10 (where 0 is global significance), though this is not a hard limit. Technically, the system supports higher values: for example, 20 would represent hyper-local objects like. See Working With Layers and Styles.
Project Metadata    
source Text Reference code referencing the original map or book source. Read more in Data Sources.
dnd_editions Array Game editions where this feature is present (e.g., 2e, 3e, 5e). Check the D&D Edition Compatibility guide to see how these map to Toril’s historical timeline.
timeframe Text Reserved for high-precision chronological filtering (e.g., specific years). This field is currently experimental and underused but will be vital for future temporal/historical map versions.
is_visible Boolean Primary visibility toggle. If set to FALSE, the feature is ignored by standard styles.
is_labeled Boolean Global toggle for label rendering. Allows turning off labels for specific features even if the layer style has labeling enabled.
needs_review Boolean Internal Developer Use. A flag indicating that the feature requires manual verification, coordinate adjustment, or lore checking. End-users can generally ignore this.
review_notes Text Internal Developer Use. Specific instructions, issues, or “to-do” notes regarding the accuracy of the feature data.
Spatial & System    
geog Geography Canonical geometry stored in [Toril GCS]/worlds/toril/gis/docs/coordinate-systems/). This is the master spatial data. All operations should eventually persist back to this column.
geog_extent JSONB Pre-calculated bounding box and other measurements in both Imperial and Metric systems.
location_paths JSONB Multilingual hierarchical breadcrumbs (e.g., {"en": ["Mhair Jungles", "Chult", "Faerûn"]}). In the QGIS Project, virtual attributes like location use this data to render clean paths like “Mhair Jungles → Chult → Faerûn”.
last_edited Date The date of the last modification to simplify version tracking.
last_editor Text The username or process responsible for the last update.
extra JSONB Flexible store for attributes unique to specific layers. If we need to add more attributes in the future, they can be stored here without changing the core database structure.
Multilingual Content    
name_{lang} Text Authoritative Content. English (name_en) is the master language and primary source of truth. All features are guaranteed to have English attributes. Other languages (like name_ru) are secondary and should fallback to English if empty.
name_abb_{lang} Text Abbreviated name used for tight map spaces. These are used in Labeling Rules.
name_alt_{lang} Array Known aliases, historical names, or variant spellings in the specified language.
descr_{lang} Text Plain text lore description of the feature.
url_{lang} Text Link to relevant lore resources (e.g., Wiki or primary source articles) in that specific language.

Technical Notes

Virtual Attributes in QGIS

The Toril GIS QGIS Project (our primary visualization environment) includes several Virtual Fields. These are not stored in the database but are calculated on the fly from the attributes listed above. Example: location – a virtual attribute that formats the location_paths JSON into a human-readable string for map tips and popups.

Localization & Scale

Every content field follows the {field}_{lang_code} pattern. While the current focus is on English (en) and Russian (ru), the schema is ready to scale to any language. Similarly, the feature_rank logic ensures that even as we add more detail (down to individual buildings), the global map remains clean and performant.