SDO_RELATE command with 'coveredby' option doesnt return record as expected

Hi all,
I use oracle spatial 10.2. I use sdo_relate to compare 2 tables' geometries. The case is table 1 has ~2000 records, each is a retangle and has sdo_geometry field. 'Table 2' is transient geometry defined by sdo_geometry to a rectengle.
The definition of the table 2 is:
SDO_GEOMETRY(2003, NULL,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(-50,50, 50,-50)), 'mask=COVEREDBY') = 'TRUE';
I am working in world coordinates.
and the whole SQL for comparison is:
select name from KMK.summary where sdo_relate(mbr,SDO_GEOMETRY(2003, NULL,NULL, SDO_ELEM_INFO_ARRAY(1,1003,3), SDO_ORDINATE_ARRAY(-50,50, 50,-50)), 'mask=COVEREDBY') = 'TRUE';
The problem is that this command doesnt return any values, i.e no records are selected from table 1. I am sure that there are features that evaluate to true for 'mask=COVEREDBY'.
here is one of them:
SQL> SELECT SDO_AGGR_MBR(mbr) FROM kmk.summary where name = ' GETDB_GLOBAL_004065_00O';
SDO_AGGR_MBR(SHAPE)(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_
SDO_GEOMETRY(2003, NULL, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 3), SDO_ORDINATE_ARR
AY(-50, -25.25, -48.25, -24.5))
this teature's MBR goes to -50 and it should be selected.
What do I wrong?
Thanks

Hi I will give it a try on Monday for the numwidth20
I tried with inside mask and it returns the right number of records - only those that are completely within/inside the mask. Thisone record is still not selected.
I use ARCGIS on the same table with SDE so I know what number of records to expect.
When you did the test was GETDB_GLOBAL_004065_00O selected with coveredby mask?
We are running v 10.2.0.3 could this make a difference?
It seems to me that when the coordinates are evaluated the algorithm uses the following for comparison:
(in case of coveredby/inside) it comapres every point to the mask pounts and if it is less than it returns FALSE, it doesn't check if is is equal as well to return TRUE. On the other hand it checks if it is more or equal and if it is returns TRUE. That is why it selects record that have one boundary on top of the search window but extent outside it.
EDIT: It seems it is the precision. When I set it to 25 it returned -50.0000000003723 for the Xmin.
Now, this table has been created from and ESRI shp file, imported to oracle using ArcSDE. Do you have any idea of shp files and how the precisions are utilized in oracle?
Edited by: garnet on Mar 16, 2009 10:13 AM
Edited by: garnet on Mar 16, 2009 4:31 PM

