Readme.txt 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. =================================================================
  2. SAMPLE PROGRAMS
  3. FOR
  4. SPATIAL JAVA API VERSION 1.00,
  5. IBM INFORMIX SPATIAL DATABLADE MODULE, VERSION 8.20
  6. DATE: 06/15/2002
  7. =================================================================
  8. Several example Java programs are provided to demonstrate how to
  9. create and use geometry objects.
  10. The example programs have been tested with IBM Informix Dynamic
  11. Server 9.30, IBM Informix JDBC Driver 2.21.JC2, and Spatial DataBlade
  12. 8.11 and 8.20.
  13. GeometryToWKT
  14. -----------------
  15. Reads geometry objects from an IBM Informix spatial table and converts
  16. them into WKT (well-known text) strings. The program first creates a
  17. table, inserts geometry data, then queries the table. The output of
  18. this program shows the well-known text representation of sample
  19. geometries.
  20. GeometryToArray
  21. ----------------
  22. Creates new geometries using a geometry factory, then reads coordinate
  23. data out of the geometry objects. The program first creates several
  24. geometry objects and stores them in a Java vector, then uses two
  25. techniques to read coordinate data out of the geometry objects:
  26. - IfxGeometry.toCoordArray()
  27. - IfxGeometry.toPointArray()
  28. CoordRefCreate
  29. ---------------
  30. Creates new coordinate reference objects and inserts them into the
  31. SPATIAL_REFERENCES table.
  32. The program creates a new CoordRef object, then serializes it as a
  33. new SRS row into the SPATIAL_REFERENCES table. The output of this
  34. program shows the result of a query to retrieve the new spatial
  35. reference systems from the database.
  36. Setting your Classpath
  37. ------------------------
  38. When compiling or running any of these programs, set your CLASSPATH
  39. environment variable to include the Informix JDBC driver,
  40. the Spatial Java API jar file, and the directory where these programs
  41. are located.
  42. Compiling the programs
  43. -----------------------
  44. You can compile these programs by using the javac command. (Be sure
  45. that your CLASSPATH is set correctly). For example, to compile all
  46. the programs, go to the samples directory and enter the following command:
  47. javac *.java
  48. Running the programs
  49. ---------------------
  50. java <program> jdbc:informix-sqli://<host>:<port>/<database>:informixserver=<server>;user=<user>;password=<pass>
  51. where <program> = name of the class you want to execute
  52. <host> = hostname of the computer where IBM Informix Server is running
  53. <port> = port number that Informix server is listening on
  54. <database> = name of the database in which Spatial DataBlade is registered
  55. <server> = INFORMIXSERVER name
  56. <user> = your database user name
  57. <pass> = your database password