12345678910111213141516171819202122232425 |
- -- The m_test table is created with the gid integer column,
- -- which uniquely identifies the row, and the pt1 point column
- -- that stores the sample geometry.
- CREATE TABLE m_test (gid integer,
- pt1 ST_Point);
- -- The INSERT statements insert a point with measures
- -- and a point without measures.
- INSERT INTO m_test VALUES(
- 1,
- ST_PointFromText('point (10.02 20.01)', 1000)
- );
- INSERT INTO m_test VALUES(
- 2,
- ST_PointFromText('point zm (10.02 20.01 5.0 7.0)', 1000)
- );
- -- In this query the SE_M function lists the measure values of the points.
- -- Because the first point doesn't have measures, the SE_M function returns NULL.
- SELECT gid, SE_M(pt1) The_measure
- FROM m_test;
|