How to update the EPSG database
From gvSIG CE Wiki
Getting the necessary project to update the database
Download this project into your workspace like any other project.
In the src folder there is an EPSG.zip file with three files inside:
- EPSG.properties with the HSQLDB database properties
- EPSG.script contains the SQL statements to generate the database
- EPSG.data with the database data
These files are a copy of the EPSG database. To update this, it is necessary to generate a new EPSG.zip file with the latest version of the database.
Generating a new EPSG.zip with the latest EPSG database
To obtain an updated EPSG.zip file with the latest version of the EPSG database:
- Get the epsg-hsql module, version 8.x, from the GeoTools repository and all its dependencies.
- In the resources folder there is a text file, UpdateEPSGDatabase.txt and the rest of the files needed to perform the update process.
- Follow the instructions in UpdateEPSGDatabase.txt to generate the EPSG.zip file.
Replacing the old EPSG database
Once you have generated an updated EPSG.zip file with the latest EPSG database, it is necessary to create an updated library that includes it.
- In the gt2-epsg-hsql project, replace the existing EPSG.zip file in the src folder with the new version of the file.
- Run CRSTest to check that all is OK.
- Run build.xml as Ant Build with target create-jar; you must obtain a message like this:
...create-jar: BUILD SUCCESSFUL Total time: XXX milliseconds
- The new library geotools-epsg-hsql-2.1.1_gvsig.jar will be generated in the dist folder.
- Replace with this library the old version of the library in folders libFmap/lib and libJCRS/lib
- Congratulations!! You have updated gvSIG CE to the latest version of the EPSG database.