The Django GDAL documentation for coord_dim says:
coord_dim
Returns or sets the coordinate dimension of this geometry. For example, the value would be 2 for two-dimensional geometries.
But how do I actually set the dimension? I’m working with three dimensional data, and trying to convert it to two dimensional data:
ds = DataSource(options['filename'])
for layer in ds:
for i in layer:
print i.geom.coord_dim
i.geom.coord_dim = 2
print i.geom.coord_dim
This doesn’t produce an error, but outputs 3 twice, and doesn’t seem to change the coordinates at all when I print those.
How do I use coord_dim to set the number of coordinates?
The underlying thing I’m trying to achieve is to transform three-dimensional data to two-dimensional data.