mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
Enhance population counting accuracy and add comprehensive geoJSON exports
Population System Fixes: - Fix province, culture, and religion population calculations to exclude rural population from cells without burgs - Burgs now represent ALL population for their cells (both urban and rural components) - Eliminate double-counting where cell populations were incorrectly added to burg populations Export Enhancements: - Add complete geoJSON export for burgs with all settlement properties - Enhance routes geoJSON export to include type and feature metadata - Add missing length and width properties to rivers geoJSON export - Fix burg coordinate system to match CSV export format with xWorld/yWorld fields UI Improvements: - Add burgs export button to geoJSON export interface - Fix vite module loading issue by adding type="module" to notes-editor.js script tag Documentation: - Create comprehensive QGIS Style Conversion guide with route types, burg features, and relief rendering methods - Add WKT coordinate reference system definition for Fantasy Map Cartesian CRS - Include rule-based styling examples and data processing workflows
This commit is contained in:
parent
9e8bc6e689
commit
83573c8936
6 changed files with 695 additions and 13 deletions
|
|
@ -113,10 +113,8 @@ function culturesCollectStatistics() {
|
|||
if (burgId) {
|
||||
// Burg represents ALL population for this cell (stored in thousands)
|
||||
cultures[cultureId].urban += burgs[burgId].population;
|
||||
} else {
|
||||
// Only count cells.pop for unsettled areas (no burg present)
|
||||
cultures[cultureId].rural += cells.pop[i];
|
||||
}
|
||||
// No population in cells without burgs - all population is in burgs
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -123,10 +123,8 @@ function religionsCollectStatistics() {
|
|||
if (burgId) {
|
||||
// Burg represents ALL population for this cell (stored in thousands)
|
||||
religions[religionId].urban += burgs[burgId].population;
|
||||
} else {
|
||||
// Only count cells.pop for unsettled areas (no burg present)
|
||||
religions[religionId].rural += cells.pop[i];
|
||||
}
|
||||
// No population in cells without burgs - all population is in burgs
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue