Regarding ST_SharedPaths(), somebody told me:
I can assure you (after checking the source code) that SpatiaLite
returns exactly the result it receives from GEOS, so I deduce that it's
GEOS that resets the M coordinates to ZERO.
Unfortunately, the GEOS documentation says absolutely nothing about
this, but it's quite common for topological operations to ignore the M
coordinate, which doesn't surprise me at all. It should also be noted
that these details could easily change from one version of GEOS to
another.
To sum up: there are probably many GEOS-based functions inside
SpatiaLite that present problems of this type. But when the GEOS doc is
obscure or incomplete it's practically impossible to keep track of it.
Regarding
ST_SharedPaths(), somebody told me: