1. General Information
First of all, please make sure to read the chapter on General Information for all deegreeTools.
This program imports an ESRI shapefile into a none geospatial database like MS SQLServer to be used with deegree WFS.
In several cases it is required or useful to manage geospatial data with a OGC WFS set up on a database even if the available database does not offer native support for storing geospatial data. In such cases deegree WFS with GenericSQLDatastore can be used (see deegree WFS documentation for details). To simplify handling of GenericSQLDatastore ESRI shapefile can be imported directly into the underlying database schema using GenericSQLShapeImporter.
3. Library Dependancies
deegree2.jar msbase.jar mssqlserver.jar msutil.jar jts-1.8.jar jaxen-1.1-beta-8.jar log4j-1.2.9.jar
Please be sure to place these libraries in the same folder as the deegree2.jar.
The ms*.jar libraries are not in the deegree SVN as redistribution is not allowed. They are part of your MS SQLServer and may be copied from there.
The program will be invoked as follows:
java -Xms100m -Xmx300m -classpath .;libs/deegree2.jar org.deegree.tools.shape.GenericSQLShapeImporter -driver com.microsoft.jdbc.sqlserver.SQLServerDriver -url jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=testwfs -user www2 -password www2 -indexName fln -table mydata -shapeFile D:\deegree\shapes\myshape -maxTreeDepth 5 -idType INTEGER
The program receives following commandline parameter:
- maximum depht of the created quadtree (shall be between 3 and 8; optional - default = 6)
- JDBC database driver to connect the target database (e.g. com.microsoft.jdbc.sqlserver.SQLServerDriver)
JDBC database connection information (e.g. jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=myDB)
- user name to connect the database
- user's password to connect the database
- name of the index to be created; it must be unique and a valid database table name
- name of the table to be created to store the data
- owner of tables specified by -indexName and -table (just to be set if different from the database user)
- name of the shape file to be imported (without extension: e.g. c:/data/shapes/myShapeFile)
- determines if the database type for storing object IDs shall be INTEGER or UUID (default = UUID). Using INTEGER as ID type is significantly faster.
-h or -?
- forces printing a help text
none at the moment
look for other deegreeTools