Ticket #543 (new enhancement)

Opened 4 years ago

Last modified 2 years ago

OCI driver: getExtent should use USER_SDO_GEOM_METADATA

Reported by: bartvde@xs4all.nl Assigned to: mloskot
Priority: high Milestone:
Component: OGR_SF Version: unspecified
Severity: minor Keywords:
Cc:

Description

As I think Daniel noted in another message, you can pre-supply the extent
(which is what I assume is taking a long time).  The better solution would
be for me to override the OGR OCI driver's GetExtent() logic to use the
USER_SDO_GEOM_METADATA as you suggest.  I kind of thought I had done that,
but looking through the code I see the generic logic is used which involves
reading the complete table.
 
Feel free to submit that as an enhancement request in the GDAL/OGR
bugzilla.
 
While a great deal of work went into optimization of the OCI driver for
loading Oracle with data, the read side was not nearly as well optimized
since that was not the focus of the funding project.

Change History

07/17/06 13:41:23 changed by warmerdam

Mateusz,

Could you look into implementing this.  Make sure there is a fallback if
the extent metadata does not exist. 

12/21/06 07:52:16 changed by mloskot

> The better solution would be for me to override the OGR OCI driver's
> GetExtent() logic to use the USER_SDO_GEOM_METADATA as you suggest.

Frank, could you confirm if my understanding of the problem is correct:

1. OGRLayer::GetExtent() provides default implementation based on walking
through all features calculating bounding box for the whole layer

2. The solution in 1. can be optimized for OCI by reading bounding box directly from DIMINFO from the USER_SDO_GEOM_METADATA view.

3. Bart suggests to override default implementation provided by OGRLayer::GetExtent() with specialized and faster version for OCI,
in example in form of OGROCILayer::GetExtent().

Is this correct?

12/21/06 12:32:16 changed by warmerdam

1) Yes
2) Yes
3) Yes, roughly

Actually, I think the optimized version would only be on the 
OGROCITableLayer since statement results do not have meaningful 
correspondence to the metadata table. 

If this is implemented please be very careful to have appropriate
fallbacks if the metadata extents are missing or obviously garbled.