GeoServer Integration Guide for Altibase#
Overview#
This document provides a guide for integrating GeoServer with Altibase.
This document is based on the following versions:
- Altibase 7.1 or later
- GeoServer 2.16.2 or later
Info
For errors and improvements related to this document, please contact the technical support portal or technical support center.
- Technical support portal: http://support.altibase.com/en
- Technical support center: +82-2-2082-1114
Info
This document is provided for informational purposes only and is subject to change without prior notice. It may contain errors, and Altibase makes no express or implied warranties of any kind, including but not limited to warranties of merchantability or fitness for a particular purpose.
The development, release, and timing of any features or functionality described for Altibase products in this document are at the sole discretion of Altibase.
Altibase may hold patents, trademarks, copyrights, or other intellectual property rights related to the contents of this document.
GeoServer#
GeoServer is an open-source GIS software server developed in Java that allows sharing and editing of geospatial data.
As a community-based project, GeoServer is developed, tested, and supported by diverse groups of individuals and organizations worldwide.
GeoServer serves as a reference implementation not only for Web Map Service (WMS) but also for Open Geospatial Consortium (OGC) standards such as Web Feature Service (WFS), Web Coverage Service (WCS), and Web Processing Service (WPS).
GeoServer forms a core component of the Geospatial Web.
GeoServer Installation and Setup#
This document is based on installing GeoServer on Windows 10.
- To install GeoServer, JRE (Java Runtime Environment) must be installed:
- JRE version 8 or higher is recommended.
- You can download and install it from OpenJDK or Oracle JRE.
- After installation, verify the JAVA environment settings.
- Installing GeoServer:
- Download the stable version from the GeoServer download site.
This document uses version 2.16.2 as the reference. - Extract the downloaded Zip file to the installation path and configure the environment.
Here, GeoServer is installed atC:\Program Files\GeoServer.
Set the environment variables as follows.
GEOSERVER_HOME = C:\Program Files\GeoServer
GEOSERVER_DATA_DIR = C:\Program Files\GeoServer\data_dir
- Download the stable version from the GeoServer download site.
- To integrate with Altibase, additional libraries need to be installed.
Copy the required libraries toC:\Program Files\GeoServer\webapps\geoserver\WEB-INF\lib:- Altibase-specific spatial DBMS driver:
gt-jdbc-altibase-21-SNAPSHOT.jar - JTS Topology Suite:
jts-1.14.jar - Altibase JDBC driver:
TheAltibase.jarfile can be found in thelibdirectory of your Altibase installation folder.
- Altibase-specific spatial DBMS driver:
-
Altibase Spatial module installation and coordinate system setup:
- The spatial module is not installed by default during Altibase installation. Use the following commands to install the spatial module.
$ is -f $ALTIBASE_HOME/thirdparty/ArcGIS/geometry_columns.sql- Insert the coordinate system to be used when creating layers into the
spatial_ref_systable.
* More coordinate system information can be found here.$isql iSQL> INSERT into spatial_ref_sys (srid, auth_name, auth_srid, proj4text, srtext) values ( 4326, 'EPSG', 4326, '+proj=longlat +datum=WGS84 +no_defs ', 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]');
5. Starting GeoServer - Run the startup.bat file located in the GEOSERVER_HOME directory to start GeoServer.
Integrating GeoServer with Altibase#
- Accessing GeoServer
- Open a browser and go to http://localhost:8080/geoserver.
- username: admin
password: geoserver
-
Adding a Store
-
Add Altibase as a data store.
-
The required input fields are as follows:
Item Description Workspace To publish or register a layer, you must add a workspace. Here, the default workspace "cite" was selected. Data Store Name Enter the name of the data store. dbtype Set to "altibase". host Enter the address of the Altibase server. port Enter the service port configured in Altibase. The default value is 20300. database Enter the database name configured in Altibase. The default value is "mydb". schema Altibase does not manage schemas. user Enter the Altibase DB account name. password Enter the Altibase DB account password. preparedStatements Optional. Not checked for Altibase. -
-
Registering a Layer
- Register a layer in the data store.
- The registered layer is managed as a Table in Altibase.
-
Select a layer from the left tree and click “Add New Layer.”
-
Select the data store where the layer will be created. Here, the data store called ALTIBASE_SPATIAL in the workspace cite was selected.
-
Click "Create New Feature Type" to create the layer.
-
Enter the type name. This name will be used as the table name.
-
Click "Add New Attribute Field" to add attribute fields. These attribute fields are defined as columns.
-
Enter the name. This will be the column name.
- Enter the type. This will be the data type of the column.
- If the data type requires a length, specify the size.
-
For geometry types, specify the coordinate system and click the save button.
-
Review the attribute information and enter the layer’s minimum bounding area.
Clicking "Calculate from Data," "Calculate from SRS Extent," or "Calculate from Source Extent" will automatically fill it in. - Click "Save" to save.
Spatial Data Import#
You can import a layer using a shapefile.
- Install the extension plug-in
Download the importer plug-in, unzip it, and copy it to C:\Program Files\GeoServer\webapps\geoserver\WEB-INF\lib.
You need to restart GeoServer for it to take effect. - When you access GeoServer, the "Import Data" option will be added.
- Select the spatial file from the data source to import.
Currently, Altibase only supports importing spatial files.
Click the browse button to select the spatial file.
-
Select the directory where the spatial file is located.
- Select the workspace and data store, then click the Next button.
- Select the spatial data file to import, then click the Import button to complete the import.
Check the registered layer.#
The registered layer can be viewed in the layer preview.
- Click "Preview," then click "OpenLayers" for the layer you wish to view.
-
In Altibase, it can be verified as follows.
$isql iSQL> SELECT "fid", "emd_cd", "emd_eng_nm", ASTEXT("the_geom") FROM "SEOUL_43260" LIMIT 3; fid emd_cd emd_eng_nm ASTEXT("THE_GEOM") ----------------------------------------------------------------------------------------------------------------- 1 11110152 Bongik-dong MULTIPOLYGON(((126.9925 37.573 85, 126.9941 37.57206, 126.994 3 37.571, 126.9929 37.57085, 1 26.9923 37.57203, 126.9916 37. 57389, 126.9925 37.57385))) 2 11110153 Donui-dong MULTIPOLYGON(((126.991 37.5733 6, 126.9918 37.5708, 126.9905 37.5707, 126.9902 37.57189, 12 6.9899 37.5729, 126.991 37.573 36))) 3 11560123 Mullae-dong 5(o)-ga MULTIPOLYGON( ... ) 3 rows selected.Note
- In Altibase, table names and column names are case-sensitive.
When querying table and column names that contain lowercase letters, use double quotes ("").
- In Altibase, table names and column names are case-sensitive.