Similar Messages

  • Tar command with compress option

    We are in process of developing the shell script to take the oracle database backup and using the TAR commnad with compress option as like below. But this commnad is not working. Please hlep
    cd /u01/oradev/datafiles
    tar cvf - data | compress -c > /u02/oraprod/dbf/proddata_`date +%d%b%Y`.tar.Z
    Appreciate your kind help.
    OS : Linux v5.5

    Assuming that you know what you are doing ito using primitive tar to backup a database, as oppose to rman, the command on Linux would look something as follows:
    tar -czvf database-backup.tgz /u01/orclwhere
    -c = create tar
    -z = compress tar
    -v = verbose
    -f database-backup.tgz  = filename of tarball
    /u01/orcl = database directory containing the data filesAlso make sure that the control files and pfile or spfile, are included.
    And seriously reconsider this approach. This process can run happily and without any errors, and still provide a totally useless database backup.

  • Logged in as guest on my macbook air now I cannot get it to start with the option to return with the password to the main user

    I wished to let a friend use my macbook air and signed in as the guest option. I am unable to re-enter as the main user as it now starts with the guest page. How do I get it to start on the original page.
    Thank you driving me crazy
    BenDiff

    Log out of the guest account first.

  • I am lost with iTunes, it doesnt do what I expect it to do !

    Hi All, before today i had purchased only two albums via iTunes on my Mac, today i purchased one more album using iTunes on my iPhone.
    The recent purchase (Henry Hall) is for my Mum and i would like to put the Album on a CD for her tonight, so i can give it to her tommorrow.
    However i goto iTunes on my Mac i can see the two albums (pink floyd) i purchsed along time ago.
    I can also see that iTunes on my Mac knows that I have purchased the Henry Hall album on my iPhone
    I have to create a NEW playlist containing ALL the tracks from the Henry Hall album.
    Please how can i do it ???
    <Edited by Host>

    The Purchased playlist contains purchases that are on your computer.
    Since you have not sync'd them from your iPhone or downloaded from iCloud, they will not show up in te Purchased playlist.
    Connect your iPhone then File > Devices - Transfer purchases.
    Or iTunes prefs > Store and tick Show iTunes in the Cloud purchases.
    Then go to Music, find the album/songs and click the cloud icon to downalod them (or select all the songs, right click - download).

  • Multiple records with select option

    i have to use select option in selection screen, which wl take the multiple values but that select option wont act as a range, the select option is a session name  from sm35, the table from where data is retrieved is APQI, i have used  a parameter before using select option ,like:
    selection-screen begin of line.
    parameters: P_grpid like apqi-groupid.
    select-options: s_grpid like apqi-groupid.
    selection-screen end of line.
    AT-SELECTION SCREEN ON VALUE REQUEST FOR p-GRPID. " previous situation
    {the code starts
    FM F4 selection is called}
    AT-SELECTION SCREEN ON VALUE REQUEST FOR S_GRPID-low. " CURRENT situation
    FM F4 selection is called}
    now when i give data in slection screen for s_grpid-low then it works as a parametr, but it doesnt take multiple values at s_grpid when i have alos mentioned the same for s_grpid-high.
    Please tell me how to achive multiple records with select option, or u can also send a sample code if you have..
    Thanks
    Swarnali

    Hello Swarnali,
    You need to fill internal table of select-option once you got into the event AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    so sudo code will be:
    AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    Select data from table.
       so_carr-LOW = value
       append so_carr.
    You can also use NO INTERVAL to suppress the so_carr-HIGH value on selection screen.
    Thanks,
    Augustin.

  • Command, Control, and Option keys no longer works with Citrix Receiver after upgrading to OSX 10.9.5

    At first my keyboard did not work with Citrix Receiver after upgrading to OSX 10.9.5 and I found the workaround by using "cmd + tab," however, once my keyboard work within Citrix, the "command, control, and option" keys no longer work.  Does anyone have a remedy for this?

    Keyboard no longer works with Citrix Receiver after upgrading to OSX 10.9.5

  • Repairing Library Permissions: But the instructions didn't work  clicking the iPhoto icon with the Option and Command keys opened iPhoto but not the First Aid as promised

    Went to Help.  But the instructions didn't work
    clicking the iPhoto icon with the Option and Command keys opened iPhoto but not the First Aid as promised

    Give this a try:
    1 -be sure to have a current backup of the iPhoto library.
    2 - download and launch http://www.macchampion.com/arbysoft/BatChmod.
    3 - click on the File button, locate and select your iPhoto Library.
    4 - check the Unlock and Apply to enclosed checkboxes.
    5 - make no changes to the other checkboxes
    6 - click on the Apply button.
    OT

  • ExecuteNonQuery doesnt return number of rows affected when used with PL/SQL

    ExecuteNonQuery doesn't return number of rows affected when used with PL/SQL but returns -1. The documentation says ExecuteNonQuery method of OracleCommand returns the number of raws affected but when used with PL/SQL, it returns -1 even the update statement successfully executes and affects multiple records with no exeptions thrown.
    However, if ExecuteNonQuery is used with update sql statement in the asp.net code it returns number of rows affected correctly. Does anybody know why ExecuteNonQuery behaves like this?
    I am using ODP.NET that comes with Oracle Client 11g. The version is 2.111.6.20 of ODP.NET, Oracle database server is 10g.
    Marat

    You can get the rowcount in the stored procedure via SQL%ROWCOUNT and then pass it out as a parameter.
    For example:
    SQL> create or replace procedure updatesal(v_deptno in number, v_rowsaff out number) as
      2  begin
      3  update emp set sal = sal * 5 where deptno = v_deptno;
      4  v_rowsaff := SQL%ROWCOUNT;
      5  end;
      6  /
    Procedure created.Cheers

  • Could not find the record specified with data_record option

    Hi, we've got the same error in a couple of templates, but have no idea what can be the cause or solution. Does anyone know where I should look when I got "Could not find the record specified with data_record option" as message?
    Thanks in advance!

    Hi Raf,
    That is what it normally is.  I thought it might be related to a multi-record form, like in this blog http://blogs.adobe.com/formfeed/2009/09/working_with_multiple_data_rec.html.
    That blog does not really go into it, but if your "record" is not the directly under the <xfa:data> element then you need a <record> element under config/data to say what the node is, something like <record>Worker</record>.
    You error message sounded familiar but I have not been able to reproduce it, but then I've moved on a couple of versions of Designer.
    Is it possible for you to share your form and seed data?
    Regards
    Bruce

  • Running reports via command-line with /batch option

    Hi,
    I have created a batch file which runs, and exports the results of 7 different discoverer reports with /batch option.
    Contents of batch file:
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    Sample of a cmd file the bacth file runs:....
    /connect user/password@oraprd /apps_responsibility "BIS Super User"
    /open "H:\Projects\DRP Import Modelling\Dev\Intransit Extract.dis"
    /sheet 1 /export xls "H:\Projects\DRP Import Modelling\automation\Intransit Input.xls" /batch
    The batch file runs ok and processes each report in sequence, and creates the excel export one after the other.
    However, I need to process the 7 reports in parallel, so changed the batch file to process in own thread :
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input1.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input2.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input3.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input4.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input5.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input6.txt"
    start c:\orant\discvr4\dis4usr /cmdfile "H:\Projects\DRP Import Modelling\automation\DRP Model Input7.txt"
    The reports kick off at the same time and I can see 7 dis4usr.exe processes running via task manager
    Problem:
    The first reports runs and exports ok.
    All the others dis4usr.exe processing stops with the following error pop-up:
    ! Could not open file. OK
    Question:
    Can you only process reports sequentially via command line mode with /batch option?
    If not...what am I missing...its driving me insane :)
    All asistance is greatly appreciated. Thanks

    Ladies and gentlemen.....I have solved my problemo!
    The reason why the rest of the reports were getting the 'could not open file.' error was due to the fact that each discoverer instance launched was
    trying to access the same standard log file simultaneously.
    I modified each cmd file to write logging info to individual files: eg
    /logfile "H:\Projects\DRP Import Modelling\Automation\input2_log.txt"
    Now that's there's no contention with logging, the reports are firing off beautifully in parallel :)
    I am definitely having a beer this evening!
    Thanks for everyone's input...kept me on the righteous path :)

  • Script combining menu command with options bar option?

    Would like to call the Transform:Scale command AND activate the "Maintain aspect ratio" option from the options bar.
    Any idea? thx.

    This shoud call the transform command with the aspect ratio linked. And you should be able to use it in a Configurator button.
    function transformDialog() {
        var desc = new ActionDescriptor();
            var ref = new ActionReference();
            ref.putEnumerated( charIDToTypeID('Lyr '), charIDToTypeID('Ordn'), charIDToTypeID('Trgt') );
        desc.putReference( charIDToTypeID('null'), ref );
        desc.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') );
            var desc1 = new ActionDescriptor();
            desc1.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), 0.000000 );
            desc1.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), 0.000000 );
        desc.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc1 );
        desc.putUnitDouble( charIDToTypeID('Wdth'), charIDToTypeID('#Prc'), 100.000000 );
        desc.putUnitDouble( charIDToTypeID('Hght'), charIDToTypeID('#Prc'), 100.000000 );
        desc.putBoolean( charIDToTypeID('Lnkd'), true );
        desc.putEnumerated( charIDToTypeID('Intr'), charIDToTypeID('Intp'), charIDToTypeID('Bcbc') );
        try{
            executeAction( charIDToTypeID('Trnf'), desc, DialogModes.ALL );
        }catch(e){}
    transformDialog();

  • Sdo_relate command

    i have got two oracle spatial layers, from two different databases but of the same location (Roads). one with field name
    "ufi and geom."
    UFI
    BB06104925
    other with
    "pfi ufi and geom"
    PFI
    6318226
    select pfi, sdo_relate( b.geom, c.shape, 'MASK=INSIDE querytype=WINDOW')='TRUE') from
    b_tr_roads2 b, b_geo_roads2 c where b.pfi=6318226 and c.ufi='BB06104925'
    Output
    PFI
    6318226
    6318226
    logically it should return one record but it returns two records. Does anybody can catch my error.
    thanks

    The SDO_RELATE command should only be used in the context of the WHERE clause, never in the SELECT clause.
    You should rewrite this query:
    select /*+ ordered */ pfi
    from b_geo_roads2 c, b_tr_roads2 b
    where b.pfi=6318226 and c.ufi='BB06104925'
    and sdo_relate( b.geom, c.shape, 'MASK=INSIDE querytype=WINDOW')='TRUE';
    However, since you are only comparing two geometries, it would be better to do this without an operator, using a function instead (assuming tolerance in user_sdo_geom_metadata is 0.05):
    select pfi
    from b_geo_roads2 c, b_tr_roads2 b
    where b.pfi=6318226 and c.ufi='BB06104925'
    and sdo_geom.relate( b.geom, 'inside' c.shape, 0.05) ='INSIDE';
    [Edited by: dabugov on Jul 11, 2005 8:21 AM]

  • Issue with Select options in select statement - ABAP Question

    Hi
    I am facing an issue with select options. Select statement is returning sy-subrc as 4.
    I wrote the program as below:
    SELECT-OPTIONS:
    s_kunnr FOR bsad-kunnr,
    s_lifnr FOR bsak-lifnr,
    s_gjahr FOR bsad-gjahr,
    s_bukrs FOR bsad-bukrs,
    s_saknr FOR bsad-saknr,
    s_budat FOR bsak-budat.
    In start of selection I have written the select statement as
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs AND lifnr = s_lifnr AND gjahr IN s_gjahr AND budat IN s_budat AND saknr IN s_saknr.
    In selection screen I have not entered any values and executed the program. I am not getting any result. When I debug that, sy-subrc is 4 at above select statement. But table has records.
    If am removing the "lifnr = s_lifnr " condition in select then select is returning values.
    I am not getting where I made the mistake. Please suggest.
    Thank you
    Hanu

    Hi,
    The problem here with where condition select option lifnr = s_lifnr.
    Use below select query.
    SELECT * FROM bsak INTO TABLE lt_bsak
    WHERE bukrs IN s_bukrs
        AND lifnr     IN s_lifnr
        AND gjahr   IN s_gjahr
        AND budat  IN s_budat
        AND saknr  IN s_saknr.
    s_lifnr is a select option and you are passing it as parameter lifnr = s_lifnr.
    if you want to pass this s_lifnr as single vale then pass in below mentioned way.
    lifnr = s_lifnr-low
    BR,
    Vijay

  • Tcp/ip write help - need to send a motor command with parameters

    hello - i have one small, main labview 7.0 vi that i use to control a drill's two motors.
    right now i press a button on the front panel to move the motor, and when i do, a sub vi window pops up so the operator can set a couple of parameters and press an ok button.....the vi then sends the command with the parameters to the drill's motors.
    i am trying to change it so i can send the move command from another computer, in another room, while the main vi sits on the computer with the drill. i know i will use TCP listen, write, read, and close in both the main vi (the TCP server?) and the client which is on the remote computer.
    my problem is with setting the parameters for the subvi's that usually pops up. how do i set the parameters from the remote-client and have them be sent into the subvi on the main vi. if i can do this, i would have to also have a way to close the sub vi after it pops up in the main program too.
    OR should i use something else like and application reference or an invoke node function?????
    please help
    thanks!!!!
    sam

    Hi again,
    If the VI in the lab will be running continuously, then you will need
    to alter some things from the example I sent you or look at an
    alternate implementation. The example I sent you assumed that the VI in
    the lab was not running. This technique actually starts the VI and runs
    it somewhat like a subVI. It inputs values into the connector pane,
    runs it, and then returns values from the outputs on the connector pane
    after it finishes executing. It will not work to call a VI by reference
    if it is already continuously running.
    Instead I imagine you would want to have your VI in the lab have some
    sort of State Machine that polls a certain control value, such as an
    enum control, to determine which state to execute next. You could
    modify the technique I first sent to still open a reference to the VI
    in the lab, but it wouldn't try to run it. Instead you could use the VI
    method Set Control Value to set the value of a certain control or
    controls in the lab VI to certain values. The VI in the lab would then
    hopefully be in some Idle state where it polled one of those control
    values continuously to decide what to do next. That would allow the VI
    in the office to programmatically send commands to the other VI, as
    well as parameters for those commands. Simply set control values for
    the VI in the lab and let the VI in the lab go about its business. I've
    attached an example below.
    That's just one idea. Other options you have would be to use a
    DataSocket connection to send parameters and commands back and forth
    between computers. This is a pretty simple API to use. If you have
    LabVIEW 8, Shared Variables are an option. Or you might look into
    simply using Remote Front panels, which allows you to connect to a VIs
    Front Panel across the network. You could then have the whole VI in the
    Lab, but you could connect to it, view it, modify the controls and so
    on from your office. If you want to view and control a VI without
    having LabVIEW installed on the viewing computer, you can use the Web
    Publishing Tool to create a web interface for your front panel. Lots of
    options. Let me know what sounds interesting.
    Jarrod S.
    National Instruments
    Attachments:
    Lab_VI.vi ‏29 KB
    Office_VI.vi ‏51 KB

  • I have an issue with disappearing option for 1920x1080 in Preferences / Displays.

    Recently updated to 10.9 - have all updates installed - Mid 2010 iMac 21.5.
    I have an issue with disappearing option for 1920x1080 in Preferences / Displays. - After overnight shutdown, my iMac woke up and the screen resolution of my 2nd was set at 800 x 600 - the display a Samsung S22B150 was previously working properly at 1920 x 1080.  This option is no longer available in the system preferences - highest resolution available 1600 x 1200.
    I use my mMac for Photography and use the second monitor for the interface, leaving the iMac screen as a full work area for the photos.
    I have tried:
    Power down Monitor & restart
    Shutdown & restart
    Shutdown & restart in Safe Boot Mode (options same in Prefs)
    Power down Monitor & restart in Safe Boot Mode
    Ran Disc Utility - Repaired Permissions, verified both HDD & Mac OSX
    Udated Pram
    I am now at a loss, I guess I could try a recovery, and download/install  Mavericks again, but do not wish to do this if I can help it.
    I have searched the net to see if there are any Terminal commands to enable the resolution, but can find nothing.
    Anyone out there have any ideas, please.

    Back up all data. Quit System Preferences if it's running.
    Triple-click anywhere in the line below on this page to select it, then copy the text to the Clipboard by pressing the key combination command-C:
    ~/Library/Preferences/ByHost
    In the Finder, select
    Go ▹ Go to Folder...
    from the menu bar. Paste into the box that opens (command-V), then press return. A folder should open. If it does, look for a file with a long name that begins "com.apple.preference.displays2". There may be several such files. Move them to the Trash.
    Test.

