This directory contains example ESQLC programs which demonstrate how
to insert and fetch geometry data to and from a database using the
Informix Spatial DataBlade.
I. Directory contents
=====================
1. Programs which demonstrate how to load all geometry types
-------------------------------------------------------------------------
load_shapes.ec - Creates a table with an ST_Geometry column and
inserts examples of all geometry types in ESRI
shape format, using the SE_GeomFromShape function.
load_wkb.ec - Creates a table with an ST_Geometry column and
inserts examples of all geometry types in OGIS
WKB format, using the ST_GeomFromWKB function.
geomfromshape.ec - Inserts a polygon into a table in ESRI shape format
using the SE_GeomFromShape function.
geomfromwkb.ec - Inserts a polygon into a table in OGIS WKB format
using the ST_GeomFromWKB function.
2. Programs which demonstrate how to fetch geometry data
-------------------------------------------------------------------------
asbinary.ec - Retrieves data in OGIS WKB format.
asshape.ec - Retrieves data in ESRI shape format.
3. Common code, used by all of the above programs
-------------------------------------------------------------------------
commfuncs.h - Header file containing data structure definitions,
constants and function prototypes
commfuncs.c - Functions which serialize and de-serialize
numeric data, swapping bytes if necessary
exp_chk.ec - Error handler functions.
shapefuncs.c - Functions for converting geometry data to and from
ESRI shape format.
wkbfuncs.c - Functions for converting geometry data to and from
OpenGIS Well-Known Binary format.
4. Other files
-------------------------------------------------------------------------
Readme.txt - This file.
Makefile - Makefile for compiling all programs on Unix platforms.
cleanup.sql - SQL script for dropping tables created by demo programs.
II. Setting up and running the demos
====================================
1. Running the Makefile
-----------------------
You can use the Makefile to compile each demo program individually or
compile them all at one time. To compile only a single demo, pass its
name as a command-line argument to make. Not passing any command-line
argument will cause all the demo programs to be compiled.
To successfully run the Makefile, you need to have the INFORMIXDIR
environment variable set to the directory where the Client-SDK is
installed.
The Makefile is configured for Solaris platforms. You might need
to change it slightly for other platforms.
2. Command-line arguments
-------------------------
The demo programs all take a database name and an optional SRID as
command-line arguments. If you do not specify an SRID, the programs
will use SRID = 0, which is pre-loaded into the spatial_references
table when you register the Spatial DataBlade in a database.