Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Name Modified Size InfoDownloads / Week
Parent folder
README 2020-05-11 3.5 kB
Totals: 1 Item   3.5 kB 0
				SpatialND.1.0


Types and Methods Supported
===========================


Spatial Types
--------------

TYPE		SQL TYPE	Syntax	
-----------------------------------------------------------------------
Point		point		(p1 p2 ... pn)
				space separated	double values

Line Segment	lseg		(p1 p2 ... pn, q1 q2 ... qn)
				comma separated points

Circle		circle		(p1 p2 ... pn, r)
				center point followed by comma then radius

Ellipse		ellipse		(p1 p2 ... pn, a1, a2, ..., an)
				center point followed by comma separated
				axis lengths

Rectangle	rect		(p1 p2 ... pn, q1 q2 ... qn)
				comma separated points that specify
				the "lower-left" and "upper-right"
				coordinates of a major diagonal of
				an UPRIGHT (edges parallel to axes)
				rectangle

Polygon		poly		(p11 p12 ... p1n, p21 p22 ... p2n, ...
					pm1 pm2 ... pmn)
				comma separated points that specify the
				edges of an 'm' sided polygon

Poly Line	polyl		(p11 p12 ... p1n, p21 p22 ... p2n, ...
					pm1 pm2 ... pmn)
				comma separated points that specify the
				edges of an 'm' segment poly-line

SQL Methods Supported
---------------------

Procedure Name		SQL Name		Arguments
-----------------------------------------------------------------------

Utilities
---------
myStartTrace		starttrace		filename	- string const
						level		- int const

	this function initiates Informix tracing at level "level" and puts
the resulte in /tmp/<filename>.trc


Predicates
----------
spbCompare		compare			spatial type, spatial type
	this function compares two spatial types


spbEquals		equal			spatial type, spatial type
	this function tests two spatial types for equality

spbOverlaps		overlap			spatial type, spatial type
	this function tests whether two spatial objects overlap

spbContains		contains		spatial type, spatial type
	this function tests whether the 1st object properly contains the 2nd

spbWithin		within			spatial type, spatial type
	this function is the commutator of "contains"


Rtree Support Methods
---------------------
spbUnion		union			type, type, type
	this function computes the union of two objects and creates a third

spbSize			size			type, double value
	this function computes the "size" of an object and returns it

spbInter		inter			type, type, type
	this function computes the intersection of two types and creates a third


Type Constructor Methods
------------------------
xrtMakeSegFromText	makeseg			string const
xrtMakeSegFromPoints				point, point
	these functions are line segment constructors


xrtMakeCircleFromText	makecircle		string const
	this function is a circle constructor


xrtMakeRectFromText	makerect		string const
xrtMakeRectFromPoints				point, point
	these functions are rectangle constructors

xrtMakePolyFromTest	makepoly		string const
	this function is a polygon constructor


Notes:
======
I chose to support only "upright" rectangles because of their utility
and simplicity.  I also had so much code that worked w/ them, that
I didn't think of rotated ones until someone mentioned them.  Those
kind can be implemented as polygons, though the processing of them will be
much slower and they will take up a lot more room - esp for higher dimensions.

An insight into types (aka why constructors from text)


Caveats:
========
N-dimensional (for n> 2) circles, ellipses and certainly polygons
and poly-lines are currently only marginally supported.

Do to the way Informix invokes user methods to build Rtrees, only objects
of the same dimensionality can be inserted into an index.
Source: README, updated 2020-05-11