Step 11: Your own data
<- Step 10: geGIS Demo Step 12: Your own application ->
The aim of the third part is to discuss the different concepts of a geGIS application in greater detail. Contrary to the two previous parts, not everything will be preprogrammed. We now want to make our own application, using our own data. If you do not have any data, you can of course always use one of the shapefiles included in geGIS.
Supposing the two previous parts were completed successfully and the Tomcat service has started, we now go to the geGIS configuration tool (http://localhost:8080/gegis/config.jsp). Click in the menu on "Uploading shapefiles". In part 2 we used a predefined script to upload a whole series of shapefiles. Now it is your turn to upload your own shapefile. If you do not have any shapefiles of your own, move on to "data/demo/shapes/" under the geGIS directory (standard under “C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\"). Here you will find all shapefiles that were used for the demo application.
This time choose to upload your own shapefiles in the configuration tool. To this end select the "PgWevDS" DataStore and then the desired shapefile. The third field is the table name in the database. Make sure it is always unique! The reason for this is that if the “making new table" mode is checked it will start to remove the table which is filled in in table name (if this should exist). To know which names have already been taken, simply call up the list of feature types. Feature types always have the same format, namely "namespace:name", such as "postgis:wev_waters". This namespace is the namespace of the DataStore and can be viewed in the DataStore catalogue. The name after the double point is, in case a database such as postgres is used, the name of the table.
Now that you know which names not to use (unless you deliberately want to replace a table), you can return to uploading your own shapefile.
Select the correct DataStore (PgWevDS), then a shapefile and then a table name to make a new table. Then click on “Uploading!”. This may take a while, depending on the size of the shapefile. The result is a whole lot of text. This text will contain a number of errors, but you need not worry about that. As a first step it will in fact try to remove the chosen table name. If this does not exist (which was the case with us), the database will generate an error message.
If you scroll to the bottom of the page, you will notice something else as well. A feature type has also been created automatically! The next logical step is to call up the list of feature types again so as to verify whether it is actually there. To view the attributes, click on the new feature type. You will need this later on.
This process can be repeated several times, but let us start with one new feature at the time and move on.