The SE_SHAPE object keeps the shape type, envelope (4-D), LLONG (or LONG, for BASIC)
array, part array and SE_COORDREF. If you bind a shape to a query stream (or, less efficiently,
use SE_stream_get_shape), then the SE_COORDREF is that of the shape in the table.
If you use SE_shape_set_coordref on a shape, it *clobbers* the previous SE_COORDREF
without changing the other variables, shifting the location in simple transform (generally
speaking, you should not ever use set_coordref without first using make_nil).
If you use SE_shape_change_coordref (either directly, of by using SE_stream_change_coordref),
it will "project" (really just transform, when without a projection or coordsys change) the shape to
retain coordinate values (as much as possible -- precision cannot be increased).
Thus, a copy utility should SE_layer_get_coordref from the target, create source and target
shapes, bind the source shape (without setting coordref), bind the target shape (ditto), fetch
the row, call change_coordref to change to copy the source shape to the target coordref in the
target shape, and execute the insert. Using the stream function would catch change_coordref
errors as stream errors, so I prefer not to use it, but you could eliminate a shape and make the
copy loop into { fetch, execute }, which has some allure.
- V