Cadcorp SIS API Methods

CreateDbBlobOverlay Method

Description

Creates an overlay which views Blobs stored in a database.

Syntax

Visual Basic
Public Function CreateDbBlobOverlay( _
   ByVal pos As Integer, _
   ByVal prj As String, _
   ByVal rs As String, _
   ByVal fmt As Integer, _
   ByVal nfBlob As Integer, _
   ByVal nfId As Integer, _
   ByVal nfVer As Integer, _
   ByVal nfSr As Integer, _
   ByVal nfSlMin As Integer, _
   ByVal nfSlMax As Integer, _
   ByVal span As Double _
) As Integer

Parameters

pos
The position in the overlays list at which to insert the overlay. If this argument specifies a position in the existing overlays then the new overlay will not replace the existing overlay at the given position, but will shuffle any other overlays down the list.
 
prj
The named projection of the stored Item Blobs.
 
rs
A named recordset previously created using DefineRecordset.
 
fmt

The format of the Item Blob.

SIS_BLOB_SIS_V6_ASCII 0 = Cadcorp SIS format
SIS_BLOB_OGIS_WKB 1 = OGC Well-Known-Binary format
SIS_BLOB_OGIS_WKT 2 = OGC Well-Known-Text format
SIS_BLOB_OGIS_GML 3 = OGC Geographic Markup Language
SIS_BLOB_ESRI_SHP 4 = ESRI Shape (*.shp)
SIS_BLOB_SIS_BIN_ITEM 5 = Binary item
SIS_BLOB_GEOJSON 6 = Geographic Objects for JSON format
 
nfBlob
The index in the recordset columns argument of the Item Blob string column. This column must exist.
 
nfId
The index in the recordset columns argument of the Item id column. A value of -1 will make Cadcorp SIS generate the Item id-s automatically.
 
nfVer
The index in the recordset columns argument of the Item version column. A value of -1 indicates that no version information is being supplied.

nfSr
The index in the recordset columns argument of the Item spatial reference column. A value of -1 indicates that no spatial reference is being supplied.
 
nfSlMin

This parameter is currently ignored, please use -1 for future compatibility.

The index in the recordset columns argument of the Item minimum scale threshold column. A value of -1 indicates that no minimum scale threshold is being supplied.

nfSlMax

This parameter is currently ignored, please use -1 for future compatibility.

The index in the recordset columns argument of the Item maximum scale threshold column. A value of -1 indicates that no maximum scale threshold is being supplied.

span
The span used in the spatial reference (see GetSpatialReference).

Remarks

Available: GEO MD MM ME OD OM SISpy

Groups:

Example

sis.CreateDbBlobOverlay(0, "*APrjNatGrid", "rsB lobs", SIS_BLOB_SIS, 3, 0, 1, 2, -1, -1, 2000000)

Creates a View Blobs overlay at position 0 in the overlays list

SIS_BLOB_SISa constant defined in GisLink.bas (and SisConst.vb)
3the binary data (the graphics) are in column 3 of the table
0the item ID is in column 0 of the table
1the item version is in column 1 of the table
2the spatial reference is in column 2 of the table
-1max and min scale thresholds cannot be set in the current release
2000000  The spatial reference string encodes a position and a radius which together describe an extents circle. The span used when calculating a spatial reference must be big enough to cover all the possible co-ordinates. A smaller span will give spatial references with a finer resolution. The spatial reference does not affect the accuracy or resolution of the positions of the item it is associated with, only the accuracy of whether or not the item is loaded in a particular view. The worst that can happen with a coarse resolution is that extra items are loaded.

When creating an overlay in this way, it is essential that you know the structure of the database table, so you can set the correct arguments for the DefineRecordset and CreateDbBlobOverlay methods.

Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).