123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- This directory contains example programs which demonstrate how to
- insert and fetch geometry data to and from a database using the
- Informix Spatial DataBlade and the Informix ODBC driver.
- On Unix, to compile and run these example programs, you need a version
- the Informix ODBC Library which is availale in th Cient SDK recommended
- for your Infomrix Server.
- I. Directory contents
- =====================
- 1. Programs which demonstrate how to load all geometry types
- -------------------------------------------------------------------------
- load_shapes.c - 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.c - Creates a table with an ST_Geometry column and
- inserts examples of all geometry types in OGIS
- WKB format, using the ST_GeomFromWKB function.
- 2. Programs which are shown as fragments in the Users Guide
- -------------------------------------------------------------------------
- asbinary.c - ST_AsBinary example.
- asshape.c - SE_AsShape example.
- geomfromshape.c - SE_GeomFromShape example.
- geomfromwkb.c - ST_GeomFromWKB example.
- interiorring.c - ST_InteriorRingN example.
- linefromshape.c - SE_LineFromShape example.
- linefromwkb.c - ST_LineFromWKB example.
- mlinefromshape.c - SE_MLineFromShape example.
- mlinefromwkb.c - ST_MLineFromWKB example.
- mpointfromshape.c - SE_MPointFromShape example.
- mpointfromwkb.c - ST_MPointFromWKB example.
- mpolyfromshape.c - SE_MPolyFromShape example.
- mpolyfromwkb.c - ST_MPolyFromWKB example.
- pointfromshape.c - SE_PointFromShape example.
- pointfromwkb.c - ST_PointFromWKB example.
- polyfromshape.c - SE_PolyFromWKB example.
- polyfromwkb.c - ST_PolyFromWKB example.
- shapetosql.c - SE_ShapeToSQL example.
- wkbtosql.c - ST_WKBToSQL example.
- 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
- odbcutils.c - Functions for establishing a server connection
- and checking ODBC library function return status.
- 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 and Linux platforms.
- For Unix and Linux, the Makefile may need to be changed to
- add platform specific compiler options may need to be specified.
- SOLARIS 32 and 64 are currently included.
-
- There is rudimentary support for Windows build by
- uncommenting the Windows only section of the Makefile.
- This makefile is designed to work with MS VS2005 and MKS.
- 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 DSN 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.
|