2025-03-04     2025-03-05     2025-03-06

the lat/lng for capitals should be within geoname-shape of country

number of errors=0
number of warnings=0
Group=chkGrpLocation
Group=chkGrpShp

select geoname.name,geoname.geonameid,geoname.countrycode,coalesce(geoname_shape.countrycode,'xx') as shapecountry, 'http://map.immofacts.ch/servlet/geonames?srv=781&lat=' || GEONAME.longlat[1] || '&lng=' || GEONAME.longlat[0] as shape from geoname left outer join geoname_shape on level=1 and st_within(st_GeomFromText('Point(' || longlat[0] || ' ' || longlat[1] || ')',4326),wkb_geometry) where featurecode='PPLC' and geoname.countrycode<>coalesce(geoname_shape.countrycode,'xx') order by geoname.countrycode

name	geonameid	countrycode	shapecountry	shape