GeoServer Blog
Batch Importing Shapefiles (The Adventure)
If you’ve ever needed to import multiple shapefiles into GeoServer, you know that currently there aren’t any built-in tools to let you to do this. I had to import about a hundred of them for some work I was doing, and it simply wasn’t feasible to do them one at a time. (Recall that shapefiles are their own DataStores, so one needs to set up DataStores and FeatureTypes for each shapefile, in effect double the work compared to a database.) I polled the users mailing list but didn’t get much of a response, aside from others looking for the same.
Impetuously, I decided to set out to solve this problem myself. I am by no means a programmer (at least not yet), but I have some shell/batch scripting history, and was, as Hunter Thompson once said, “just sick enough to be totally confident.” I decided to write a batch import program in Python, if for no other reason than we have some sophisticated Python developers in the office, so I figured I was in good hands. Yes, I didn’t actually have any Python experience per se, which sort of likened the experience to someone who has never held a soldering iron building a personal computer.
So, I tweaked, tinkered, read Learning Python, asked a ton of questions to my tireless office mates, and in a short eternity had a script that did the following:
-
Copied a shapefile (and associated files) to the data directory
-
Appended info block to catalog.xml
-
Created named FeatureType directory and associated info.xml
Some parts of the process were made easy in my particular case. All my SLDs were already loaded into the data directory, with the same name as the shapefile. Every shapefile had the same bounding box, projection, and namespace, so I could hard code those into the script without having to figure out how to get at them another way. The script wasn’t pretty, but it worked, and to me, that was the most important part.
The punchline to this story is that the very next day after I got all my shapefiles loaded, there appeared a response to my initial query, wherein a kind soul had posted a python script that did (approximately) the exact same thing.
Stoyan Shopov from LISAsoft, a geospatial software and consulting company, was in the same situation as I was. He created the script, as he says, “by my own initiative and out of frustration,” which pretty much sums it up. His script was, of course, miles ahead of mine in compactness and sheer elegance. That said, in the spirit of open-source and sharing that is our solemn creed, I offer both mine and Stoyan’s scripts (with his permission, of course).
Download Stoyan’s script Download my script (Warning: If you are a Python programmer, you may be horrified.)
Now, eventually a lot of this work will be obsolete, as the GeoServer developers are working on a RESTful interface that will allow for easy configuration changes from a command line. I have seen a demo of this functionality, and it is impressive in its simplicity and its why-didn’t-they-do-this-sooner-ness.
Are there any interesting scripts or external programs you have employed when working with GeoServer? If so, then speak up, as there’s a good chance that someone is encountering that very problem you’ve already solved.
Note: Comments have been restored to this blog after a long absence, so your comments will no longer be lost in the void. Thanks for your patience on this one.
1.7.0-RC2: Almost There
We’ve received some good feedback from the community on the first release candidate of version 1.7.0, and have made some improvements that we wanted to share with you. This second release candidate is more stable and features some code-tightening as well (MIME types are now case insensitive, a limited SRS list persists again, and more.) This is the most stable release yet of the new 1.7.0 branch and we encourage you to try it out. If all goes according to plan, we should have a final release around the corner.
GeoServer 1.7.0-RC2 is available from the SourceForge Download Page.
Released on August 29, 2008. SourceForge Release 622753
- Release Notes
- geoserver-1.7.0-RC2a.exe (Win32 self-installing executable)
- geoserver-1.7.0-RC2a-bin.zip (UNIX binary)
- geoserver-1.7.0-RC2a-src.zip (Source code)
- geoserver-1.7.0-RC2a-war.zip (Web archive)
- geoserver-1.7.0-RC2-doc.zip (Documentation export from geoserver.org)
- geoserver-1.7.0-RC2a-javadoc.zip (Java Documentation)
Extensions download page
DataStore Extensions
Coverage Extensions
Release notes
Improvement:
- GEOS-654 Register GetMapProducers directly and remove the factories
- GEOS-2176 Better deal with invalid filters
Bug:
- GEOS-2131 Unable to send WMS request for multiple layers of same feature with different filter
- GEOS-2166 Check there are no references before removing layers and stores
- GEOS-2167 Removing layers part of a base layer group causes exception
- GEOS-2168 ‘openlayers’ alias for ‘application/openlayers’ no longer works for wms
- GEOS-2170 MIIME-Type matching shall be case insensitive
- GEOS-2171 limited list of SRS
- GEOS-2178 asking for an extension with a custom ApplicationContext returns the cached value from the internal ApplicationContext
- GEOS-2185 KML link on demo page leads to KML document with invalid links
Task:
1.7.0-RC1: Release Early And Often
Our mantra around here is “release early and often” and we’re certainly holding to that these days. The GeoServer team is woking on three (yes, three) parallel tracks of GeoServer. First, there is the stable branch, currently at 1.6.4, which is current recommended version for those who need rock-solid dependability and minimal fuss. Last week, we unveiled the first alpha of GeoServer 2.0, which brings a new UI and new customization options.
But today we’re proud to unveil the first release candidate of GeoServer 1.7.0. We have received plenty of feedback from users, and there has been a great deal of work done to bring this one out of beta. This version provides many new features, such as Xlink support for WFS 1.1, full implementation of WCS 1.1.1, and per layer security. I personally like the new OpenLayers toolbar, which allows for dynamic updating of the configuration options. Special thanks goes out to GeoSolutions for all of their hard work on the GDAL extensions.
So please download 1.7.0-RC1 and give it a spin. Over 30 bugs and features have been fixed and implemented (respectively) since our last beta.
GeoServer 1.7.0-RC1 is available from the SourceForge Download Page.
Released on (DATE). SourceForge Release 619896
- Release Notes
- geoserver-1.7.0-RC1.exe (Win32 self-installing executable)
- geoserver-1.7.0-RC1-bin.zip (UNIX binary)
- geoserver-1.7.0-RC1-src.zip (Source code)
- geoserver-1.7.0-RC1-war.zip (Web archive)
- geoserver-1.7.0-RC1-doc.zip (Documentation export from geoserver.org)
- geoserver-1.7.0-RC1-javadoc.zip (Java Documentation)
Extensions download page
DataStore Extensions
Coverage Extensions
Release notes
Improvement:
- GEOS-458 Have WMS capabilities document report contact information
- GEOS-533 make FORMAT not mandatory for GetFeatureInfo
- GEOS-1616 WFS 1.0 GetFeature accepts srsName in GET requests, but ignores it in POST ones
- GEOS-1707 WFS 1.1.0 xml reader on trunk does not look at “strict” parameter
- GEOS-2121 Change of buffer size in ShapeZipOutputFormat
Bug:
- GEOS-597 sql-injection
- GEOS-1038 New ArcSDE featuretypes aren’t compatible with their default output
- GEOS-1290 time templates shoud by default understand dates produced by postgis
- GEOS-1694 Bridge to old style service API disregards content disposition
- GEOS-1702 KVPRequestReader throws exception when it should ignore the parameter
- GEOS-1708 NPE when making a WFS 1.0 GetFeature with a bbox but no property name
- GEOS-1730 enable kvp parsers to engage only on a particular service / version / request
- GEOS-1834 WCS 1.0 cite negotiation tests do pass only if WCS 1.1 module is not around
- GEOS-1900 NullPointerException evaluating between filter in an SLD
- GEOS-1971 “SRS List” link in FeatureType Edit form yields 404
- GEOS-2001 WellKnownNames aren’t right in SLD
- GEOS-2025 Global max features not honored anymore on trunk
- GEOS-2036 WMS layer groups , max coordinates are garbage
- GEOS-2045 Geoserver does not start when installed on a path with spaces
- GEOS-2051 Caching configurations are not loaded anymore
- GEOS-2054 Wms Reflect not correctly reproiecting layer from srs=epsg:3003 to srs=epsg:4326
- GEOS-2059 WMS Reprojection does not work for postgis if geometries have no embedded srs
- GEOS-2064 Make GeoServer pass the official wfs 1.1 cite test suite
- GEOS-2065 Test passing by accident on the new WFS 1.1 test suite
- GEOS-2068 Fix WFS 1.1 xlink failures
- GEOS-2073 Failure to reproject bounding box in KML
- GEOS-2078 WMS reflector code is therad unsafe
- GEOS-2125 Exception on changing LayerGroup Configuration
Task:
Tele Atlas Heart GeoServer
It’s nice to see that GeoServer is getting some recognition from those in the wider commercial GIS world. Tele Atlas, the map data provider famously known for providing its road data to Google Maps, has written a white paper on “Open Source Map Rendering.” The white paper zeros in on GeoServer as its open source solution, so we all felt our ears burning around here.
The paper guides users through the rendering of Tele Atlas data using GeoServer and related software such as PostGIS and OpenLayers. The paper and its data are only available to members of Tele Atlas’s DeveloperLink network. (If you are not a member of DeveloperLink, you can sign up.) Once logged in, the paper can be found in Technical Tools / Training & Technical Information / White Papers (Direct link)
I found this white paper to be a simple and helpful tutorial, regardless of whether one is working with Tele Atlas data or not. There are copious links to GeoServer’s documentation as well as to forums on the Tele Atlas site, so the reader is never lacking in avenues for finding out more information. It is a testament to the robustness of GeoServer that a high-quality commercial data provider such as Tele Atlas is recommending GeoServer’s use to their customers.
A New UI is Dawning
The GeoServer team has been working on something very exciting over the past few months, that we’d like to share with you now. We have the beginnings of a brand new user interface on the admin console for GeoServer.
The admin console isn’t the face of GeoServer; the maps one serves with it are. (And even then, it’s really the application, such as OpenLayers, or whatever front end is used, that is the real face.) That said, anyone who has spent any time working with GeoServer needs to get very intimate with the admin console. The current UI is based on Apache Struts, which was historically the de facto Java web framework standard. However, it does have its limitations, mainly, its difficulty in maintenance and extensibility, and its programmer-centric workflow. Personally, I always felt that the UI was never built with the end user in mind, and I think most would agree. This was fine back in the day when the project was in its infancy, but now that GeoServer has become an enterprise-level product, able to compete in the marketplace with any geospatial server, the community has come to think that now was an appropriate time to rethink the UI with the future, and the users, in mind.
The new UI is based on Apache Wicket. Those who are curious about the more technical aspects of Wicket vs. Struts, they are welcome to read the Wicket GeoServer Improvement Proposal (and Wicket also has a nice page on the rationale behind yet another framework.) Personally, I think one look at the new environment will convince you that the product has turned a corner.
And so I welcome all users and developers to the first alpha release of GeoServer 2.0. This release is very experimental, and is intended primarily to show off the new user interface. The entire team is looking for any feedback on the look and feel of the new interface. Please sign up for the users or developers mailing list if you haven’t already, as posting there is the best way to ensure your feedback is noted and recorded by all.
One note on the distribution of 2.0.0-alpha1. Due to the very experimental nature of the release, it is currently being offered in .WAR (web archive) format only. This means that you will need a container server such as Tomcat or JBoss to be able to run the software. Future releases will contain all of the standard formats.
For more information and technical details about the new UI, please see the following links:
Download GeoServer 2.0.0-alpha1
GeoServer 2.0.0-alpha1 is available from the SourceForge Download Page.
Released on August 11, 2008. SourceForge Release 619085
-
geoserver-2.0.0-alpha1-war.zip (Web archive)
Due to the very experimental nature of this release, only the .WAR is currently being distributed.
Release notes
Improvement:
- GEOS-2077 Create a spring reloading handler for wicket
- GEOS-2080 Set default value for datastore namespace from the “folder” the datastore is being set up into
- GEOS-2087 Icons for categories and menu links
- GEOS-2099 Add remember me cookies handling in new UI
- GEOS-2108 Use the standard markup for datastore editor
- GEOS-2111 When configuring a new FeatureType, fill out default metadata from the one provided by FeatureSource.getInfo()
Bug:
- GEOS-2010 DataTree error message on back button with FF3
- GEOS-2079 Error thrown if enabling a datastore configuration but can’t connect to the backend
- GEOS-2104 ResourcePool.getDataStore and ModificationProxy.invoke mask source exceptions
- GEOS-2112 MapPreview page shows disabled resources, which then fail to show up
Task:
Vulnerability
- GeoServer Security Update - November 2026
- Java4Shell (CVE-2026-114938): add one Java flag to GeoServer today
- GeoServer 3.0.2 Release
- GeoServer 2.28.6 Release
- GeoServer 2.27.7 Release
- GeoServer Security Update - September 2026
- GeoServer 3.0.1 Release
- GeoServer 2.28.5 Release
- GeoServer 2.27.6 Release
- GeoServer 3.0.0 Release