I am working in Postgres 9.5. This is my table:
gid | integer | not null default nextval('mytable_gid_seq'::regclass) geom | geometry | county | character varying(1000) |
geom field was created by running
ST_Union over a MultiPolygon field in another table.
If I run
SELECT geom FROM mytable WHERE county='Manchester' and then export the results to GeoJSON and open them in QGIS, the resulting polygons look like this.
Now I want to find the number of interior rings in the geometry for Manchester:
SELECT ST_NumInteriorRings(geom) FROM mytable WHERE county='Manchester';
However, it produces an empty result. I don't understand this, since I can clearly see holes in QGIS.
I've also tried
ST_NumInteriorRings(ST_Multi(geom)) but that doesn't produce a result either.
What am I doing wrong? (What I would ultimately like to do, in case it helps, is find the area of the internal holes.)