Meter_gen Config Locations - gridpocket/project-iostack GitHub Wiki

This meter generator use a locations.json file to add city information.

This json file is a copy of database from the following french site (http://sql.sh/736-base-donnees-villes-francaises)

File content sample

[
	{"l":31438,"country":"FRA","region":75,"city":"Paris","latitude":48.86,"longitude":2.34445,"population":2243833,"density":21288},
	{"l":5440,"country":"FRA","region":13,"city":"Marseille","latitude":43.2967,"longitude":5.37639,"population":850726,"density":3535,},
	{"l":2968,"country":"FRA","region":6,"city":"Valbonne","latitude":43.6333,"longitude":7,"population":12275,"density":647},
	{"l":37275,"country":"FRA","region":"2A","city":"Ajaccio","latitude":41.9256,"longitude":8.7364,"population":65542,"density":799},
...
]

Each line is describing a city with the following details:

Key Example Description
l 31438 Unique ID for the city object (can be any string or numeric value while unique)
country FRA 3 Letters identifier of the contry where the meter is
region 75 Identifier (can be string or number) of the country's region where the meter is
city Paris Name of the city
latitude 48.860000 City location's latitude
longitude 2.344450 City location's longituder
population 2243833 City population
density 21288 City density (inhabitants by km²)
⚠️ **GitHub.com Fallback** ⚠️