7.3 Size of GEOMETRY data

7.7

select
    st_memsize(st_geomfromtext('POINT(0 0)')) as geom

7.8

select
    st_memsize(st_geomfromtext('LINESTRING(0 0, 0 1)')) as geom

7.9

select
    st_memsize(
        st_geomfromtext('POLYGON((0 0, 0 1, 1 1, 1 0, 0 0))')
    ) as geom

7.10

select
    st_memsize(geom)
from
    nyc_neighborhoods
where
    neighborhood = 'College Point'

7.11

select
    st_npoints(geom) as points,
    st_geometrytype(geom) as type,
    st_numgeometries(geom) as geometries
from
    nyc_neighborhoods
where
    neighborhood = 'College Point'

7.12

select
    st_memsize(
        st_geomfromtext('MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)))')
    ) as geom

7.13

select
    st_memsize(
        st_geomfromtext(
            'MULTIPOLYGON(((0 0, 1 0, 1 1, 0 1, 0 0)), ((1 1, 2 1, 2 2, 1 2, 1 1)))'
        )
    ) as geom