Closed slamservice closed 1 year ago
@slamservice all json files are located in the folder resources > json > cities a city object looks like
{
"id": 68,
"name": "Fayzabad",
"state_id": 3901,
"state_code": "BDS",
"country_id": 1,
"country_code": "AF",
"latitude": "37.11664000",
"longitude": "70.58002000",
"wikiDataId": "Q156558"
},
But where did you recover cities.json from? From Geonames? I must be able to extract cities.json with the postal code.
{
"id": 68,
"name": "Fayzabad",
"state_id": 3901,
"state_code": "BDS",
"country_id": 1,
"country_code": "AF",
"latitude": "37.11664000",
"longitude": "70.58002000",
"wikiDataId": "Q156558",
"postalCode": "20056"
}
If I make a join table, how do I relate it to cities?
does a city have a unique postal code? if not it is not the ok to place the codes in the cities.json you need to link the tables with a foreign key : city_id (1 to many)
Yes, unique postal code.
Hi, I need to add postal code to cities: where do you generate cities.json from? Thanks. Marco