This database use stable version of postgis/postgis:14-3.2-alpine
, that process data from geonames.org and process countries, administrator code and geo names that featureClass is administrator area or population place.
Database will automatic update using github action schedule.
These are tables that data stored on it.
CREATE TABLE IF NOT EXISTS "countryInfo" (
"geonameid" INT PRIMARY KEY,
"continent" CHAR(2),
"iso" CHAR(2) UNIQUE,
"iso3" CHAR(3),
"preferedLanguage" CHAR(2),
"locales" VARCHAR(31)[],
"tld" CHAR(3),
"currency" CHAR(3),
"area" BIGINT,
"population" BIGINT,
"neighbours" INT[],
"polygons" geometry
);
CREATE TABLE IF NOT EXISTS "adminCode" (
"id" INT PRIMARY KEY,
"name" VARCHAR(256)
);
CREATE TABLE IF NOT EXISTS "geo" (
"geonameid" INT PRIMARY KEY,
"name" VARCHAR(256),
"country" INT,
"adminCode" INT,
"population" BIGINT,
"timezone" VARCHAR(63),
"location" geography(POINT, 4326),
CONSTRAINT "geo_country__countryInfo_geonameid" FOREIGN KEY("country") REFERENCES "countryInfo"("geonameid"),
CONSTRAINT "geo_adminCode__adminCode_id" FOREIGN KEY("adminCode") REFERENCES "adminCode"("id")
);