Opened 20 years ago

Closed 16 years ago

#543 closed enhancement (fixed)

OCI driver: getExtent should use USER_SDO_GEOM_METADATA

Reported by: bartvde@… Owned by: Mateusz Łoskot
Priority: high Milestone: 1.6.0
Component: OGR_SF Version: unspecified
Severity: minor Keywords: oracle oci
Cc:

Description (last modified by Mateusz Łoskot)

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

comment:1 by warmerdam, 18 years ago

Mateusz,

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

comment:2 by Mateusz Łoskot, 17 years ago

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

comment:3 by warmerdam, 17 years ago

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.

comment:4 by mloskot, 16 years ago

Keywords: oracle oci added
Status: newassigned

comment:5 by Mateusz Łoskot, 16 years ago

Description: modified (diff)

comment:6 by Mateusz Łoskot, 16 years ago

Milestone: 1.6.0

comment:7 by Mateusz Łoskot, 16 years ago

Resolution: fixed
Status: assignedclosed

I've committed requested enhancement to trunk (r14864). This ticket is rather old, so I'm closing without waiting for review, but feel free to reopen if doesn't work.

Note: See TracTickets for help on using tickets.