<br clear="all"><br>
<br><br><div class="gmail_quote">2012/8/22 Jukka Rahkonen <span dir="ltr"><<a href="mailto:jukka.rahkonen@mmmtike.fi" target="_blank">jukka.rahkonen@mmmtike.fi</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
I learned to use ogrinfo with --debug on lately and it revealed what<br>
all happens after sending plain ogrinfo through OCI driver. A few<br>
lines interest me. What is the meaning to doing the select from<br>
ALL_SDO_GEOM_METADATA then insert into USER_SDO_GEOM_METADATA as<br>
follows?<br>
<br>
OCI: Prepare(select min(case when r=1 then sdo_lb else null end) minx,<br>
min(case when r=2 then sdo_lb else null end) miny, min(case when r=1<br>
then sdo_ub else null end) maxx, min(case when r=2 then sdo_ub else<br>
null end) maxy from (SELECT d.sdo_dimname, d.sdo_lb, sdo_ub,<br>
sdo_tolerance, rownum r FROM ALL_SDO_GEOM_METADATA m, table(m.diminfo)<br>
d where m.table_name = UPPER('TABLE') and m.COLUMN_NAME =<br>
UPPER('GEOM') ) )<br>
<br>
OCI: Prepare(UPDATE USER_SDO_GEOM_METADATA SET DIMINFO =<br>
MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2899987.997,4000000.003,<br>
0.001),MDSYS.SDO_DIM_ELEMENT('Y',5999987.997,8000000.003,0.001)) WHERE<br>
TABLE_NAME = 'TABLE')<br>
<br>
I guess that meaning is to check all the metadata rows from the<br>
ALL_SDO_GEOM_METADATA view which are referring to the queried table.<br>
There can be several rows created be different Oracle users. Next the<br>
maximum BBOX is constructed and that is updated into<br>
USER_SDO_GEOM_METADATA view.<br>
<br><br></blockquote><div>It seems to me that first statement  should include an OWNER filter in the WHERE clause, or it will fetch all records for table with same name and same geometric filedname.<br><br></div></div>Regards<br>

<br>stefano<br>---------------------------------------------------<br>41.95581N 12.52854E<br><br><br><a href="http://www.linkedin.com/in/stefanoiacovella" target="_blank">http://www.linkedin.com/in/stefanoiacovella</a><br>

<br><a href="http://twitter.com/#%21/Iacovellas" target="_blank">http://twitter.com/#!/Iacovellas</a>