Element: entity.sdogeom2( )

Type

string func

Description

The text form of a graphic primitive suitable for insertion into an Oracle database SDO_GEOMETRY column via PL/SQL. This function is available as a workaround for early Oracle systems which had restrictions on the number of co-ordinates allowed in an SDO_GEOMETRY statement.

If the point count for the entity exceeds a supplied limit, a placeholder name is used to pre-store the co-ordinates, and a reference to the placeholder then used in the output. The output consequently comprises 2 string values:

  1. A list of co-ordinates, to be assigned however the application wishes.

  2. An SDO_GEOMETRY statement referencing the placeholder name for the co-ordinates.

If the point count for the entity is less than the supplied limit, then the output is 1 string value comprising a normal SDO_GEOMETRY statement. Refer to the .sdogeom entity function for full details.

Parameters

In addition to the entity name (see the examples below) the function takes 1 string parameter followed by 4 optional numeric parameters, which provide formatting information:

entity.sdogeom2(<entity>, <name> {,<limit> {,<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

Examples

Consider a polygon entity named myentwith 200 vertices.

This function may be called in one of two ways:

tell entity.sdogeom2(myent,'vertices',100)

or

tell myent.sdogeom2('vertices',100)

The resulting output would be as follows:

0,0,10,0,10,10,20,10,20,20,30,20,30,30,40,30,40,40, etc.
SDO_GEOMETRY(2003,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,2,1),SDO_ORDINATE_ARRAY(vertices))

See Also

Functions:

entity.sdogeom