1. Download Java
The GISToolkit Server is a Java program, so you will need a Java interpreter to run it. It has been built and tested against the j2se 1.4.0 and j2se 1.3.0_2 from Sun Microsystems. Other 1.2 compatible JDK releases should work as well. Install the interpreter.2. Update the batch file to point to your installation
The GISToolkitServer.bat needs to point to the correct JDK, and needs to be updated to include the correct jar files. My JDK is installed in d:\apps\jdk14, so this is where I find the java interpreter.3. Run the GISToolkitServer.bat file to start the service as a stand alone process.
If java is installed correctly, it should be in your path and the following line should work well.
java -Xms32m -Xmx600m -cp GISToolkit.jar;JimiProClasses.zip;xerces.jar;db2java.zip;jdbc7.1-1.2.jar gistoolkit.server.mapservice.WebMapService server.xml
If not, then you will have to prepend the java with the fully qualified path such as
d:\apps\jdk14\java -Xms32m -Xmx600m -cp GISToolkit.jar;JimiProClasses.zip;xerces.jar;db2java.zip;jdbc7.1-1.2.jar gistoolkit.server.mapservice.WebMapService server.xml
The file server.xml is the configuration file for the server, and must be present. A default server.xml file should have been provided with the distribution.
The -Xms parameter is a Sun JDK specific parameter which instructs the virtual machine to startup with 32 meg of memory. The server typically uses less than 14 meg, so this parameter can be adjusted to your specific needs. If you are using a different JDK, this parameter will most likely have to be removed or replaced.
The -Xmx parameter is a Sun JDK specific parameter which instructs the virtual machine to never use more than 600 meg of memory. This may again be adjusted to the requirements of your server, and the availability of ram. Layers with many shapes and large shape files will require additional ram as the server loads the entire shape file before trimming to just the shapes in view. If you are using a different JDK, this parameter will most likely have to be removed or replaced.
Since the server can use additional extenders, you must include the classes for the extenders in the class path. If you know what I am talking about, then you know how to do this. If you are not using extenders, then the path above is fine.
Jar files that are used for data sources you are not using can be safely removed.
Start a web browser and go to the URLWindows Service:
http://localhost:40320/admin
This should show you the administration pages for the server so you can go ahead and begin configuring the server.
Go the the "Setup Instructions" later in this document.
1. Download Java : if you have done this already, then there is no need to do it again, we will use the currently installed vm, go to step 2.
The GISToolkit Server is a Java program, so you will need a Java interpreter to run it. It has been built and tested against the j2se 1.4.0 and j2se 1.3.0_2 from Sun Microsystems. Other 1.2 compatible JDK releases should work as well. Install the interpreter.2. Update the batch file to point to your installation
Location of the JVM3. Run the ServiceInstall.bat file to install the service
The ServiceInstall.bat needs to point to the correct JDK, and needs to be updated to include the correct Parameters. My JDK is installed in d:\apps\jdk14, so this is where I find the java interpreter. The DLL of the interpreter is necissary.
rem ********************************************************************************
rem location of the jvm.
rem jdk 1.3
rem set jvm_path=d:\apps\jdk13\jre\bin\hotspot\jvm.dll
rem jdk 1.4
set jvm_path=d:\apps\jdk14\jre\bin\server\jvm.dll
Set this variable to the location of the vm on your server. It will most centainly be in a different location. If this parameter is not correctly set, then the server will fail to start in the Windows Services panel.
Location of the initialization file.
There is an example installation file sent with the distribution. It will provide a unconfigured server. The configuration file location can be relative to the server installation directory (below), or may be an absolute path. Mine is in the same directory as the rest of the software. This is probably the case. If this parameter is set incorrectly, the service will start, but will quit almost immediately.
rem ********************************************************************************
rem location of the initialization file
set initfile=server.xml
The location of the server.
This needs to be set to where the necissary jar files are located. My GISToolkitServer is located in D:\apps\GISServer . Again, your installation directory will almost certainly be different. If this parameter is set incorrectly, the service will start, but will quit almost immediately.
rem ********************************************************************************
rem location of the installation directory. This must be the fully qualified path.
set GISServer_HOME=d:\apps\gisserver
Required Class Path for the Server.
This should be Just fine the way that it is. If you are using extenders that require additional classes, then update this to include your classes as well.
This should print a message "GISToolkitService" successfully installed.4. Test the installation
Should you wish to uninstall the service run the ServiceRemove.batch file.
The services window should not be open when the service is removed or it may schedule removal of the service for the next time it is closed instead of immediatly. Close and reopen the services window to see the changes.
Start a web browser and go to the URL
http://localhost:40320/admin
This should show you the administration pages for the server so you can go ahead and begin configuring the server.
Go the the "Setup Instructions" later in this document.
Linux
1. Download Java
The GISToolkit Server is a Java program, so you will need a Java interpreter to run it. It has been built and tested against the j2se 1.4.0 and j2se 1.3.0_2 from Sun Microsystems. Other 1.2 compatible JDK releases should work as well. Install the interpreter.2. Update the script file to point to your installation
The GISToolkitServer.sh needs to point to the correct JDK, and needs to be updated to include the correct jar files. My JDK is installed in /usr/java/j2sdk1.4.0/. so this is where I find the java interpreter.3. Run the GISToolkitServer.sh file to start the service as a stand alone process.
This is an example of my startup command:
/usr/java/j2sdk1.4.0/bin/java -Xms32m -Xmx600m -cp db2java.zip:jsde81_sdk.jar:JimiProClasses.zip:GISToolkit.jar:xerces.jar gistoolkit.server.mapservice.WebMapService server.xml
The file server.xml is the configuration file for the server, and must be present. A default server.xml file should have been provided with the distribution.
The -Xms parameter is a Sun JDK specific parameter which instructs the virtual machine to startup with 32 meg of memory. The server typically uses less than 14 meg, so this parameter can be adjusted to your specific needs. If you are using a different JDK, this parameter will most likely have to be removed or replaced.
The -Xmx parameter is a Sun JDK specific parameter which instructs the virtual machine to never use more than 600 meg of memory. This may again be adjusted to the requirements of your server, and the availability of ram. Layers with many shapes and large shape files will require additional ram as the server loads the entire shape file before trimming to just the shapes in view. If you are using a different JDK, this parameter will most likely have to be removed or replaced.
Since the server can use additional extenders, you must include the classes for the extenders in the class path. If you know what I am talking about, then you know how to do this. If you are not using extenders, then the path above is fine.
Jar files that are used for data sources you are not using can be safely removed.
Start a web browser and go to the URL
http://localhost:40320/admin
This should show you the administration pages for the server so you can go ahead and begin configuring the server.
Go the the "Setup Instructions" later in this document.
The only thing a shape file data source needs to know is the location of the shape file. Only shape files that are accessable from the server can be used. If you need to upload shape files from your local computer to the server you should use a file transfer protocol to do that, and then add the path from the server to that file here.DB2 Spatial Extender
If you have a spatial extender data source, there are quite a lot of parameters that are required. Most are explained.PostGIS Data Source
The server name is the name of the server where the database resides, it may not (and probably will not) be this computer
The database name is the name of the database (NOT THE INSTANCE). The server will find the database in whichever instance it resides. The instance and database must be online.
The Schema Name is the name of the schema, it may be the same as the username (mine is most of the time.)
The username is used by the database to authenticate the user logging in. This user must have select access on the database.
The password (hidden) is used to validate the username at the database.
The port, is the port that the database is listening on. This is usally configured with the db2jstrt.exe command on the database server, and the second parameter is the port number. I use db2jstrt 1510 just because I like that number. This will start a listener process on that port on the database server, this is the port number you should enter here. In this case 1510.
Shape Column. The datasource will look through the resulting data for this column and expect a binary formatted stream of shape data. This should be the same as the argument to and as clauses. ShapeColumn="Shape" db2gse.st_AsBinary(Shape) Shape Note that all three must be the same.
SRID is the spatial reference ID of the data in the database.
The query. This is the actually database query sent to the database, the db2gse.st_AsBinary() function converts the shape data to the correct binary format to be read by the datasource.
Preread, This will cause the datasource to read all the data once, and cache it in memory. This can be usefull for small datasets (that fit in memory), and that are accessed very often. Leaving this off will cause this data source to only query the data that is in view (asked for), and draw just that. The datasource will cache this set so a zoom in will not need a requery, but pans, and zoom outs will. Redraws (fairly common) do not.
If you have a PostGIS data source, there are some parameters that are required. Most are explained.Image File Data Source
The server name is the name of the server where the database resides, it may not (and probably will not) be this computer
The database name is the name of the database.
The username is used by the database to authenticate the user logging in. This user must have select access on the database.
The password (hidden) is used to validate the username at the database.
The port, is the port that the database is listening on. The default is 5432.
Shape Column. The datasource will look through the resulting data for this column and expect a text formated stream of shape data. This should be the same as the argument to and as clauses. ShapeColumn="the_geom" AsText(the_geom) the_geom Note that all three must be the same.
SRID is the spatial reference ID of the data in the database.
Query. This is the actually database query sent to the database, the AsText() function converts the shape data to the correct textual format to be read by the datasource.
Preread, This will cause the datasource to read all the data once, and cache it in memory. This can be usefull for small datasets (that fit in memory), and that are accessed very often. Leaving this off will cause this data source to only query the data that is in view (asked for), and draw just that. The datasource will cache this set so a zoom in will not need a requery, but pans, and zoom outs will. Redraws (fairly common) do not.
This allows you to use an image as the data source. This is fairly common for raster data sources.Click on the "submit" button to create configure the data source for the new layer.
Location of the ImageFile Is the path (again on the server) of where the image is. JPG, GIF, and PNG images are supported.
In order for the server to know where to draw this image, the image must be georeferenced. The next four parameters are the locations of the four edges in the display coordinate system.