Version 29 (modified by dmisev, 21 months ago) (diff)


SECORE Developer's Documentation

This page serves as an introduction on SECORE's development. SECORE (Semantic Cordinate Reference System Resolver) is a server which resolves CRS URLs into full CRS definitions represented in GML 3.2.1. For installation guidelines see wiki:InstallFromSource#InitializeSECORE.


SECORE can be opened directly as a web project in NetBeans (version 7.2 recommended at the moment).

In NetBeans, go to File -> Open Project, and open $RASDAMAN/applications/secore/secore-{core,web}, where $RASDAMAN is path to the rasdaman source tree.


To install SECORE

# get rasdaman
git clone git://
# go to secore's source directory
cd $RASDAMAN/applications/secore
# deploy the def.war to Tomcat's webapps directory
./deploy /path/to/tomcat/webapps

SECORE should then be available at http://localhost:8080/def, e.g. to get the definition of WGS 84 try http://localhost:8080/def/crs/EPSG/0/4326


SECORE stores and queries XML data in a BaseX XML database. On the disk this database is stored in $CATALINA_HOME/webapps/secoredb, this is the directory where the Tomcat process will typically have write access. The database is created and maintained automatically, so no action by the user is required regarding this.

Source Code

NOTE: In SECORE, there are 2 files of GML Database (UserDictionary?.xml and GmlDictionary?.xml). User will add/update/delete only in UserDictionary?.xml when GmlDictionary?.xml is conserved. So everthing you want to change in DB by XQUERY then do it only with UserDictionary?.xml (DBManager.USER_DB).

And SECORE uses identifier to know where should update/delete by XQUERY in XML (UserDictionary? and GmlDictionary?). So if identifier does not exist in these files then it is not valid to update/delete but valid to insert into UserDictionary?.xml.

 <gml:identifier codeSpace="EPSG"></gml:identifier>


This is the web-frontend of SECORE, implemented as a Java servlet. It intercepts requests, does some filtering as necessary, and passes them on to secore-core for resolving.

NOTE: please remember link to SECORE with "make install" is

'''http://localhost:PORT/def''' (for example http://localhost:8080/def). 

When you open secore project in (/applications/secore) by Netbeans and run/debug with GlassFish? (built in with Netbeans), it will be


The problem is, it breaks all the behavior of SECORE as it will returns empty or error as "Cannot resolve CRS" even it is correct URI like


To fix this, you need to rename project "secore-web" to "def" and redeploy project when run/debug with Netbeans and check file "glassfish-web.xml" inside this project with root-context is "/def". Now, you can access the link same to build with "make install" without any problem.



This implements the core functionality in SECORE, that is resolving incoming requests for CRS definitions. secore-core is regular Java code that can be included as a library in other projects, e.g., a command-line client, if that's ever necessary. In secore-web it's included as a secore-core.jar lib.

NOTE: to support debugging with Netbeans in secore-web that use secore-core jar library, edit in applications/secore/secore-core and add "-g " into JFLAGS variable to help viewing variables's value like below. Then run "make and make install" inside secore-core directory to compile the secore-core library before running debug secore-web project.

JFLAGS    = -sourcepath $(SRC_MAIN) \
               -g -d $(CLASSES)        \
               -cp $(JJARS_CP)      \
               -source 1.5

User interface

The SECORE database tree can be viewed and (upon login) modified via graphical web interface at "{service}/def/index.jsp".

More generally, any folder and definition can turn to EDIT mode by appending a "/browse.jsp" to its URI: e.g. "{service}/def/uom/EPSG/0/9001/browse.jsp" will let you view/edit EPSG:9001 unit of measure, whereas "{service}/def/uom/EPSG/0/browse.jsp" will let you either remove EPSG UoM definitions or add a new one, not necessarily under the EPSG branch: the "gml:identifier" of the new definition will determine its position in the tree.

Here you can find hints on how to to define new GML definitions of CRSs. Mind that compounding is achieved at resolve-time by querying SECORE with a "crs-compound" path, so that only single CRS definitions should be added to it.

As explained in the related publication, SECORE supports parametrization of CRSs as well: with this regard, you should mind that relative XPaths are not allowed (either start with / or // when selecting nodes); non-numeric parameters must be embraced by single or double quotes both when setting optional default values in the definition or when setting custom values in the URI.


SECORE tickets:

Summary Reporter Owner Ticket Milestone
No tickets found