def GMLstring2points(pointstring):
    """Convert list of points in string to a list of points. Works for 3D points."""
    listPoints = []
    #-- List of coordinates
    coords = pointstring.split()
    #-- Store the coordinate tuple
    assert(len(coords) % 3 == 0)
    for i in range(0, len(coords), 3):
        listPoints.append([float(coords[i]), float(coords[i+1]), float(coords[i+2])])
    return listPoints