Name

ST_MakePointM — Crea un punto con coordenadas x, y y un valor de medida.

Synopsis

geometry ST_MakePointM(float x, float y, float m);

Descripción

Creates a point with X, Y and M (measure) ordinates. Use ST_MakePoint to make points with XY, XYZ, or XYZM coordinates.

Use ST_SetSRID to specify a SRID for the created point.

[Note]

For geodetic coordinates, X is longitude and Y is latitude

[Note]

The functions ST_PointM, and ST_PointZM can be used to create points with an M value and a given SRID.

Ejemplos

[Note]

ST_AsEWKT is used for text output because ST_AsText does not support M values.

Create point with unknown SRID.

SELECT ST_AsEWKT(  ST_MakePointM(-71.1043443253471, 42.3150676015829, 10)  );

                                   st_asewkt
-----------------------------------------------
 POINTM(-71.1043443253471 42.3150676015829 10)

Crea un punto con coordenadas x, y y un valor de medida.

SELECT ST_AsEWKT( ST_SetSRID(  ST_MakePointM(-71.104, 42.315, 10),  4326));

                                                st_asewkt
---------------------------------------------------------
SRID=4326;POINTM(-71.104 42.315 10)

Get measure of created point.

SELECT ST_M(  ST_MakePointM(-71.104, 42.315, 10)  );

result
-------
10