Overview
The geographic database (BI.Geographic.pas) provides:
- World country data with ISO codes
- Administrative divisions (states, provinces, regions)
- Automatic map visualization
- Geographic data linking
BI.Geographic.pas:317-338 for the TGeo class.
Geographic Database
Access the global geographic database:BI.Geographic.pas:657-672 for the Check method.
Countries
Access country information usingTCountry (BI.Geographic.pas:74-86):
BI.Geographic.pas:546-556 for country data loading.
Continents
Access continent data:BI.Geographic.pas:667 for continent initialization.
Administrative Divisions
Access subdivisions by country usingTEntities (BI.Geographic.pas:88-315):
United States
BI.Geographic.pas:280-288 and BI.Geographic.pas:808-813 for USA entities.
Spain
BI.Geographic.pas:251-259 and BI.Geographic.pas:890-895 for Spain entities.
Other Countries
Supported countries include:- Australia - Lands, Counties
- Brazil - Regions, States
- Canada - Provinces
- China - Provinces, Prefectures
- France - Regions, Départements
- Germany - States, Districts
- India - Zones, States
- Indonesia - Zones, Provinces
- Italy - MacroRegions, Regions, Provinces
- Japan - Regions, Prefectures
- Mexico - States
- Netherlands - Provinces, Municipalities
- Portugal - Regions, Districts
- Russia - Districts, Subjects
- South Africa - Provinces
- South Korea - Types, Provinces
- Switzerland - Cantons
- UK - NUTS, Counties
BI.Geographic.pas:92-314 for all country entities.
Automatic Map Detection
TeeBI automatically detects geographic data:VCLBI.Chart.pas:1041-1042 for geographic detection.
Linking Data
Link your data to geographic entities:BI.Geographic.pas:639-655 for the LinkedTo method.
Entity Structure
Each entity has standard fields:BI.Geographic.pas:23-44 for the TEntity record.
Using Entities
BI.Geographic.pas:367-370 for the NameOfCode method.
Master-Detail Relationships
Navigate hierarchical geographic data:BI.Geographic.pas:617-626 for the IsMultiEntity method.
Available Relationships
Pre-configured master-detail links:- Continents → Countries
- Spain: Regions → Provinces
- France: Regions → Départements
- Japan: Regions → Prefectures
- USA: States → Counties
- And more…
BI.Geographic.pas:516-536 for all relationships.
Geographic Charts
Create maps programmatically:VCLBI.Chart.pas:1193-1194 for geographic chart creation.
Synonyms
Handle alternative country names:BI.Geographic.pas:701-721 for the FindSynonym method.
Built-in synonyms include:
- USA → United States of America
- UK → United Kingdom
- Korea → South Korea
- And 40+ more
BI.Geographic.pas:725-774 for all synonyms.
Complete Example
Database Location
The geographic database is stored separately:BI.Geographic.pas:662 for database loading.
Next Steps
Charts
Display geographic data in charts
Export
Export geographic visualizations
