[GIS] Shapefile import with Oracle + GeoServer produces points instead of vector shapes

geoserveroracle-spatialshapefile

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 (e.g. loading the shapefile, configuring Oracle, configuring GeoServer)?

Best Answer

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.