Maybe you are looking for

  • Can i export a list of all the webpages in my site, enabled and disabled?

    Hey Guys, Can i export a list of all the webpages in my site, enabled and disabled? I saw you could view all pages in the advanced view - but i am not sure if you can then export that as an excel file.

  • End of page in ALV Grid Report

    Dear ABAPres,         I have developed ALV report using the Function module 'REUSE_ALV_GRID_DISPLAY'. I want to display the End of Page.How can i achiev this.Please help me in this. Thanks & Regards, ashok.

  • Urgent, Archiving in the completely new folder structure

    Hello! I'd like to create some kind of archiving facility for the users, so that when a file or document is deleted it is tranferred to another structure inside IFS where it resides until finaly deleted - purged. Now, the problem that i have is how t

  • Runtime Error, when running midlet.

    I can build the midlet without problems. This error occurs when the emultator starts the midlet. I can se the phone for a sec or two then i turns of and the error occurs in the console. I am using, j2me, eclipse, eclipseme, cldc1.1,mipd2.2. Running w

  • My window is 8.1, Can I install Photoshop Elements 12?

    My computer system--window 8.1, Intel HD graphic, memory ram 4 GB, 2.50 GHZ 64-bit operation system, DVD burner.  Can I install Photoshop Elements 12 or change to Elements 11?