exclude postcode ranges separated by colon from centre point calculation

This commit is contained in:
marc tobias 2019-05-25 20:43:38 +02:00
parent 17f130550e
commit 10fbda702b

View File

@ -6,7 +6,7 @@ SELECT country_code,
ST_Centroid(ST_Collect(ST_Centroid(geometry))) as centroid
FROM placex
WHERE address ? 'postcode'
AND address->'postcode' NOT SIMILAR TO '%(,|;)%'
AND address->'postcode' NOT SIMILAR TO '%(,|;|:)%'
AND geometry IS NOT null
GROUP BY country_code, pc;