Spherical.Htm.Sql Class Reference

Encapsulates the HTM procedures for use from SQL2005. More...

List of all members.

Static Public Member Functions

static SqlString fHtmVersion ()
 fHtmVersion() returns the version number of this htm library as a string
static long fHtmXyz (double x, double y, double z)
 fHtmXyz(x,y,z) returns the 20-deep HtmID of the given cartesian point.
There are no error cases. All vectors are nomalized and 0,0,0 maps to 1,0,0
static long fHtmEq (double ra, double dec)
 fHtmEq(ra,dec) returns the 20-deep HtmID of the given equatorial point.
There are no error cases. all RA, folded to [0..360] and dec to [-90...90]
static long fHtmLatLon (double lat, double lon)
 fHtm(lat,lon) returns the 20-deep HtmID of the given location.
There are no error cases. all RA, folded to [0..360] and dec to [0...90]
static SqlDouble fDistanceEq (double ra1, double dec1, double ra2, double dec2)
 double fDistanceEq(ra1,dec1,ra2,dec2) returns distance in ArcMinutes between two points.
static SqlDouble fDistanceLatLon (double lat1, double lon1, double lat2, double lon2)
 double fDistanceLatLon(lat1,lon1,lat2,lon2) returns distance in ArcMinutes between two points.
static SqlDouble fDistanceXyz (double x1, double y1, double z1, double x2, double y2, double z2)
 double fDistanceXyz(x1,y1,z1,x2,y2,z2) returns distance in ArcMinutes between two points.
static SqlString fHtmToString (SqlInt64 HtmID)
 fHtmToString(HtmID) returns varchar(max)a string describing the HtmID
static IEnumerable fHtmLatLonToXyz (SqlDouble lat, SqlDouble lon)
 XyzTable(x,y,z) fHtmLatLonToXyz(lat, lon) converts an lat,lon point to a table with one row containing the cartesian point (x,y,z).
static IEnumerable fHtmEqToXyz (SqlDouble ra, SqlDouble dec)
 XyzTable(x,y,z) fHtmEqToXyz(ra, dec) converts an equitorial point to a table with one row containing the cartesian point (x,y,z).
static IEnumerable fHtmXyzToLatLon (SqlDouble x, SqlDouble y, SqlDouble z)
 LatLonTable(lat,lon) fHtmXyzToLatLon(x,y,z) converts the cartesian point (x,y,z) to a table with one row containing the equivalent lat,lon point.
static IEnumerable fHtmXyzToEq (SqlDouble x, SqlDouble y, SqlDouble z)
 EqTable(ra, dec) fHtmXyzToEq(x,y,z) converts the cartesian point (x,y,z) to a table with one row containing the equivalent equitorial (ra,dec) point.
static IEnumerable fHtmToCenterPoint (SqlInt64 HtmID)
 fHtmToCenterPoint(HtmID) converts an HTM triangle ID to an (x,y,z) vector of the HTM triangle centerpoint.
and returns that vector as the only row of a table.
static IEnumerable fHtmToCornerPoints (SqlInt64 HtmID)
 fHtmToCornerPoints(HtmID) converts an HTM triangle ID to an table of three (x,y,z) vectors of the HTM triangle corners.
