|
The following instructions are for module maintainers.
They explain how to update the |
The following gives some hints for creating a HSQL database and populate it with EPSG data from the SQL scripts.
Copy the sqltool.rc file in the developper's
home directory and edit it URL path provided in this file.
Prepare a copy of EPSG's SQL scripts and modify them for HSQL syntax. The following Ant file can be used for this purpose. As a safety, add the following lines at the end of every scripts:
COMMIT; SHUTDOWN;
Creates the database using the following commands:
java org.hsqldb.util.SqlTool --autoCommit EPSG-admin HSQL/EPSG_Tables.sql java org.hsqldb.util.SqlTool --autoCommit EPSG-admin HSQL/EPSG_Data.sql java org.hsqldb.util.SqlTool --autoCommit EPSG-admin HSQL/EPSG_FKeys.sql
Launch the following application:
java org.hsqldb.util.DatabaseManagerSwing
Make sure the database is okay, and invoke the following commands:
SCRIPT 'EPSG.sql'; SHUTDOWN COMPACT;
Quit the application. Edit the EPSG.sql script as below:
SET DELAY 60 statement; 60 is already the default.CREATE USER "SA" and GRANT DBA TO SA statements.
This user will exists before the script is run.CREATE SCHEMA PUBLIC and SET SCHEMA PUBLIC statements.
This schema will exists before the script is run.EPSG_DATUM, change the type of column REALIZATION_EPOCH
to INTEGER.ALTER TABLE ... FOREIGN KEY statements to the end of the script.CONSTRAINT ... FOREIGN KEY from the CREATE TABLE
statements at the begining of the script, and move them as ALTER TABLE ... FOREIGN KEY
statements at the end of the script.SHUTDOWN COMPACT statement at the end of file.Run the following commands:
java org.geotools.referencing.factory.epsg.Compactor
Copy the file created in the above step into the
org.geotools.referencing.factory.epsg package directory
using "EPSG.sql" filename. Finally, create the JAR file
as usual, which should includes the EPSG.sql script.