Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried publishing an existing PostGis table with geometry column named "wkb_geometry" to Geoserver using its REST API. I used the following command:

curl -v -u admin:geoserver -X POST -H "Content-type: text/xml" -d "<featureType><name>boundary</name></featureType>" http://mygeoserver:8080/geoserver/rest/workspaces/myworkspace/datastores/mypostgis/featuretypes

however, the server returned:

> <featureType><name>adminbnd_prov_xxx</name></featureType>HTTP/1.1 500 Internal
 Server Error
< Content-Type: text/plain
< Transfer-Encoding: chunked
< Server: Jetty(6.1.8) Error occured calculating bounds* Connection #0 to host 
mygeoserver left intact
* Closing connection #0

One thing I found out is that if I renamed my geometry column from "wkb_geometry" to "geom" and execute again the command, the PostGis table is published successfully.

Using Geoserver's web interface, this is a not an issue. You can publish PostGis tables regardless of its geometry column name.

Is this the default behaviour for the REST api? Is there any workaround on this? What does "error occured calculating bounds" has to do with it?

Thanks a lot!

share|improve this question
if you do a rest request for the layer now it will show you the format for putting in the geom column name – iant Aug 1 '13 at 5:46
hi iant! I'm not exactly following what you mean. What kind of request do I have to make? – Angelo Arboleda Aug 1 '13 at 7:07
Thanks iant! That document has been my primary reference. Unfortunately I didn't see anywhere in the document how I can define the geometry column name Geoserver should expect from PostGIS. – Angelo Arboleda Aug 1 '13 at 8:23
GeoServer has no built-in expectations about the name, but it surely expects the geometry column to match what you declared in the geometry_columns table. The "error calculating bounds" might actually hide a PostGIS error when we are calling the estimated bounds pg function. – Andrea Aime Aug 1 '13 at 21:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.