Readme.txt 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. This directory contains example programs which demonstrate how to
  2. insert and fetch geometry data to and from a database using the
  3. Informix Spatial DataBlade and the Informix ODBC driver.
  4. On Unix, to compile and run these example programs, you need a version
  5. the Informix ODBC Library which is availale in th Cient SDK recommended
  6. for your Infomrix Server.
  7. I. Directory contents
  8. =====================
  9. 1. Programs which demonstrate how to load all geometry types
  10. -------------------------------------------------------------------------
  11. load_shapes.c - Creates a table with an ST_Geometry column and
  12. inserts examples of all geometry types in ESRI
  13. shape format, using the SE_GeomFromShape function.
  14. load_wkb.c - Creates a table with an ST_Geometry column and
  15. inserts examples of all geometry types in OGIS
  16. WKB format, using the ST_GeomFromWKB function.
  17. 2. Programs which are shown as fragments in the Users Guide
  18. -------------------------------------------------------------------------
  19. asbinary.c - ST_AsBinary example.
  20. asshape.c - SE_AsShape example.
  21. geomfromshape.c - SE_GeomFromShape example.
  22. geomfromwkb.c - ST_GeomFromWKB example.
  23. interiorring.c - ST_InteriorRingN example.
  24. linefromshape.c - SE_LineFromShape example.
  25. linefromwkb.c - ST_LineFromWKB example.
  26. mlinefromshape.c - SE_MLineFromShape example.
  27. mlinefromwkb.c - ST_MLineFromWKB example.
  28. mpointfromshape.c - SE_MPointFromShape example.
  29. mpointfromwkb.c - ST_MPointFromWKB example.
  30. mpolyfromshape.c - SE_MPolyFromShape example.
  31. mpolyfromwkb.c - ST_MPolyFromWKB example.
  32. pointfromshape.c - SE_PointFromShape example.
  33. pointfromwkb.c - ST_PointFromWKB example.
  34. polyfromshape.c - SE_PolyFromWKB example.
  35. polyfromwkb.c - ST_PolyFromWKB example.
  36. shapetosql.c - SE_ShapeToSQL example.
  37. wkbtosql.c - ST_WKBToSQL example.
  38. 3. Common code, used by all of the above programs
  39. -------------------------------------------------------------------------
  40. commfuncs.h - Header file containing data structure definitions,
  41. constants and function prototypes
  42. commfuncs.c - Functions which serialize and de-serialize
  43. numeric data, swapping bytes if necessary
  44. odbcutils.c - Functions for establishing a server connection
  45. and checking ODBC library function return status.
  46. shapefuncs.c - Functions for converting geometry data to and from
  47. ESRI shape format.
  48. wkbfuncs.c - Functions for converting geometry data to and from
  49. OpenGIS Well-Known Binary format.
  50. 4. Other files
  51. -------------------------------------------------------------------------
  52. Readme.txt - This file.
  53. Makefile - Makefile for compiling all programs on Unix and Linux platforms.
  54. For Unix and Linux, the Makefile may need to be changed to
  55. add platform specific compiler options may need to be specified.
  56. SOLARIS 32 and 64 are currently included.
  57. There is rudimentary support for Windows build by
  58. uncommenting the Windows only section of the Makefile.
  59. This makefile is designed to work with MS VS2005 and MKS.
  60. cleanup.sql - SQL script for dropping tables created by demo programs.
  61. II. Setting up and running the demos
  62. ====================================
  63. 1. Running the Makefile
  64. -----------------------
  65. You can use the Makefile to compile each demo program individually or
  66. compile them all at one time. To compile only a single demo, pass its
  67. name as a command-line argument to make. Not passing any command-line
  68. argument will cause all the demo programs to be compiled.
  69. To successfully run the Makefile, you need to have the INFORMIXDIR
  70. environment variable set to the directory where the Client-SDK is
  71. installed.
  72. The Makefile is configured for Solaris platforms. You might need
  73. to change it slightly for other platforms.
  74. 2. Command-line arguments
  75. -------------------------
  76. The demo programs all take a DSN name and an optional SRID as
  77. command-line arguments. If you do not specify an SRID, the programs
  78. will use SRID = 0, which is pre-loaded into the spatial_references
  79. table when you register the Spatial DataBlade in a database.