SDO_MAX_MBR_ORDINATE

I am attempting to get the MIN and MAX MBR for a layer using SDO_GEOM.SDO_MIN_MBR_ORDINATE and SDO_GEOM.SDO_MAX_MBR_ORDINATE procedures. I am getting an error when I call SDO_MAX_MBR_ORDINATE on an oriented point in 10GR1. All is fine in 10GR2.
Any idea what I may be doing wrong?
When the test case is run on 10GR1 both calls to SDO_MAX_MBR_ORDINATE are failing with
ORA-06533: Subscript beyond count
Test case from Oracle example.
Test Case
CREATE TABLE COLA_MARKETS (
MKT_ID NUMBER PRIMARY KEY,
NAME VARCHAR2(32),
SHAPE SDO_GEOMETRY);
INSERT INTO COLA_MARKETS VALUES(
91,
'ORIENTED_POINT',
SDO_GEOMETRY(
2001,
NULL,
NULL,
SDO_ELEM_INFO_ARRAY(1,1,1, 3,1,0),
SDO_ORDINATE_ARRAY(12,14, 0.3,0.2)));
SELECT SDO_GEOM.SDO_MIN_MBR_ORDINATE(A.SHAPE,1) MIN_MBR_1
FROM COLA_MARKETS A;
SELECT SDO_GEOM.SDO_MIN_MBR_ORDINATE(A.SHAPE,2) MIN_MBR_2
FROM COLA_MARKETS A;
SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(A.SHAPE,1) MAX_MBR_1
FROM COLA_MARKETS A;
SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(A.SHAPE,2) MAX_MBR_2
FROM COLA_MARKETS A;
R1 - Output
Table created.
1 row created.
MIN_MBR_1
12
1 row selected.
MIN_MBR_2
14
1 row selected.
SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(A.SHAPE,1) MAX_MBR_1
ERROR at line 1:
ORA-06533: Subscript beyond count
ORA-06512: at "MDSYS.SDO_GEOM", line 3688
ORA-06512: at "MDSYS.SDO_GEOM", line 3706
SELECT SDO_GEOM.SDO_MAX_MBR_ORDINATE(A.SHAPE,2) MAX_MBR_2
ERROR at line 1:
ORA-06533: Subscript beyond count
ORA-06512: at "MDSYS.SDO_GEOM", line 3688
ORA-06512: at "MDSYS.SDO_GEOM", line 3706
R2 - Output
Table created.
1 row created.
MIN_MBR_1
12
1 row selected.
MIN_MBR_2
14
1 row selected.
MAX_MBR_1
12
1 row selected.
MAX_MBR_2
14
1 row selected.

H,
This is a bug in 10gR1.
siva

