importWkb methods corrupt XYZM data when importing it since the dimension is incorrectly set to 2.5D. The dimension could be checked in the methods by statement
int dimension = (nSize - 5) / (nNewNumPoints*8);
The vertex data can be correctly imported then in XYZM case using
for( i = 0; i < nPointCount; i++ ) {
memcpy( paoPoints + i, pabyData + 9 + i*32, 16 );
memcpy( padfZ + i, pabyData + 9 + 16 + i*32, 8 );
}
which should be executed if dimension == 4
This is related to #1036 and should be fixed when it is fixed. The M data is discarded in both fixes, but support for it should be added to OGR. I'd be in fact interested in doing that.