Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have implemented the example at http://www.gistutor.com/openlayers/22-advanced-openlayers-tutorials/47-openlayers-wfs-t-using-a-geoserver-hosted-postgis-layer.html and got it working properly.

Now I am trying to get the same example running, but with Oracle Spatial (or Locator). I imported the test data shapefile to my Oracle DB using Oracle Map Builder (https://forums.oracle.com/forums/thread.jspa?threadID=1030707&start=0&tstart=0).

The data imported without errors, and I was able to configure GeoServer layer to use Oracle datasource for the data. However, when I look at the data with GeoServer's "layer preview", it's just points when it should be vector shapes.

This is how my layer looks like with Postgis (and how it should be): enter image description here

And this is how it looks like with Oracle: enter image description here

Any ideas on what went wrong? Loading the shapefile, configuring Oracle, configuring GeoServer, or what...?

share|improve this question
4  
configuring GeoServer you need to 'Set the layer’s style' Create a Layer - docs.geoserver.org/latest/en/user/gettingstarted/… –  Mapperz Oct 15 '12 at 13:51
    
Thanks! This worked. For some reason, with PostGIS, default style was "polygon" (so I did not need to touch it) but with Oracle, it was "point". –  Janne Mattila Oct 16 '12 at 6:41
add comment

3 Answers

In Oracle the geometry type can be declared only as a metadata of the spatial index, evidently the import tool did not do so. Another option is to setup a geometry metadata table, please consult the geoserver documentation for details.

share|improve this answer
add comment
up vote 1 down vote accepted

"configuring GeoServer you need to 'Set the layer’s style' Create a Layer - http://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html – Mapperz"

Changing layer's default style from "point" to "polygon" did the trick.

share|improve this answer
add comment

configuring GeoServer you need to 'Set the layer’s style' Create a Layer -

enter image description here

Then this style can be then applied to Polygon Layer from the feature Store. http://docs.geoserver.org/latest/en/user/webadmin/data/styles.html?highlight=new%20style

http://docs.geoserver.org/latest/en/user/gettingstarted/shapefile-quickstart/index.html

(apologies for not making comment an answer - due to limited time yesterday)

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.