Cadcorp SIS API Methods

GetSpatialReferenceFromExtent Method

Description

Gets the spatial reference for an extents within a spanned cube in a Coordinate Reference System.

Syntax

Visual Basic
Public Function GetSpatialReferenceFromExtent( _
   ByVal x1 As Double, _
   ByVal y1 As Double, _
   ByVal z1 As Double, _
   ByVal x2 As Double, _
   ByVal y2 As Double, _
   ByVal z2 As Double, _
   ByVal projection As String, _
   ByVal span As Double _
) As String

Parameters

x1
The first x coordinate of the cuboid extent to be queried.
 
y1
The first y coordinate of the cuboid extent to be queried.
 
z1
The first z coordinate of the cuboid extent to be queried.
 
x2
The second x coordinate of the cuboid extent to be queried.
 
y2
The second y coordinate of the cuboid extent to be queried.
 
z2
The second z coordinate of the cuboid extent to be queried.
 
projection
The named Coordinate Reference System used in the calculation of the spatial reference.
 
span
The span of the cube used in the calculation of the spatial reference.

Return Type

A 16 character string which encodes a spatial reference.

Remarks

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 of the possible coordinates. 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.

Available: GEO ME MD OD SISpy

Groups:

Example

SpatRef = sis.GetSpatialReferenceFromExtent (540000, 230000, 0, 540123, 230234, 0, "*APrjNatGrid", 2000000)

Returns the spatial reference an item whose extents are as shown above (see also GetExtent) based on the National Grid coordinate reference system, within a 2 000 000m cube.


Send comments on this topic.

Click to return to www.cadcorp.com

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