changing coordref of a shape in SDE

changing coordref of a shape in SDE

Post by Jens Keuche » Tue, 21 Mar 2000 04:00:00


I want to change the coordref of a shape from an SDE layer
to another coordref. I found the "SE_shape_change_coordref"
function, which can do that, but this function needs a
"geogtran", which I don't have and which isn't predefined in
the list in "pef.h".

Does anyone know if it's possible to change the coordref without
knowing about the transformation method and parameters? And how?

 Jens Keuchel
 ZGDV (Computer Graphics Center)   | Phone:  +49-6151-155-185

 D-64283 Darmstadt, Germany


changing coordref of a shape in SDE

Post by T. A. Dun » Wed, 22 Mar 2000 04:00:00

(This explanation assumes that you wish to do this using the SDE C API.)
Changing the coordref object embedded in a shape will not transform the
shape to the new coordinate reference. That is, the values of the
vertices will not be changed. You need to use the Projection Engine to
do that. The Projection Engine API comes with SDE.
The simplest way is to use pe_proj_to_geog() to convert to geographic
coordinates, then use pe_geog_to_proj() to convert to the projection
that you want. If you use a pre-defined coordref, then this is a simple
matter. If you need to define your own coordref, there is an example in
the Projection Engine guide.
If you are going to do this for an entire layer, then make sure that
you change the coordref metadata in the LAYERS table by using
SE_layer_get_info(), SE_layerinfo_set_coordref() and SE_layer_set_info
T. A. Dunn - Views expressed herein are exclusively mine
and not those of my employer or anyone else.

Sent via
Before you buy.