Pages

Monday 11 May 2009

CCIP Part 2 - Configuring GeoServer

A couple of things happened to delay this post:

  • I was hoping to get a review of the service from geoserver-devel

  • The CCIP policy was defined around how services at the conference will be handled (more of a competition – but if you have set up a service for use in a workshop that will help). Near as I can tell the good news from that angle is that Deegree are going to be involved as well

But first here is the server: http://ccip.lisasoft.com:8080/geoserver/

It does not have very many layers configured; and this is as much an interesting tale of GeoServer configuration

Clearing out the Configuration

Once I had an initial goeserver war configuration – I needed to clean out the working examples so I could start a fresh (hooking up raster data and postgis).

I was able to remove all the featuretypes; but the existing raster layers produced a NPE (bug reported GEOS-2818) - so I had to duck out to the data directory and remove the coverages directory by hand.

Aside: When I initially reported GEOS-2818 I did not choose a good title; and thus the bug was not understood; it is very important to take the time to report a problem in a clear fashion; and list the steps for a developer to reproduce the issue. It is of course amusing being caught out on this mistake :-)

Additional steps:

- change the login credentials for the configuraiton ui: /var/lib/tomcat6/webapps/geoserver/data/security/user.properties

Lessons Learned - Gray

Next up I tried setting up PostGIS; here is where we get into an amusing mistake. My postgis datastore entry "timed out" (when it changed IP address on me). When I went to correct the problem and hit "apply"/"save" etc... the green bar of happiness turned "gray". Removing all the feature types associated with this postgis turned it green again; but anytime I added a feature type it would go back to gray.


Here is the take home lesson:

- green is good

- red is an error

- gray is disabled

I had to go back into the datastore enty and mark it as "enabled"; after a timeout geoserver stops checking the entry until you go in as an administrator and fix it! That would be an amazing way to lose track of a bunch of layers...

Lessons Learned – SRS ID

I also had a merry time filling out a shapefile where the prj file was not provided. You can entry in "EPSG:4326" into the field; and that works fine for the "Generate" button to produce you a valid set of bounds - but it does not work fine enough to "Submit".


Apparently you are supposed to enter "4326".

Lessons Learned - Style Generation

I tried out the button to create a new style; and was in for a bit of hurt. The generated style did not initially include a "propertyName" for the label. Correcting this my style was still invalid when I tried it in the uDig style editor (there is an XML page where you can copy and paste styles between uDig and GeoServer or any other SLD supporting application).

I opened up a bug; attaching the generated style here: GEOS-2870

To proceed I made an interesting style for city labels where they are all rotated at 45 degrees.

Lessons Learned – Defaults

This next one really slowed me down: the ability to fill default values for the bounds is available in GeoServer. This functionality relies on the the GeoTools library “DataStore” api to ask for the bounding box of a shapefile; or a postgis table.


Because mark was using an experimental PostGIS this functionality was broken for me. GEOS-2839. Community response this time was excellent. The combination of Andrea and Paul Ramsey took my bug report over to the PostGIS bug tracker so it is identified as something that needs to be fixed before release.

Udig was still able to generate the bounds (it has some extra fallback code – where the bounds of the coordinate reference system are used if the other techniques fail). I should try and create a patch in case any other datastore has trouble.

The other thing is Mark has spent a great deal of time entering in table descriptions; this was not being picked up leaving me with either duplicating his work; or making do with poor descriptions: GEOS-2865

Resolution

I am going to wait for (and/or fix) some of these bugs to be fixed before proceeding; having this service set up is something I need for a couple tutorials I will be doing at FOSS4G. It looks like this service will be available; and hopefully a deegree service will be around as well.

The Climate Change Integration Plugfest data is interesting; but I am not quite sure what to do with it. There is a senario and other details here: ClimateChallenge2009