mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
[BUGFIX][Oracle] Mixing SDO_GEOMETRY Point definition
Fixes #18900
In `sdoobj`, the `elem_info` array size is not the right way to defined the way
to read Point coordinate. The right way is to check the
sdoind attributes, like in Mapserver.
The way Mapserver defined check point coordinate: fd04328a89/maporaclespatial.c (L1588)
This commit is contained in:
parent
a11db8bbe1
commit
849278a2d6
@ -2544,19 +2544,13 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index )
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( iType == GtPoint && nElems == 0 )
|
||||
if ( iType == GtPoint &&
|
||||
sdoind->_atomic == OCI_IND_NOTNULL &&
|
||||
sdoind->point.x == OCI_IND_NOTNULL &&
|
||||
sdoind->point.y == OCI_IND_NOTNULL )
|
||||
{
|
||||
Q_ASSERT( nOrds == 0 );
|
||||
|
||||
if ( sdoind->_atomic != OCI_IND_NOTNULL ||
|
||||
sdoind->point.x != OCI_IND_NOTNULL ||
|
||||
sdoind->point.y != OCI_IND_NOTNULL )
|
||||
{
|
||||
qDebug() << "null point";
|
||||
v = QVariant();
|
||||
return true;
|
||||
}
|
||||
|
||||
double x, y, z = 0.0;
|
||||
if ( !getValue( &sdoobj->point.x, x ) )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user