3

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)?

2
  • 5
    configuring GeoServer you need to 'Set the layer’s style' Create a Layer - docs.geoserver.org/latest/en/user/gettingstarted/…
    – Mapperz
    Commented Oct 15, 2012 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". Commented Oct 16, 2012 at 6:41

4 Answers 4

3

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.

2

May be you can change the styles in your published layers.

layer(Menu on the left)---> select you published layers--->select publish --->Default Style--->change to polygon

1

"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.

0

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)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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