[postgis-users] ST_MakePoint vs. ST_MakePointM

Mike Toews mwtoews at gmail.com
Tue Oct 7 21:10:19 PDT 2014


Hi Andy,

If you look at the function definitions (\df ST_MakePoint*), all of
the geometry constructor functions use double precision types. With
Postgres, 'float' is taken to mean double precision.

As a related side note, single precision floats are called 'real' with
an alias 'float4', but these aren't used in PostGIS 2.x where
coordinate precision matters. Versions up to PostGIS 1.5 use float4
for bounding boxes.

-Mike

On 8 October 2014 13:41, Andy Becker <acbecker at gmail.com> wrote:
> Hi all - Sorry if this is a long-resolved design decision, but is there a
> good reason that MakePoint accepts double precision inputs while MakePointM
> only accepts single-precision floats?
>
>   http://postgis.net/docs/ST_MakePoint.html
>   http://postgis.net/docs/ST_MakePointM.html
>
> In my use cases single-precision resolution is not fine enough, such that
> MakePointM can't be used.  My tables will accordingly need a
> double-precision POINT geometry object and then a separate column for the
> m-value.
>
> Thanks,
> Andy


More information about the postgis-users mailing list