Element: entity.sdogeom( )

Type

string func

Description

The text form of a graphic primitive suitable for insertion into an Oracle database SDO_GEOMETRY column.

Parameters

In addition to the entity name (see the examples below) the function takes 3 optional numeric parameters, which provide formatting information:

entity.sdogeom2(<entity> {,<srid> {,<precision> {,<multiple>}}})

Notes

Not all graphic primitives have Oracle equivalents.
For those that do have, the Oracle graphic type is derived from the entity type using the following rules:

Fire Type

Multiple Parameter

Oracle Type

polygon false 2003
polygon true 2007
polyline false 2002 (or 2006 for polyline with line breaks)
polyline true 2006
vector false 2002
vector true 2006
node false 2001
node true 2005
arc - 2002
circle - 2002

To cater for a limitation in Oracle parsing where there is a limit (currently 1000) on the number of vertices allowed in an SDO_GEOMETRY statement, there is also an sdogeom2 entity function available which enables a workaround.

Examples

Create a polyline entity:

entity myent = lines { (0,0), e:100, n:100, e:100 }

The function may be called in one of two ways:

tell entity.sdogeom(myent)

or

tell myent.sdogeom()

The resulting output would be as follows:

SDO_GEOMETRY(2002,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(0,0,100,0,100,100,200,100))

See Also

Functions:

entity.sdogeom2