Maptitude GISDK Help

AddSDOLayerToWorkspace()

Summary

Adds a layer from a Oracle Spatial table to an application without it appearing in a map or dataview.

 

Syntax

AddSDOLayerToWorkspace(string layer_name, string service_name, string db_layer_name, string schema_name, array options)

 

Argument

Contents

layer_name

The desired name for the layer in the map

service_name

The name of the Oracle Spatial service

db_layer_name

The name of the Oracle Spatial table

schema_name

The name of the Oracle Spatial schema

 

Option

Type

Contents

Type

String

The feature type: "Point", "Line" or "Area" (required)

NAD Conversion

3 strings

Input datum, output datum, and conversion file (if needed); the input and output datums should be different

Projection

String, array

The projection name and the array of options

Transform

Array

Array indicating the transformation to apply to coordinates in the file. This can have three forms:

1. An array of two or more four-element arrays containing local and world coordinates for control points, for example, {{real localX1, real localY1, real longitude1, real latitude1}, ...}

2. An array of four elements - {real X_multiplier, real Y_multiplier, real X_offset, real Y_offset}

3. Center and Extent transform {c1_x, c1_y, width_1, c2_x, c2_y, width_2} where center is shifted from (c1_x,c1_y) to (c2_x,c2_y), and vector of length width_1 out of c_1 becomes a vector of length width_2 out of c_2.

 

Returns

A string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.

 

Notes

Example

lyr = AddSDOLayer(GetMap(), "Counties", "myservice", "US County", "US Data", {

{"Type", "Area"}, 

{"ID Field", "ID"}, 

{"Geometry Field", "Geom"} 

}) 

nrecs = GetRecordCount(lyr)

DropLayerFromWorkspace(lyr)

ShowMessage("There are " + String(nrecs) + " counties.")

 

Error Codes

Error Type

Meaning

Error

The service is not a valid Oracle Spatial database, or

one of the parameters is invalid

NotFound

There is no service with the specified name

 

See Also

Function

Summary

AddSDOLayer()

Adds a layer from a Oracle Spatial table to a map

 

 

©2025 Caliper Corporation www.caliper.com