Skip to main content

Hi!

I have tried for hours to convert an Oracle dataset to PostGIS for use in a wms service. However, at the end of the line, Geoserver fails because of Compound curve objects in the database. These rogue objects go undetected and unaltered through a number of transformers and are written to PostGis with no errors.

I have tried the Arc Stroker and also tried to expose this format attribute. Nothing helps. Note that Qgis has no problem with these objects, nor the Geoserver layer viewer. Only at the last step, when the wms is to be used, it fails.

At last I wrote the stuff to a shapefile and then from the shapefile to PostGis which of course is a terrible boring workaround.

I would say that the Oracle reader is to blame here, but there may be a more sophisticated way out of the mess.

I'd be glad to know.

Regads, Mats.E

,

Instead of the Oracle Spatial Reader you could use the SQLCreator.

In the SQL statement you can use the Oracle Spatial function sdo_geom.sdo_arc_densify to transform the compound curves to multi line objects.

This way you use Oracle Spatial functionality to avoid compound curves.

Hope this helps.


You can use oracle spatial functions to detect compound curves, and either replace the bits or proces them seperately.

On the other hand, you say failure occurs on intstant of wms creation?

WITH elem_info AS (

SELECT

TRUNC((ROWNUM - 1) / 3, 0) element_no

, MAX(DECODE(MOD(ROWNUM, 3), 1, t.COLUMN_VALUE, NULL)) offset

, MAX(DECODE(MOD(ROWNUM, 3), 2, t.COLUMN_VALUE, NULL)) etype

, MAX(DECODE(MOD(ROWNUM, 3), 0, t.COLUMN_VALUE, NULL)) interpretation

, tbl.id

FROM ( SELECT * FROM etc WHERE etc ) tbl

, TABLE(tbl.geometry.sdo_elem_info) t

GROUP BY TRUNC((ROWNUM - 1) / 3, 0), id

)

SELECT ei.id, ei.element_no, ei.offset, ei.etype, ei.interpretation

FROM elem_info ei

WHERE ( ei.etype IN ( 1005, 2005) AND ei.interpretation > 1 )

ORDER BY id

;

search compund objects with arcs

There are lots of examples on the net..


Reply