[QGIS-Developer] Oracle spatial compound (2004 SDO_GTYPE collection) objects

Julien Cabieces julien.cabieces at oslandia.com
Wed May 27 01:19:47 PDT 2020


Hi Fabio,

> Hi,
>
>
>
> I have "collection" objects (2004 SDO_GTYPE) from an Oracle spatial DB,
> that I wish to display using QGis. As far as I understood, this isn’t
> possible and I would like a confirmation, or some workaround, if ever
> possible.

It's not possible indeed, your vector layer need to have a more precised
geometry type so QGIS could handle it correctly. When you create a new
geometry from "collection", what do you expect? a point, a line, a poly?

Actually, for now, QGIS accept layer with mixup of single and multi geometry, line
and circular string but there is this PR [0] that try to get rid of this
because it leads to some issues (arc being segmentized in edition for instance)

[0] https://github.com/qgis/QGIS/pull/34358

As a workaround, you should make some Oracle view to expose the
different type of geometry so it could be loaded gently on QGIS (you'll
have several layer)

>
>
>
> The following is an example of an object found in my “shape” column:
>
>
>
> MDSYS.SDO_GEOMETRY(*2004*, NULL, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1,
> 5, 2, 1, 9, 2, 1, 13, 2, 1, 17, 2, 1, 21, 2, 1, 25, 2, 1, 29, 1, 2, 33,
> 1003, 1, 41, 1003, 1), MDSYS.SDO_ORDINATE_ARRAY(700518.829, 5156838.484,
> 700520.831, 5156822.663, 700516.342, 5156903.685, 700540.45233515,
> 5156890.95679796, 700505.811693905, 5156881.54926549, 700516.297,
> 5156888.439,  [ . . . ]
>
>
>
> Trying to add this as a layer results in an error like:
>
>
>
> “Tipo geometria e SR non definiti per la colonna vuota SHAPE” (translated:
> “undefind geomeotry type and SR for the empty SHAPE column”)
>
>
>
> I also tried downloading latest 3.12.3 release, as I read in the change
> logs there was an added support for “Oracle compound polygon”, but I guess
> that wasn’t exactly what I needed.
>
>

No, it's for polygon which are made of lines and arcs.

>
> Thanks for any help
>
> Fabio (Rome – Italy)
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the QGIS-Developer mailing list