CreateItemB Method

Description

Creates an Item from Blob data. If a Group is open, then graphics are added to the Group, otherwise a new Item is created.

Syntax

Visual Basic
Public Function CreateItemB( _
   ByVal blob As Variant, _
   ByVal projection As String, _
   ByVal fmt As Integer _
) As Integer

Parameters

blob
The stored Item Blob data, stored in an array of bytes, or in a stream.
 
projection
The named Coordinate Reference System of the stored Item Blob. This can be defined as:
  • OGC URNs (eg 'urn:ogc:def:crs:OGC:1.3:CRS84')
  • EPSG URNs (eg 'urn:ogc:def:crs:EPSG::27700')
  • EPSG code strings (eg 'EPSG:27700')
  • EPSG URLs (eg 'http://www.example.com/epsg#27700' or 'http://www.example.com/epsg.xml#27700')
  • EPSG codes as a simple string (eg '27700')
If blank, this will default to the current 'axes' CRS.
 
fmt

The format of the stored Item Blob.

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

Remarks

If a group is open, graphics are added to the group, otherwise a new item is created. When modifying an item which is stored as a Blob in a database, it is good practice to create a temporary version of the item on an editable overlay, and only commit the changes to the database, having got the new Blob string using GetBlob, when the user is satisfied with the changes.

This allows any changes to other columns in the database table to be done in the same transaction.

Available: GEO OM OD

Group:

Example

sis.CreateItemB (blob, "*APrjNatGrid", SIS_BLOB_SIS)

Creates an item on the current overlay using the value of blob