[gdal-dev] GetExtent method

Clay, Bruce bclay at ball.com
Tue Sep 2 12:39:39 EDT 2008

  As best I can tell the data layer is recognized as an OGROCITableLayer
but the call to GetExtent only goes down to the OGRLayer.  It is not
passed down to the specific (OCI) driver.  The calls to ResetReading and
GetNextFeature in the GetExtent method are passed to the OCI driver but
the GetGeometryRef and GetEvelope are not.  The process flows into the
"if (poGeom && !bExtentSet)" and the first getEnvelope inside the while
statement then goes into the else portion for all of the remaining
features in the dataset.


-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Tuesday, September 02, 2008 11:55 AM
To: Clay, Bruce
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] GetExtent method

Clay, Bruce wrote:
> When I used the debugger to step into the OGRLayer GetExtent method I 
> noticed that it walks through all of the features in the dataset and 
> tests the envelope of each feature in the set.
> Are there any driver specific optimizations (i.e. OCI)  that could be 
> called instead of this one since it does take a long time for a large 
> dataset?
> I realize we can create our own but I would like to use a built in 
> function if it is available.
> Frank: Since you are working in the OCI driver would this be a good
> to add something like:
>             select min(a1.SHAPE.SDO_POINT.X),
>  max(a1.SHAPE.SDO_POINT.X),
>  min(a1.SHAPE.SDO_POINT.Y),
>  max(a1.SHAPE.SDO_POINT.Y) from DatasetName a1;
> Of course that falls back on the first question, is there already a 
> built in method.


We already have a specialized implementation of


I wonder if this optimized case is failing for some reason for you?  Or
perhaps you are working with an result from ExecuteSQL()?

Best regards,
I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

This message and any enclosures are intended only for the addressee.  Please  
notify the sender by email if you are not the intended recipient.  If you are  
not the intended recipient, you may not use, copy, disclose, or distribute this  
message or its contents or enclosures to any other person and any such actions  
may be unlawful.  Ball reserves the right to monitor and review all messages  
and enclosures sent to or from this email address.

More information about the gdal-dev mailing list