static IEnumerable fHtmCoverCircleLatLon (SqlDouble lat, SqlDouble lon, SqlDouble radiusArcMin)
 fHtmCoverCircleLatLon(ra,dec,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that lat,lon, within that arc-minute radius.
A trixel table is a list of HtmIDStart,HtmIDEnd pairs that describe
the HTM triangles (all points of a triangle are between its HtmIDStart and HtmIDEnd.
static IEnumerable fHtmCoverCircleEq (SqlDouble ra, SqlDouble dec, SqlDouble radiusArcMin)
 fHtmCoverCircleEq(ra,dec,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that J2000 ra,dec, within that arc-minute radius.
A trixel table is a list of HtmStart,HtmStop pairs that describe
the HTM triangles (all points of a triangle are between its HtmStart and HtmStop.
static IEnumerable fHtmCoverCircleXyz (SqlDouble x, SqlDouble y, SqlDouble z, SqlDouble radiusArcMin)
 fHtmCoverCircleXyz(x,y,z,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that x,y,z, within that arc-minute radius.
A trixel table is a list of HtmIDStart,HtmIDEnd pairs that describe
the HTM triangles (all points of a triangle are between its HtmIDStart and HtmIDEnd.
static IEnumerable fHtmCoverList (SqlString coverspec)
 fHtmCoverList(regionspec) returns a list of HtmID's that describe the HTM triangles covering the region.
static IEnumerable fHtmCoverRegionSelect (SqlString coverspec, SqlString kind)
 fHtmCoverRegionSelect(regionspec) returns a the qualified list of HtmIDStart,HtmIDEnd pairs
that describe the level 20 trixels covering the region.
static IEnumerable fHtmCoverRegion (SqlString coverspec)
static IEnumerable fHtmCoverTypedRegion (SqlString coverspec)
 fHtmCoverTypedRegion(region) returns a list of HtmStart,HtmStop pairs
that describe the HTM triangles covering the region. Full and Partial triangles. are treated separately.
static IEnumerable fHtmRegionToTable (SqlString coverspec)
 fHtmRegionToTable(region) converts a region definiton a table of halfspaces
static SqlString fHtmRegionToNormalFormString (SqlString coverspec)
 fHtmRegionToNormalFormString(coverspec) converts a region definiton to normal form
static SqlString fHtmRegionError (SqlString coverspec)
 fHtmRegionError(coverspec) returns diagnostic message appropriate for a bad region string

Classes

class  AugPair
 AugPair is a pair of HtmID's with a flag.
It defines the format of IEnumerable list elements returned by the htm cover functions
that treat partial and full separately
These lists are recast as tables of the form T(HTM_start bigint, HTM_end bigint, full bool) where full = true means range consists of full trixels, else partial.
class  DPair
 DPair is a pair of doubles
It defines the format of IEnumerable list elements returned by the ..ToLatLon functions.
These lists are recast as tables of the form T(ra float, dec float) as well as lat and lon.
class  HSEntry
 HSentry is a halfspace entry in a row: convexID halfspaceID x y z D.
class  Pair
 Pair is a pair of HtmID pair.
It defines the format of IEnumerable list elements returned by the htm cover functions.
These lists are recast as tables of the form T(HTM_start bigint, HTM_end bigint).
class  Scalar
 Scalar is a 1-tuple of HtmID.
It defines the format of IEnumerable list elements returned by the htm cover list function.
These lists are recast as tables of the form T(HTM_id bigint).
class  Triple
 Triple is a is an X, Y, Z vector in Cartesian space.
It defines the format of IEnumerable list elements returned by the htmToVerticies function.
These lists are recast a a table of the form T(x float, y float, z float).


Detailed Description

Encapsulates the HTM procedures for use from SQL2005.


Member Function Documentation

static SqlString Spherical.Htm.Sql.fHtmVersion (  )  [static]

fHtmVersion() returns the version number of this htm library as a string

Returns:
sqlString: a string telling the version number.

Typically: "Spherical.HTM 3.1.0 (Release - Build 1)"
                            create function fHtmVersion() returns nvarchar(max)
                                    as external name HTM.Sql.fHtmVersion
                            declare @version nvarchar(max)
                                        select @version = dbo.fHtmVersion()

static long Spherical.Htm.Sql.fHtmXyz ( double  x,
double  y,
double  z 
) [static]

fHtmXyz(x,y,z) returns the 20-deep HtmID of the given cartesian point.
There are no error cases. All vectors are nomalized and 0,0,0 maps to 1,0,0

Parameters:
x double, x Cartesian coordinate
y double, y Cartesian coordinate
z double, z Cartesian coordinate
Returns:
HtmID: Int64 20-deep HTM id of the point
                            create function fHtmXyz(@x float, @y float, @z float) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmXyz
                            declare @HtmID bigint
                                        select @HtmID = dbo.fHtmXyz(1,0,0)

See also:
fHtmEq()

uses eqatorial.

static long Spherical.Htm.Sql.fHtmEq ( double  ra,
double  dec 
) [static]

fHtmEq(ra,dec) returns the 20-deep HtmID of the given equatorial point.
There are no error cases. all RA, folded to [0..360] and dec to [-90...90]

Parameters:
ra double, right ascencion coordinate (degrees)
dec double, declination coordinate (degrees)
Returns:
HtmID: Int64 20-deep HTM id of the point
                            create function fHtmEq(@ra float, @dec float ) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmEq
                            declare @HtmID bigint
                                        select @HtmID = dbo.fHtmEq(195,5) -- 

See also:
fHtmXyz()

uses cartesian.

static long Spherical.Htm.Sql.fHtmLatLon ( double  lat,
double  lon 
) [static]

fHtm(lat,lon) returns the 20-deep HtmID of the given location.
There are no error cases. all RA, folded to [0..360] and dec to [0...90]

Parameters:
lat double, latitude coordinate (degrees)
lon double, longitude coordinate (degrees)
Returns:
HtmID: Int64 20-deep HTM id of the point
                            create function fHtmLatLon(@lat float, @lon float ) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmLatLon
                            declare @HtmID bigint
                                        select @HtmID = dbo.fHtmLatLon(5, 195) -- output defaults to ''

See also:
fHtmXyz()

uses cartesian.

See also:
fHtmEq()

uses J2000 (ra/dec).

static SqlDouble Spherical.Htm.Sql.fDistanceEq ( double  ra1,
double  dec1,
double  ra2,
double  dec2 
) [static]

double fDistanceEq(ra1,dec1,ra2,dec2) returns distance in ArcMinutes between two points.

Parameters:
ra1 double, right ascencion coordinate (degrees)
dec1 double, declination coordinate (degrees)
ra2 double, right ascencion coordinate (degrees)
dec2 double, declination coordinate (degrees)
Returns:
double distance in arc minutes.
                            create function fDistanceEq(@ra1 float, @dec1 float, @ra2 float, @dec2 float) 
                                                        returns float
                                                                 as external name HTM.Sql.fDistanceEq
                                        select dbo.fDistanceEq(0,0,30,30)
--------------------------------------------------------------

static SqlDouble Spherical.Htm.Sql.fDistanceLatLon ( double  lat1,
double  lon1,
double  lat2,
double  lon2 
) [static]

double fDistanceLatLon(lat1,lon1,lat2,lon2) returns distance in ArcMinutes between two points.

Parameters:
lat1 double, latitude coordinate (degrees)
lon1 double, longitude coordinate (degrees)
lat2 double, latitude coordinate (degrees)
lon2 double, longitude coordinate (degrees)
Returns:
double distance in arc minutes.
                            create function fDistanceLatLon(@lat1 float, @lon1 float, @lat2 float, @lon2 float) 
                                                        returns float
                                                                 as external name HTM.Sql.fDistanceLatLon
                                        select dbo.fDistanceLatLon(0,0,30,30)
--------------------------------------------------------------

static SqlDouble Spherical.Htm.Sql.fDistanceXyz ( double  x1,
double  y1,
double  z1,
double  x2,
double  y2,
double  z2 
) [static]

double fDistanceXyz(x1,y1,z1,x2,y2,z2) returns distance in ArcMinutes between two points.

Parameters:
x1 double, first x Cartesian coordinate
y1 double, first y Cartesian coordinate
z1 double, first z Cartesian coordinate
x2 double, second x Cartesian coordinate
y2 double, second y Cartesian coordinate
z2 double, second z Cartesian coordinate
Returns:
double distance in arc minutes.
                            create function fDistanceXyz(@x1 float, @y1 float, @z1 float, 
                                                         @x2 float, @y2 float, @z2 float) 
                                                        returns float
                                                                 as external name HTM.Sql.fDistanceXyz
                                        select dbo.fDistanceEq(0,0,0,0,0,1)
--------------------------------------------------------------

static SqlString Spherical.Htm.Sql.fHtmToString ( SqlInt64  HtmID  )  [static]

fHtmToString(HtmID) returns varchar(max)a string describing the HtmID

Parameters:
HtmID the ID to be translated
Returns:
varchar(max)
                            create function fHtmToString(HtmID) 
                                                        returns varchar(max) 
                                    as external name HTM.Sql.fHtmToString
                            
                                        print dbo.fHtmToString(dbo.fHtmXyz(1,0,0))

static IEnumerable Spherical.Htm.Sql.fHtmLatLonToXyz ( SqlDouble  lat,
SqlDouble  lon 
) [static]

XyzTable(x,y,z) fHtmLatLonToXyz(lat, lon) converts an lat,lon point to a table with one row containing the cartesian point (x,y,z).

Parameters:
lat double, latitude coordinate (degrees)
lon double, longitude coordinate (degrees)
Returns:
IEnummerable VertexTable(x float, y float, z float)
with a row contining the (x,y,z) of a lat,lon point.
                            create function fHtmLatLonToXyz(lat float, lon float) 
                                                        returns VertexTable(x float, y float, z float) 
                                                                 as external name HTM.Sql.fHtmLatLonToXyz
                                        select * from  fHtmLatLonToXyz(115, 38)

See also:
fHtmXyzToLatLon()

converts xyz to lat,lon.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmEqToXyz ( SqlDouble  ra,
SqlDouble  dec 
) [static]

XyzTable(x,y,z) fHtmEqToXyz(ra, dec) converts an equitorial point to a table with one row containing the cartesian point (x,y,z).

Parameters:
ra double, right ascencion coordinate (degrees)
dec double, declination coordinate (degrees)
Returns:
IEnummerable VertexTable(x float, y float, z float)
with a row contining the (x,y,z) of a ra,dec point.
                            create function fHtmEqXyz(lat float, lon float) 
                                                        returns VertexTable(x float, y float, z float) 
                                                                 as external name HTM.Sql.fHtmEqToXyz
                                        select * from  fHtmEqToXyz(115, 38)

See also:
fHtmXyzToEq()

converts xyz to ra, dec.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmXyzToLatLon ( SqlDouble  x,
SqlDouble  y,
SqlDouble  z 
) [static]

LatLonTable(lat,lon) fHtmXyzToLatLon(x,y,z) converts the cartesian point (x,y,z) to a table with one row containing the equivalent lat,lon point.

Parameters:
x double, unit vector cartesian "x"
y double, unit vector cartesian "x"
z double, unit vector cartesian "x"
Returns:
IEnummerable LatLonTable(lat float, lon float)
with a row contining the (lat, lon) of the cartesian xyz point.
                            create function fHtmXyzToEq(x float, y float, z float) 
                                                        returns LatLonTable(lat float, lon float) 
                                                                 as external name HTM.Sql.fHtmXyzToLatLon
                                        select * from fHtmXyzToLatLon(1,0,0)

See also:
fHtmLatLonToXyz()

converts lat, lon to xyz.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmXyzToEq ( SqlDouble  x,
SqlDouble  y,
SqlDouble  z 
) [static]

EqTable(ra, dec) fHtmXyzToEq(x,y,z) converts the cartesian point (x,y,z) to a table with one row containing the equivalent equitorial (ra,dec) point.

Parameters:
x double, unit vector cartesian "x"
y double, unit vector cartesian "x"
z double, unit vector cartesian "x"
Returns:
IEnummerable EqTable(ra float, dec float)
with a row contining the (ra, dec) of the cartesian xyz point.
                            create function fHtmXyzToEq(x float, y float, z float) 
                                                        returns EqTable(ra float, dec float) 
                                                                 as external name HTM.Sql.fHtmXyzToEq
                                        select * from  fHtmXyzToEq(1,0,0)

See also:
fHtmEqToXyz()

converts ra, dec to xyz.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmToCenterPoint ( SqlInt64  HtmID  )  [static]

fHtmToCenterPoint(HtmID) converts an HTM triangle ID to an (x,y,z) vector of the HTM triangle centerpoint.
and returns that vector as the only row of a table.

Parameters:
HtmID long: the htm ID of the triangle. an unsigned bigint.
Returns:
IEnummerable VertexTable(x float, y float, z float)
with one row contining the HTM triangle centerpoint.
                            create function fHtmToCenterPoint(@htmID bigint.) 
                                                        returns VertexTable(x float, y float, z float) 
                                                                 as external name HTM.Sql.fHtmToCenterPoint
                                        select * from  fHtmToCenterPoint(dbo.fHtmXyz(.57735,.57735,.57735))
                    <br> gives: 0.577350269189626, 0.577350269189626, 0.577350269189626 

See also:
fHtmToCornerPoints()

gives triangle corner points.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmToCornerPoints ( SqlInt64  HtmID  )  [static]

fHtmToCornerPoints(HtmID) converts an HTM triangle ID to an table of three (x,y,z) vectors of the HTM triangle corners.

Parameters:
HtmID long: the htm ID of the triangle. an unsigned bigint.
Returns:
IEnummerable VertexTable(x float, y float, z float)
with each row contining the (x,y,z) of a triangle corner point.
                            create function fHtmTovertices(@htmID bigint.) 
                                                        returns VertexTable(x float, y float, z float) 
                                                                 as external name HTM.Sql.fHtmTovertices
                                        select * from  fHtmToCornerPoints(8)
                                        gives: x y z
                                               1 0 0
                                               0 0 -1
                                               0 1 0

See also:
fHtmToCenterPoint()

gives triangle center point.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverCircleLatLon ( SqlDouble  lat,
SqlDouble  lon,
SqlDouble  radiusArcMin 
) [static]

fHtmCoverCircleLatLon(ra,dec,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that lat,lon, within that arc-minute radius.
A trixel table is a list of HtmIDStart,HtmIDEnd pairs that describe
the HTM triangles (all points of a triangle are between its HtmIDStart and HtmIDEnd.

Parameters:
lat double, latitude of centerpoint (degrees)
lon double, longitude of centerpoint (degrees)
radiusArcMin double, radius in arcminutes
Returns:
IEnummerable(HtmIDStart bigint, HtmIDend bigint)
                            create function fHtmCoverCircleLatLon(@lat float, @lon float, @radiusArcMin float) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmCoverCircleLatLon
                                        select * from fHtmCoverCircLatLon(5,195,1) 

See also:
fHtmCoverCircleXyz()

uses cartesian.

See also:
fHtmCoverCircleEq()

uses J2000.

See also:
fHtmCover()

uses string definition.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverCircleEq ( SqlDouble  ra,
SqlDouble  dec,
SqlDouble  radiusArcMin 
) [static]

fHtmCoverCircleEq(ra,dec,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that J2000 ra,dec, within that arc-minute radius.
A trixel table is a list of HtmStart,HtmStop pairs that describe
the HTM triangles (all points of a triangle are between its HtmStart and HtmStop.

Parameters:
ra double, right ascencion of centerpoint (degrees)
dec double, declination of centerpoint (degrees)
radiusArcMin double, radius in arcminutes
Returns:
IEnummerable(HtmIDStart bigint, HtmIDStop bigint)
                            create function fHtmCoverCircleEq(@ra float, @dec float, @radiusArcMin float) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmCoverCircleEq

See also:
fHtmCoverCircleXyz()

uses cartesian.

See also:
fHtmCover()

uses string definition.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverCircleXyz ( SqlDouble  x,
SqlDouble  y,
SqlDouble  z,
SqlDouble  radiusArcMin 
) [static]

fHtmCoverCircleXyz(x,y,z,radiusArcMin) returns a trixel table (a list) covering
the circle centered at that x,y,z, within that arc-minute radius.
A trixel table is a list of HtmIDStart,HtmIDEnd pairs that describe
the HTM triangles (all points of a triangle are between its HtmIDStart and HtmIDEnd.

Parameters:
x double, x Cartesian coordinate of centerpoint
y double, y Cartesian coordinate of centerpoint
z double, z Cartesian coordinate of centerpoint
radiusArcMin double, radius in arcminutes
Returns:
IEnummerable TrixelTable(HtmIDStart bigint, HtmIDend bigint)
                            create function fHtmCoverCircleXyz(@x float, @y float, @z float, @radiusArcMin float) 
                                                        returns bigint 
                                    as external name HTM.Sql.fHtmCoverCircleXyz
                            declare @HtmID bigint
                                        select * from fHtmCoverCircleXyz(1,0,0,1) 

See also:
fHtmCoverCircleEq()

uses J2000.

See also:
fHtmCover()

uses string definition.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverList ( SqlString  coverspec  )  [static]

fHtmCoverList(regionspec) returns a list of HtmID's that describe the HTM triangles covering the region.

Parameters:
coverspec a string satisfying the region syntax
Returns:
IEnummerable(HtmID bigint)
                    create function fHtmCoverList(@region nvarchar(max)) 
                          returns table  (HtmID bigint)
                          as external name HTM.Sql.fHtmCoverList
                        select * from fHtmCoverList('CIRCLE J2000 195 0 1')

See also:
fHtmCoverRegion()

gives table of HtmID ranges.

See also:
fHtmCoverError()

gives diagnostic message.

See also:
fHtmCircleEq()

Equatorial circle.

See also:
fHtmCircleXyz()

Cartesian circle.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverRegionSelect ( SqlString  coverspec,
SqlString  kind 
) [static]

fHtmCoverRegionSelect(regionspec) returns a the qualified list of HtmIDStart,HtmIDEnd pairs
that describe the level 20 trixels covering the region.

Parameters:
coverspec a string satisfying the region syntax
kind "Partial", "Full" or "Both"
Returns:
IEnummerable(HtmIDStart bigint, HtmIDend bigint)
                    create function fHtmCoverRegionSelect(@region nvarchar(max), @kind nvarchar(max))
                                                returns table  (HtmIDstart bigint, HtmIDend bigint)
                                                         as external name HTM.Sql.fHtmCoverRegionSelect
                        select * from fHtmCoverRegionSelect('CIRCLE J2000 195 0 1', 'full')

See also:
fHtmCoverError()

gives diagnostic message.

See also:
fHtmCircleEq()

Equatorial circle.

See also:
fHtmCircleXyz()

Cartesian circle.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverRegion ( SqlString  coverspec  )  [static]

fHtmCoverRegion(region) returns a list of HtmStart,HtmStop pairs
that describe the HTM triangles covering the region.

Parameters:
coverspec a string satisfying the region syntax
Returns:
IEnummerable(HtmIDStart bigint, HtmIDend bigint)
                            create function fHtmCoverRegion(@region nvarchar(max)) 
                                                        returns table  (HtmIDstart bigint, HtmIDend bigint)
                                                                 as external name HTM.Sql.fHtmCover
                                select * from fHtmCoverRegion('CIRCLE J2000 195 0 1')

See also:
fHtmCoverError()

gives diagnostic message.

See also:
fHtmCircleEq()

Equatorial circle.

See also:
fHtmCircleXyz()

Cartesian circle.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmCoverTypedRegion ( SqlString  coverspec  )  [static]

fHtmCoverTypedRegion(region) returns a list of HtmStart,HtmStop pairs
that describe the HTM triangles covering the region. Full and Partial triangles. are treated separately.

Parameters:
coverspec a string satisfying the region syntax
Returns:
IEnummerable(HtmIDStart bigint, HtmIDend bigint, flag smallint)
                    create function fHtmCoverTypedRegion(@region nvarchar(max)) 
                                                returns table  (HtmIDstart bigint, HtmIDend bigint, flag smallint)
                                                         as external name HTM.Sql.fHtmCover
                        select * from fHtmCoverTypedRegion('CIRCLE J2000 195 0 1')

See also:
fHtmCoverRegion()

gives diagnostic message.

See also:
fHtmCoverError()

gives diagnostic message.

See also:
fHtmCircleEq()

Equatorial circle.

See also:
fHtmCircleXyz()

Cartesian circle.

--------------------------------------------------------------

static IEnumerable Spherical.Htm.Sql.fHtmRegionToTable ( SqlString  coverspec  )  [static]

fHtmRegionToTable(region) converts a region definiton a table of halfspaces

Parameters:
coverspec a string satisfying the region syntax
Returns:
Table of Halfspaces:
This looks something like REGION CONVEX 1 0 0 0 0 1 0 0 CONVEX 0 0 1 0
                            create function fHtmRegionToTable(@region nvarchar(max)) 
                                                        returns table  (convexid int, halfspaceid int, x double, y double, z double, D double)
                                                                 as external name HTM.Sql.fHtmRegionToTable
                                        select * from dbo.fHtmRegionToTable('CIRCLE J2000 195 0 1')

--------------------------------------------------------------

static SqlString Spherical.Htm.Sql.fHtmRegionToNormalFormString ( SqlString  coverspec  )  [static]

fHtmRegionToNormalFormString(coverspec) converts a region definiton to normal form

Parameters:
coverspec a string satisfying the region syntax
regionSpec := REGION {areaSpec}* | areaSpec
circleSpec := CIRCLE J2000 ra dec radArcMin
  | CIRCLE LATLON lat lon radArcMin
| CIRCLE [CARTESIAN ] x y z radArcMin
rectSpec := RECT LATLON {lat lon}2
| RECT J2000 {ra dec }2
| RECT [CARTESIAN ] {x y z }2
polySpec := POLY LATLON {lat lon}3+
| POLY J2000 {ra dec }3+
| POLY [CARTESIAN ] {x y z }3+
hullSpec := CHULL LATLON {lat lon}3+
| CHULL J2000 {ra dec }3+
| CHULL [CARTESIAN ] {x y z }3+
convexSpec := CONVEX LATLON {lat lon}*
| CONVEX J2000 {ra dec }*
| CONVEX [CARTESIAN ]{x y z }*
areaSpec := circleSpec | rectSpec | polySpec | hullSpec | convexSpec
Returns:
region String SqlString region in normal form ( a union of convexes)
This looks something like 'REGION CONVEX 1 0 0 0 0 1 0 0 CONVEX 0 0 1 0'
                    create function fHtmRegionToNormalFormString(@region nvarchar(max)) 
                        returns table  (HtmID_start bigint, HtmID_end bigint)
                        as external name HTM.Sql.fHtmToNormalForm
                    select dbo.fHtmRegionToNormalFormString('CIRCLE J2000 195 0 1')

--------------------------------------------------------------

static SqlString Spherical.Htm.Sql.fHtmRegionError ( SqlString  coverspec  )  [static]

fHtmRegionError(coverspec) returns diagnostic message appropriate for a bad region string

Parameters:
coverspec a string satisfying the region syntax
Returns:
diagnostic message: varchar(max)
OK if ok
else message and a syntax string.
                            create function fHtmRegionError(@region nvarchar(max)) 
                                                        returns varchar(max)
                                                                 as external name HTM.Sql.fHtmRegionError
                                        print dbo.fHtmRegionError('CIRCLE LATLON 195 ')

See also:
fHtmCover()

the main routine

--------------------------------------------------------------


The documentation for this class was generated from the following file:
May 27, 2007 György Fekete V 3.1.2