[postgis-users] LinestringM with one point

Poul Bondo poul.bondo at gmail.com
Tue Sep 21 07:32:23 PDT 2021


Hello

We have been using postgis for the past 7-8 years for storing a lot of 
ship tracks in PostgreSQL.

We are storing the data with one record per vessel per day as 
geography(linestringm) of position reports with a timestamp in the M part.

In many cases we only have one position per day and thus have stored a 
linestringm with length = 1.

Until now this has not caused problems.

In the documentation for the upcoming PostGIS 3.2.0 a new section has 
been added including the statement:

"A LineString must have at least two points." and by extension we assume 
this will be the case for linestringM also

Also we discovered a problem when using replication which uses COPY in 
some cases which works fine and INSERT which does not work in other 
cases when using linestringM with length = 1

Is there a significant reason for having / adding this requirement and 
if so are there any recommendation on how to handle the scenario with 
only one sample?

Thanks

Poul



More information about the postgis-users mailing list