SpatiArc V.1.0

Author: Ralf Rapude



Download SptiArc

Working with SpatiArc

How to...

SpatiArc provides an easy way to import shapefiles into Oracle Spatial by converting their content into geometry objects. It has been programed because there are just command line tools (a really uncomfortable way) or some commercial solutions available.

But SpatiArc has some more features to make the work with shapefiles a little bit easier:

  • a graphical user interface
  • select files from your file system
  • connect Spatial in an easy way
  • view the content of shapefiles
  • specify import parameters
  • render a map from the tables of spatial
  • create indices on Oracle-Spatial tables



Spatiarc Main gui
(cklick to enlarge)

This is the main user interface of SpatiArc. It consists of two tabs representing the opportunity to import shapefiles to Oracle-Spatial or to render a map out of a spatial table. The other components are in the gui for making the work with shapefiles and Oracle-Spatial more comfortable or to get further informations about the content of a shapefile or a spatial table.


For a connection to spatial there are three ways to specify the connection parameters

1. Press Ctrl + O
2. Click the menuitem Database/Connect Params

Oracle Connect 1

3. Do a click on the right button below the menu

Oracle Connect 2

Afterwards this window will appear:

Connection Parameters

Type in the hostname where Oracle runs, the username for the connect, the name of the databse and the port. After the click on the save button a text file will be generated in the root directory of your computer containing the required variables. You can also type in your password for the database but be carefull with this option, because it will appear readable in the properties file. If the password field contains no data, a window will be prompted to ask for it every time when a connection to Oracle will be established.


To select files for an import to Oracle, you should perform a click on the "Choose Directory" Button:

Choose Files to Import

A file chooser will appear where you can choose the dirctory containing the shapefiles and only shp files will be shown. After choosing the directory the gui will be changed in this way:

View available Files

That means that you are now able to prepare the import. A selection of one or more files and a click on the upper button between the lists will add them to the right list. A click on the button below will remove the selected files from the import list and they will be added on the available file list. The opportunity to remove all files from the import list is also given. Perform a click on the "Clear Import" Button and after a hint all files will be removed from the right list without touching the files on your harddisk.

Select Files for Import

If the import list contains one or more files the "Prepare Import" button and also the "Clear Import" Button will be enabled.

To prepare the import, you can use the following ways:
1. Click the "Prepare Import" Button
2. Press Ctrl + I
3. Perform a click on this button ->import button for shapefiles (you will also find it below the menu)
4. Click Database/Import Params in the menu

In every case the following window will be shown:

Preparing the Import

The upper left drop down menu contains all shapefiles you have selected for the import. You can now specify the parameters for each shapefile and only if you have confirmed them once for each file the "Import" button will be enabled. After a click on the button the transfer to Oracle will start and you can follow the current actions in the debug window. If you would like to import the files later you can also press the cancel button. The window will be closed and you can still select or deselect files. All parameters of the confirmed shapefiles will now be shown in the debug window.

The Debug Window

You've got also the opportunity to view the content of your files. Select one file in the left list and perform a click on the "Show Content" Button.

Showing the content of the Files

On the right side of the gui now a table with the content will be shown. It will look for example like this:

How a table looks like


After selecting the view tab, the interface will change to the "view" mode. The work on this tab is analog to the import tab so that there isn't so much new stuff to tell:

How to render a map
(click to enlarge)

A click on the "Go" Button will establish a connection to Oracle and all tables from "user_sdo_geom_metadata" will appear in the left list. After selecting a file and a click on the upper button between the lists, a map will be rendered by SpatiArc.

Add layer to map

Now the other buttons below the menu will be enabled. You can now perform different operations on the map by using the buttons below.

How to operate on a map

These buttons are toggling buttons. To use them select one and click into the map with the mouse to perform the selected action. The following operations are possible (from left to right):

  1. A zoom into the map
  2. A zoom out of the map
  3. Center the selected point
  4. Turn the map back into the original size

If you render more then one table every following map will be placed over the last one (like a card layout). If you deselect a map, you will see the map laying below on the stack. Also for rendering maps you can follow the current action in the debug window.

Moving the mouse over the map will show you the current longitude and latitude:

Show longitude and latitude