Similar Messages

  • SDO_MAX_MBR_ORDINATE Error

    Hi-
    We are getting an error when we attempt to use SDO_MAX_MBR_ORDINATE, but not when we use SDO_MIN_MBR_ORDINATE. For instance, this query works:
    SELECT
    MIN(SDO_GEOM.SDO_MIN_MBR_ORDINATE(siteGeom.GEOM, 1)) x1,
    MIN(SDO_GEOM.SDO_MIN_MBR_ORDINATE(siteGeom.GEOM, 2)) y1
    FROM WDNR_HISTORIC_STAR.FM_SITE_DIM siteGeom
    While this query fails:
    SELECT
    MIN(SDO_GEOM.SDO_MIN_MBR_ORDINATE(siteGeom.GEOM, 1)) x1,
    MIN(SDO_GEOM.SDO_MIN_MBR_ORDINATE(siteGeom.GEOM, 2)) y1,
    MAX(SDO_GEOM.SDO_MAX_MBR_ORDINATE(siteGeom.GEOM, 1)) x2,
    MAX(SDO_GEOM.SDO_MAX_MBR_ORDINATE(siteGeom.GEOM, 2)) y2
    FROM WDNR_HISTORIC_STAR.FM_SITE_DIM siteGeom
    This is the error message:
    Error: java.sql.SQLException: ORA-12801: error signaled in parallel query server P000
    ORA-06533: Subscript beyond count
    ORA-06512: at "MDSYS.SDO_GEOM", line 3688
    ORA-06512: at "MDSYS.SDO_GEOM", line 3706
    This query worked under 9i and has only stopped working since we upgraded to 10G. Does anyone have ideas as to what might be causing this? All geometries in the table are points.
    Thanks,
    Eric Everman
    USGS

    Hi Eric,
    This is bug #3513915. I believe it is new as I didn't see anything similar in Oracle's bug database (I just entered it).
    Regards,
    Dan

  • SDO_SAM.TILED_BINS using xdivs and ydivs fails

    I'm using SDO_SAM.TILED_BINS to generate some grids, but with some combinations of xdivs and ydivs if doesn't return correct.
    To be simple, theres a example like the one in documentation:
    If xdivs=7 and ydivs=7
    SELECT * FROM TABLE(sdo_sam.tiled_bins(-180, 180, -90, 90, null, null, 7, 7)) ORDER BY id;
    it is OK, it returns (7+1)*(7+1) rows, from ID 0 to 63.
    If xdivs=5 and ydivs=7
    SELECT * FROM TABLE(sdo_sam.tiled_bins(-180, 180, -90, 90, null, null, 5, 7)) ORDER BY id;
    it is OK, it returns (5+1)*(7+1) rows, but some IDs repeats and the grid is not complete.
    I'm returning SRID as null, it doesn't matters to me, but if I use one, the same problem occurs.
    Tested in Oracle 10.2.0.1 and 11.1.0.7.0
    Maybe I missing something?
    Thanks in advance
    Edited by: user7100389 on Nov 26, 2009 8:33 AM

    Rob,
    You can use SDO_GEOM.SDO_MIN_MBR_ORDINATE and SDO_GEOM.SDO_MAX_MBR_ORDINATE to compute the length and width of an mbr.
    References:
    [ SDO_GEOM.SDO_MIN_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866250 ]
    [ SDO_GEOM.SDO_MAX_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866249 ]
    Regards,
    Noel

  • Get length and width of a rectangle

    I am using sdo_sam.tiiled_bins to breakup rectangles into different sections. I need to divide the rectangle along the x or y axis depending on if is longer or wider. I checked the documentation and I could not find a way to get the length and width of a minimum bounding rectangle. Is there any built in functionality to get the length and width of a rectangle or do i have to create my own? Database is 11gr2.
    Thanks
    Rob

    Rob,
    You can use SDO_GEOM.SDO_MIN_MBR_ORDINATE and SDO_GEOM.SDO_MAX_MBR_ORDINATE to compute the length and width of an mbr.
    References:
    [ SDO_GEOM.SDO_MIN_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866250 ]
    [ SDO_GEOM.SDO_MAX_MBR_ORDINATE | http://docs.oracle.com/cd/E11882_01/appdev.112/e11830/sdo_objgeom.htm#i866249 ]
    Regards,
    Noel

  • Width of MBR for each polygon

    I need to create a view that is being used in a jsp. It needs to select from a series objects : the centrex, centrey and a "zoom width" in meters for each object. The centre x and y is not a problem as it is in the underlying tables. However i need to generate the zoom width in the view. The zoom width being the width of the polygon , therefore the view/jsp shows the entire polygon on the web page. However the jsp will only display the zoom width as a number field therefore i do not know if i generate the view using a sdo_geom function or a nother function. Is it possible to use several functions (and if so what would they be) e.g sdo_mbr or sdo_adrea to achieve this zoom width as a number field (in meters) or should i be going about it another way.

    you could use the SDO_GEOM.SDO_MAX_MBR_ORDINATE and
    SDO_GEOM.SDO_MIN_MBR_ORDINATE function for this.
    (http://download.oracle.com/docs/html/B14255_01/sdo_objgeom.htm#i866249)
    width: delta x of the MBR:
    select SDO_GEOM.SDO_MAX_MBR_ORDINATE(geometry, 1) - SDO_GEOM.SDO_MIN_MBR_ORDINATE(geometry, 1)
    from table_name
    height: delta y of the MBR:
    select SDO_GEOM.SDO_MAX_MBR_ORDINATE(geometry, 2) - SDO_GEOM.SDO_MIN_MBR_ORDINATE(geometry, 2)
    from table_name
    Maybe you need the max of the delta's as your width in order to have the geometry completly in your map area when zoomed to it, but this can be dependant from your application
    select ID, MAX(delta)
    from
    select ID, SDO_GEOM.SDO_MAX_MBR_ORDINATE(geometry, 1) - SDO_GEOM.SDO_MIN_MBR_ORDINATE(geometry, 1) as delta
    from table_name
    union
    select ID, SDO_GEOM.SDO_MAX_MBR_ORDINATE(geometry, 2) - SDO_GEOM.SDO_MIN_MBR_ORDINATE(geometry, 2) as delta
    from table_name
    group by id
    Luc

Maybe you are looking for

  • Issue with production order linked to quote instead of sales order

    Hi Gurus, I did a lot of digging through SAP notes and accross the internet. Before I contact SAP, just wanted to give a shot @ SDN. Please help. Background- for ATO (VC assemble to Order): i) Created a quote ii) Created a sales order with reference

  • Goods Receipt Posting to Balance Sheet

    Hi When we carry out a Goods Receipt, the system posts an amount dirently to the P&L. As we want to accure the cost we then journal the value out of the P&L and onto a Balance Sheet. Is it possible that we post this amount directly to the Balance She

  • Cf8 report builder characterEncode ?

    HI,all I am using win xp sp3/cf8.01, cf8 report builder,mssql2k5,IE6 There is the following requirement in a program:  When there is Chinese character in the label of report builder, but not get Chinese from the Database, as the picture illustrate be

  • What are the most useful/your favorite Ipod touch apps?

    I am currently in the market for an ipod and I'm just not sure if I need a touch or not. I would love a 16gig but they don't exist which means I have to spend a lot of money on 32 gig. Anyways, I am just curious if the investment will be worth it in

  • BSEG-VBUND Updation using Call up point 3 while posting from VF01

    Hi, I have a requirement to update BSEG-UPDATE during the Invoice posting VF01. I tried to use Substitution at CALL UP POINT 3. but it is not updating the value. Please help. Thanks, Leela Krishna