I recently deployed a new web mapping site as a beta (ala Google): Geospatial Portal Beta.
I bring it up here because it uses a bunch of bits I haven’t used before, and I’d like to post my happy thoughts about the whole affair. In particular:
- It utilizes the OpenLayers mapping library.
- It uses Tilecache to serve the maps (WMS), which in turn uses GeoServer as the back end (which in turn uses PostgreSQL/PostGIS).
- It uses the jQuery library for Javascript effects and AJAX.
- All tabular data is pulled from REST web services (JSON) dynamically via AJAX, including spatial analysis via PostGIS. No page refreshes.
- Because it’s all AJAX, there’s no server side code in the application itself. There’s nothing but Javascript and HTML.
This is a whole different framework for me. Previously, my framework was PHP-MapServer-SOAP web services, which is a very stable framework and is just fine in and of itself. But after doing my first app with OpenLayers-Tilecache-jQuery-REST, unless I need some of the more powerful server-side features MapServer can bring to bear, I’m going to stick with the new stuff.
From a developer’s perspective, the biggest advantages I’ve found with OpenLayers-Tilecache-jQuery-REST is speed and simplicity. The beta site went from an empty text file to release in only a few weeks of actual development time nestled in between other projects, with a lot of that taken up by a jQuery/OpenLayers/GeoServer/SLD learning curve, design, web service work, software setup, etc. It is also marvelously simple, being nothing more than Javascript and HTML. From an end-user perspective, you get a much more responsive application, a nicer map interface than I usually give people via OpenLayers, and everything is free and open source.
An added bonus is the infrastructure itself. GeoServer is a highly capable WMS/WFS-T server, and Tilecache is an extremely quick WMS server. These projects can form a big part of your GIS service oriented architecture, acting as a server to web, desktop, and mobile applications.
It’s a lot of tech I haven’t used before, so even though I’ve squished all of my release blockers I’m leaving it in Beta for now. The only downer I’ve run into is the speed of the initial page load. OpenLayers 2.5 is ~330kb packed, which is a whopper over a slow connection. There are also some browser quirks, which is part of the territory when you deal in a lot of Javascript. But overall, so far, so good.




really nice job -
Thanks! I can’t take too much credit – I’m assembling a lot of parts created by people a lot smarter than I.
nice work — you may want to look at projection next. Not sure about how open layers handles it, but here is for google maps: http://maps.charmeck.org/dev/tileserver/gmap/projection/
Thanks nianwei!
Looks like a project I should have a look at. As a side- note I am searching for how to build a portal similar to yours, however with raster- images (typically JPEG,GeoTIFFs or other formats) and some vector data. Can you point me in some directions regarding software/databases and implementations? Any help and information would be appreciated.
I see that MapServer may be the solution. I have experience with GDAL from before so it should work. However are there other options for serving raster data to a user?
If it were me, I’d go with MapServer. You don’t directly see the GDAL in MapServer (it’s in the back-end), but it does have that capability and can handle just about everything you can throw at it. You can also use MapServer as a WMS back end and use OpenLayers as your web front-end.
I should also mention GeoServer is getting some WCS capabilities, but in the trunk all you can do right now (I think) is one Tiff at a time (see http://docs.codehaus.org/display/GEOSDOC/Load+NASA+Blue+Marble+Data ). There is an imagemosaic plugin, but it’s in the unstable WCS branch. I’d still probably go with MapServer as a WMS image server at this point.
Hey congratulations, you’re surely making us GeoServer developers happy, the application looks very nice and useful. Wondering, are you powering the property related searches with WFS? Also, the mosaic stuff is already in GeoServer since one year, there are people serving gigabites of mosaics with them. Thought yes, the raster stuff is new and it’s not a smooth drive as with the vector data, yet definitely worth checking out imho.
Ah, I forgot. The tiles are a little big (in terms of kb), you may want to try png8 output format, with a slight quality degradation and a bigger rendering time. Compare http://geo.openplans.org:8080/geoserver/wms/reflect?layers=topp:states&format=image/png with http://geo.openplans.org:8080/geoserver/wms/reflect?layers=topp:states&format=image/png8, the second image is almost identical, but half the size. If you’re tilecaching the bigger computing time won’t affect you significantly anyways.
Hi Andrea. Thanks for the information! The data searches an analysis are being powered by some REST web services I created. Most of the searches are hitting non-spatial data on other databases (mainly MS SQL). Thanks for the tips, and congrats on GeoServer – it is awesome! There’s a big project we’re working on involving emergency operation centers in a 10 county area. The project will be distributed as a complete virtual machine (probably VMware) images with GeoServer as the mapping backbone. I’ll post about that when it’s a little closer.
Hi Fuzzy, Nice work here. Regarding the painful size of the open layers library, you are probably only using a small fraction of the library so it’s worth your while to create a custom build that concats and minifies just what you need. Also you might make sure to enable gzip compression on whatever server tech your using. My guess is you can get the wire transfer size down to 15kb.
Hi Chris, Thanks for the tip! Idiot that I am, I didn’t even look in the build folder in OpenLayers
. I think I’ll be making a custom config file in the near future.