GeoServer
Overview
GeoServer is the Java based GIS web server that I am using with PostgreSQL and PostGIS for the Mapping Vietnam project
Home page: http://geoserver.org/
2009 Feb 06 -- I decided to take a crack at installing GeoServer 1.7.2 today.
2011 Oct -- I am working with 2.1.2 now
"GeoServer is a Java-based software server that allows users to view and edit geospatial data. Using open standards set forth by the Open Geospatial Consortium (OGC), GeoServer allows for great flexibility in map creation and data sharing."
The crucial feature is that it allows edits via WFS-T. Mapserver does not.
WFS-T comments: http://weblogs.java.net/blog/2006/01/09/geoserver-wfs-t
Status
At this point I installed GeoServer 2.1.2 on HuPI.org, using the WAR file and Tomcat 7. It's running on the Oracle Java JRE.
The virtual server has 512MB of RAM and that is not enough for that machine so I have moved over to an in house server for the time being.
I have gotten data loaded into PostGIS and published it in GeoServer.
Next step is to move GeoServer in house
Then I need to add the new layer into the map.
The Apache server and raster tiles will remain at Hupi. GeoServer and vectors will be at alseageo.com
Setting up GeoServer
I found instructions in the PostGIS book. Page 324- As mentioned above I currently use the WAR file method.
Getting GeoServer going at HupI.org
I removed OpenJDK (which is purported to be suboptimal for use with GeoServer) and installed Oracle JDK 7. You only need JRE not JDK for Tomcat now, but I needed JDK for ESRI MDB support in GDAL.
Removing the OpenJDK also removed about 400 pounds of other packages, including Tomcat 6. This is okay really, since Tomcat 7 is the latest release anyway.
Download Tomcat 7 in binary form and unpack it where it will live.
cd /tmp wget http://mirror.uoregon.edu/apache/tomcat/tomcat-7/v7.0.23/bin/apache-tomcat-7.0.23.tar.gz sudo mkdir /usr/local/tomcat7 sudo tar xzvf /tmp/apache-tomcat-7.0.23.tar.gz cd /usr/local/tomcat7
I downloaded Tomcat 7 in binary tar.gz form
and unpacked it in /usr/local/java. I started it using the script in the bin directory called startup.sh and then went to http://hupi.org:8080/ and voila! There is is. Tres bien!!!
Then I moved the geoserver files into the Tomcat webapps directory and surfed to http://hupi.org:8080/geoserver/ and this too worked.
Change admin password now. Set up password access Default is admin, geoserver. Just edit the security file, no need to restart, takes effect right away.
Next I have to set up my own workspace to serve my PostGIS data.
Connecting GeoServer to PostGIS
Some notes on using WFS-T http://blogs.law.harvard.edu/jreyes/2007/08/03/geotools-wfs-t-update-request/
GeoServer has
- workspaces aka namespaces
- stores aka datastores
- layers
These are about organizing the data accessible to GeoServer.
You store data in stores and a store has to be in a workspace. A PostGIS store connects to a database, and the tables therein become accessible as layers (once you publish them)
So you can create a workspace for Oregon and then put all your state-level data into stores that are in the Oregon workspace.
To create a connection to data in your PostGIS server you have to know what's in there. You can poke around with psql if you are text kind of guy or you can use pgAdmin III, like so:
Sample GeoServer site
The Portland TriMet system map is on GeoServer via the OpenGeo stack.
This is from the Portland Trimet site... GeoServer, OpenLayers, TileCache, PostgreSQL, PostGIS, GDAL, Extjs, Freemarker, Solr, Antlr, Balance Ant, Http Client, Tomcat, Apache, and Cent OS are the underlying technologies used on this application. We're indebted to the contributors of these (and many other: eclipse, firefox and firebug to name a few) open source projects for sharing their efforts and expertise.