Invalid results with SDO_RELATE

I am getting what appears to be invalid results when using the ANYINTERACT mask for the SDO_RELATE operator on our 8.1.7 system. The following query counts 85 linear geometries interacting with the "DC" polygon while the same spatial selection in ESRI's ArcGIS counts only 36.
SQL> SELECT COUNT(rch_code)
2 FROM os_linearrch r, state s
3 WHERE s.st = 'DC'
4 AND SDO_RELATE(r.fid, s.geom,
5 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
COUNT(RCH_CODE)
85
I visualized the data with both ArcGIS and Oracle Spatial Index Advisor and it sure looks like ArcGIS got this one right and Oracle Spatial got it wrong. I can send some screen captures of those results if that would be helpful to anyone. Other evidence that OS is having problems is that if I take one of the linear geometries that doesn't really interact with DC (but OS says it does) and run a SDO_INTERSECTION with DC I get a NULL geometry back indicating that they don't really interact after all:
SQL> SELECT SDO_GEOM.SDO_INTERSECTION(lr.fid, m.diminfo, s.geom, n.diminfo)
2 FROM OS_LINEARRCH lr, state s, all_sdo_geom_metadata m, all_sdo_geom_metadata n
3 WHERE lr.rch_code = '02070010000016'
4 AND s.st = 'DC'
5 AND m.table_name = 'OS_LINEARRCH'
6 AND m.column_name = 'FID'
7 AND n.table_name = 'STATE'
8 AND n.column_name = 'GEOM';
SDO_GEOM.SDO_INTERSECTION(LR.FID,M.DIMINFO,S.GEOM,N.DIMINFO)(SDO_GTYPE, SDO_SRID
SQL>
I have validated the DC polygon and at least one linear geometry that is matching but shouldn't. The actual ordinates have 6-7 digits of precision so I don't think that is the problem (especially considering the fact that SDO_INTERSECTION seems to be working as expected). I'll also post the metadata for the two layers in question below. Any help would be appreciated.
Thanks, James
OWNER TABLE_NAME
COLUMN_NAME
DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE)
SRID
TW STATE
GEOM
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, -60, .00000005), SDO_DIM_ELEMENT('Y', 1
0, 130, .00000005))
8265
OWNER TABLE_NAME
COLUMN_NAME
DIMINFO(SDO_DIMNAME, SDO_LB, SDO_UB, SDO_TOLERANCE)
SRID
RAD OS_LINEARRCH
FID
SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, -60, .00000005), SDO_DIM_ELEMENT('Y', 1
0, 130, .00000005), SDO_DIM_ELEMENT('M', 0, 1214748.37, .00000005))
8265

Further testing showed that I was getting bad results because the polygon geometries were defined using the old 1-digit values for SDO_GTYPE and SDO_ETYPE. When I redefined the polygon geometries using 4-digit values things started working as expected.
James

Similar Messages

  • Inconsistent results with SDO_RELATE and boundary conditions

    Hello,
    I am using SDO_RELATE to find all points in one table with any interaction with a polygon selected from a second table. Pretty basic stuff. I noticed one point which exactly matches a vertex on the query polygon was not getting selected as expected. Experimenting a bit I found if I embedded the polygon geometry in the query (rather than selecting it from its table) the query selected the point in question! Experimenting further I found if I changed the query relation from ANYINTERACT to TOUCH the point in question was not selected. So my 2 questions are:
    1) What would cause this to fail when the query polygon is being selected from the table?
    2) How can ANYINTERACT be true but TOUCH be false?
    Here is the first query that fails:
    SELECT a.point_id
    FROM point_table a, poly_table b
    WHERE a.point_id = <point which matches poly vertex>
    AND b.poly_id = <poly_id>
    AND SDO_RELATE (a.geom, b.geom, 'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
    Here is the query that works:
    SELECT a.point_id
    FROM point_table a, poly_table b
    WHERE a.point_id = <point which matches poly vertex>
    AND SDO_RELATE (a.geom,
    MDSYS.SDO_GEOMETRY(2003, 8265, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    MDSYS.SDO_ORDINATE_ARRAY(-82.414884, 28.0094323,
    -82.387158, 28.0116258, -82.378891, 28.0131216,
    -82.377988, 28.0133894, -82.37555, 28.0143994,
    -82.329352, 28.0661089, -82.313207, 28.1006725,
    -82.362246, 28.1261981, -82.445319, 28.1139363,
    -82.428389, 28.0245891, -82.422103, 28.0117697,
    -82.421382, 28.0109085, -82.419096, 28.0099741,
    -82.414884, 28.0094323)),
    'mask=ANYINTERACT querytype=WINDOW') = 'TRUE';
    Here is the second query that fails (ANYINTERACT -> TOUCH):
    SELECT a.point_id
    FROM point_table a, poly_table b
    WHERE a.point_id = <point which matches poly vertex>
    AND SDO_RELATE (a.geom,
    MDSYS.SDO_GEOMETRY(1003, 8265, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 2003, 1),
    MDSYS.SDO_ORDINATE_ARRAY(-82.414884, 28.0094323,
    -82.387158, 28.0116258, -82.378891, 28.0131216,
    -82.377988, 28.0133894, -82.37555, 28.0143994,
    -82.329352, 28.0661089, -82.313207, 28.1006725,
    -82.362246, 28.1261981, -82.445319, 28.1139363,
    -82.428389, 28.0245891, -82.422103, 28.0117697,
    -82.421382, 28.0109085, -82.419096, 28.0099741,
    -82.414884, 28.0094323)),
    'mask=TOUCH querytype=WINDOW') = 'TRUE';
    The point geometry being selected from the point_table looks like this:
    MDSYS.SDO_GEOMETRY(2001, 8265, NULL,
    MDSYS.SDO_ELEM_INFO_ARRAY(1, 1, 1),
    MDSYS.SDO_ORDINATE_ARRAY(-82.445319, 28.1139363))
    The metadata for these 2 tables looks like this:
    POINT_TABLE
    GEOM
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .05),
    SDO_DIM_ELEMENT('Y', -90, 90, .05))
    8265
    POLY_TABLE
    GEOM
    SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, .05),
    SDO_DIM_ELEMENT('Y', -90, 90, .05))
    8265
    Both tables have R-tree indexes built.
    System is Oracle9i Enterprise Edition Release 9.2.0.5.0 with sdo_version = 9.2.0.5.0
    Is it a problem that my points are stored as SDO_ORDINATES? Is the tolerance a factor? Is geodetic data a factor?
    Let me know if any other information would be useful and thank you for your help!
    James

    I am continuing to struggle with this one. I gave up on the SDO_RELATE function under the assumption the tolerance does not come into play for this function (is this true?).
    Now I am trying to use the SDO_GEOM.RELATE function with a tolerance to make this work and it is not working as I would expect.
    The following 2 queries show the distance between this point and this polygon is 0 yet they are disjoint. How can this be??
    Thanks, James
    SQL> SELECT SDO_GEOM.SDO_DISTANCE(
    2 MDSYS.SDO_GEOMETRY(2001, 8265, NULL,
    3 MDSYS.SDO_ELEM_INFO_ARRAY(1, 1, 1),
    4 MDSYS.SDO_ORDINATE_ARRAY(-82.445319, 28.1139363)),
    5 MDSYS.SDO_GEOMETRY(2003, 8265, NULL,
    6 MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    7 MDSYS.SDO_ORDINATE_ARRAY(-82.414884, 28.0094323, -82.387158, 28.0116258,
    8 -82.378891, 28.0131216, -82.377988, 28.0133894, -82.37555, 28.0143994,
    9 -82.329352, 28.0661089, -82.313207, 28.1006725, -82.362246, 28.1261981,
    10 -82.4453185022412,28.1139363297581, -82.428389, 28.0245891, -82.422103, 28.0117697,
    11 -82.421382, 28.0109085, -82.419096, 28.0099741, -82.414884, 28.0094323)),
    12 10)
    13 FROM DUAL;
    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2001,8265,NULL,MDSYS.SDO_ELEM_INFO_ARRA
    .00000000000000000000
    SQL>
    SQL> SELECT SDO_GEOM.RELATE(
    2 MDSYS.SDO_GEOMETRY(2001, 8265, NULL,
    3 MDSYS.SDO_ELEM_INFO_ARRAY(1, 1, 1),
    4 MDSYS.SDO_ORDINATE_ARRAY(-82.445319, 28.1139363)),
    5 'determine',
    6 MDSYS.SDO_GEOMETRY(2003, 8265, NULL,
    7 MDSYS.SDO_ELEM_INFO_ARRAY(1, 1003, 1),
    8 MDSYS.SDO_ORDINATE_ARRAY(-82.414884, 28.0094323, -82.387158, 28.0116258,
    9 -82.378891, 28.0131216,-82.377988, 28.0133894, -82.37555, 28.0143994,
    10 -82.329352, 28.0661089, -82.313207, 28.1006725,
    11 -82.362246, 28.1261981, -82.4453185022412, 28.1139363297581,
    12 -82.428389, 28.0245891, -82.422103, 28.0117697,
    13 -82.421382, 28.0109085, -82.419096, 28.0099741, -82.414884, 28.0094323)),
    14 10)
    15 FROM DUAL;
    SDO_GEOM.RELATE(MDSYS.SDO_GEOMETRY(2001,8265,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,
    DISJOINT

  • Problem with SDO_relate when using polygons with holes.

    I'm having a problem with sdo_relate. I'm trying to extract all elements from a point table (bdtq_batim_p) that are inside a specific polygon from another table (SDA_MUNIC_SS). The spatial index for both table have been rebuilt and the data from both table is valid.
    When I do a count on the query, I know the answer should be 1422 elements (Counted in ArcGIS). However, sdo_relate gives a smaller number of elements in the result set.
    The query :
    SELECT count(distinct t.identifiant) FROM bdtq_batim_p t, SDA_MUNIC_SS s WHERE s.mus_co_geo = '48015' and sdo_relate( t.SHAPE,s.SHAPE,'mask=anyinteract querytype=window') = 'TRUE'
    returns 282 elements. The query with mask=inside, SDO_Anyinteract() and SDO_inside() all give the same result.
    I did a test with the following query and the result is 1422 (which is the good result).
    SELECT count(distinct t.identifiant) FROM bdtq_batim_p t, SDA_MUNIC_SS s WHERE s.mus_co_geo = '48015' and SDO_WITHIN_DISTANCE( t.SHAPE,s.SHAPE,'distance=0') = 'TRUE';
    It's important to note that the polygone (from SDA_MUNIC_SS) that is used for this query have holes in it. I have the same problem with all the polygons from the SDA_MUNIC_SS table that have holes in it. For the polygon without holes, the results are the same for the 2 queries.
    My question are :
    Why are the result from the two queries different? A query with a buffer of 0 should always return the same result as a query with Anyinteract.
    Is there a known problem with SDO_RELATE when using a polygon with holes in it?
    Do you have any idea how to solve my problem.

    Since i don't have much control on the version of Oracle and Patches that we use in the system, we used a workaround that detects the polygons with holes and uses the SDO_WITHIN_DISTANCE( t.SHAPE,s.SHAPE,'distance=0') = 'TRUE' operator in those case. We saw a slight decline in performance but it now returns the right results. When the system will be patched, we'll come back to the original version and see if the problem is solved.

  • Select data with SDO_RELATE in lat long coordinate system(8307) in 10gR2

    Hi all,
    I have problem with selecting data from table.
    Data are in lat lon coordinate system 8307.
    These requests don't return any data:
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array(-180,-90, 180,-90, 180,90, -180,90, -180,-90)) ) = 'TRUE';
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_RELATE(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array(-180,-90, 180,-90, 180,90, -180,90, -180,-90)), 'MASK=ANYINTERACT' ) = 'TRUE'
    Optimized polygon does return all data correctly:
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,3),sdo_ordinate_array (-180,-90,180,90)) ) = 'TRUE'
    Smaller polygon select data correctly too.
    SELECT ISSUE_ID FROM MAP_ISSUES WHERE SDO_FILTER(GEOMETRY, sdo_geometry (2003, 8307, null, sdo_elem_info_array (1,1003,1),sdo_ordinate_array (52,-7, 54,-7 , 54,-5 , 52,-5, 52,-7)) ) = 'TRUE'
    I have tried changed polygon to be clockwise, counter clockwise, make the area a bit smaller( 160 instead of 180, 89 instead of 90) nothing has helped.
    My explanation than was, that Earth is sphere and each defined polygon defines TWO polygons in the sphere and there is convention that the smaller is chosen to select data. It would make sense along the previous results, but than I found one post which says that this is bug http://www.frontoracle.com/oracle-database/703/180703-size-of-are-of-interest-smaller-equals.html
    I have found in other thread that max only 1/2 of Earth could be selected Different results using SDO_RELATE with polygon and rectangle type but it seems not true, because optimized bounding box works fine!
    What is right? Is there anything in official documentation?
    Is it bug.
    Max 1/2 of Earth could be selected in one request.
    Each polygon defines two areas in the Earth and the smaller one is used to do spatial SDO_RELATE operation?
    Thanks!
    Regards,
    Zdenek

    Zdenek,
    A bug, or limititation, whichever you choose. IMHO if you ask for something, and don't get what you expect, it is a bug that could be fixed.
    But for 10g anywho, the following applies, which is why I choose 120 degree breaks for my code as it is less than 180...
    The following size limits apply with geodetic data:
    ■ No polygon element can have an area larger than one-half the surface of the Earth.
    ■ In a line, the distance between two adjacent coordinates cannot be greater than or
    equal to one-half the perimeter (a great circle) of the Earth.
    If you need to work with larger elements, first break these elements into multiple
    smaller elements and work with them. For example, you cannot create a geometry
    representing the entire ocean surface of the Earth; however, you can create multiple
    geometries, each representing part of the overall ocean surface. To work with a line
    string that is greater than or equal to one-half the perimeter of the Earth, you can add
    one or more intermediate points on the line so that all adjacent coordinates are less
    than one-half the perimeter of the Earth.
    Bryan

  • Inconsistent results for SDO_RELATE

    Using SDO_VERSION = 10.2.0.2.0
    I am getting inconsistent results using SDO_RELATE. If I do the whole table (over 200,000 records), one particular record that I know of is skipped while if I pick a smaller range of records ie. 4 records in this case, the record is not skipped. The particular relationship with this record is "touch". Is there any limitation on table size or is this something else? Here is the example :
    -- The column is set to null
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- SDO_RELATE on a few records which actually finds the correct relationship
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no and C.lic_no between 4687157 and 4687223 )
    5 ;
    3 rows updated.
    -- Displays the correct relationship for that record (this is a "touch")
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    1
    -- Reset the column to null
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- SDO_RELATE on the complete table
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no );
    48488 rows updated.
    -- This particular record which was located correctly earlier appears to be skipped
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    SQL>
    François Sigouin

    Thanks but it did not solve the problem of inconsistent results. The response time for the first update is much improved though. When I added the hint on the second update (which is about 600 records), it never came back so I tested without it. Any other ideas ?
    François.
    TEST
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    -- First update with hint, response time is improved but same results obtained
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT /*+ ORDERED */ 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no );
    48488 rows updated.
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    SQL> update nad_als_fixed_stn_10G_HQ set insidecheck = null;
    231484 rows updated.
    --The second update has to be without the hint otherwise it does not come back.                                                                                                  
    SQL> UPDATE nad_als_fixed_stn_10G_HQ C SET C.insidecheck = '1'
    2 WHERE EXISTS (SELECT 1 FROM MetroRegions A, nad_als_fixed_stn_10G_HQ B
    3 WHERE SDO_RELATE(B.location83r, A.geoloc, 'mask=anyinteract') = 'TRUE'
    4 AND C.lic_no = B.lic_no and C.lic_no between 4687157 and 4687223 )
    5 ;
    3 rows updated.
    SQL> select insidecheck from nad_als_fixed_stn_10G_HQ where lic_no = 4687161;
    Inside
    check
    1

  • DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set.

    hi
    I am keep receiving this message in central administration running server in event viewer
    DiscoverSQL2005DBEngineDiscovery.vbs : The Query 'select * from __NAMESPACE where Name ='ComputerManagement'' returned an invalid result set.  Please check to see if this is a valid WMI Query.. Object required
    adil

    Hi adil,
    It seems to be not related to SharePoint issue, I find a similar error post from Operations Manager forum you can take a look
    Also another below article of basic troubleshooting of discovery scripts for your reference.
    And for the further better assistance regarding this issue, you may want to post Operations Manager forum here.
    http://social.technet.microsoft.com/Forums/systemcenter/en-US/21e9de85-5cbc-4217-8d9b-921e13dc88dc/sql-mp-issues-with-discovery-vbs-scripts?forum=operationsmanagermgmtpacks
    http://blogs.technet.com/b/kevinholman/archive/2010/03/09/basic-troubleshooting-of-discovery-scripts.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • Text search returns results with some keywords, but not others

    This pertains to a tours website for Turkey. I've sucessfully
    set up a search form, and results page which returns results when
    multiple keywords are entered. Everything is working well, except
    when certain keywords are used. For example, the table column being
    searched for is called long_itinerary, so if anyone is interested
    in a certain site or city, it's bound to be in the long itinerary
    somewhere.
    Here's the problem, by example: When someone searches with
    the keywords Antalya, Konya, Ankara, or Adana, for example, results
    are returned from the database, and those keywords are in each
    returned tour's long itinerary.
    But certain keywords return nothing, even when they're in
    practically all of the tours, in the long_itinerary column. For
    example, Istanbul, Ephesus, and Izmir, Kusadasi and Pergamum return
    no results, even though they're there. I've gone through all of the
    most likely keywords, and these are the offenders. If, for example,
    I search with "Istanbul Ankara," I get results with tours including
    Ankara (and Istanbul, but only because the word "Ankara" is in the
    itinerary).
    First I made sure the Charset values were the same on the
    search form page and the results page. Still had the problem. Next,
    I went into the database itself, and copied the word "Istanbul"
    directly from the long_itinerary column of the database, and pasted
    it into the search function's text field, and searched again. Same
    problem--no results returned.
    I can't see any difference between the keywords which work
    correctly, and those which don't, what baffles me is that even when
    I copy a keyword directly from the database and paste it in the
    search text field, it returns no results!
    Well, I'm baffled! Any ideas what might cause this?

    Hmm -- one of my customers is a turkish building company
    (Kusadasi BTW), and when *they* add some contents to the DB,
    they´ll be entering turkish chars. It´s in particular the
    turkish "I" which is pretty different, and this is when a search
    for keywords containing a western "I" will fail.
    Could that be the problem in your case ?

  • Script for Save Options- Save Query Results with document

    Hi,
    Is there any javascript for Save query results with document in save options? If so where can i find that?
    Thanks
    Kalai

    hi guys,
    I found the answer.The following example shows you how to save the results with the query
    section named “SalesQuery”.
    ActiveDocument.Sections["SalesQuery"].SaveResults=true

  • Different Risk Analysis Results with 10.0 and 10.1

    Hello,
    I do not understand why I get different results with 10.0 and 10.1. Exactly the same ruleset is applied!
    Definition in 10.0 and 10.1:
    Analyzed Role (which definitely contains the SOD):
    Version GRC 10.0 finds the SOD S_FI14 and displays it. In 10.1 nothing is displayed...Any ideas what's the problem?
    Regards
    Peter

    We had similar issues with 10 and 10.1.
    We applied an SAP Note about logical groups and the ruleset, it did not work.
    What did work:
    When performing Risk Analysis, remove the Ruleset selection criteria (use the minus button).

  • Type in "Advanced Search" and I don't get one result with advanced in it.

    I want to find results with all my criteria in it, not just one or two of the criteria. What is going on here?

    Hi,
    Sadly, nothing out of the ordinary. The search tool here doesn't allow for the use of AND.
    EDIT: There's a thread in the Suggestions forum requesting that the search tool be made useful, you may want to add your vote and voice there:
    http://social.technet.microsoft.com/Forums/en-US/9cf8ad4b-5111-4f84-9809-99cd8f1b7152/make-the-forum-search-tool-useful?forum=suggest
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • Is there a way to promote results with exact match?

    Hi,
    Is there a way to promote (like add results block or something) results with exact match over results that match?
    (when stemming is on, so the search consider also words with morpholgy match, and sometimes display them at the top, and wWe want to put in top of the results a block of results with exact match)
    keren tsur

    HI,
    Yes you can promote the result with exact match.....
    1. Navigate to the search center
    2. Navigate to the search result setting page and click to the Query rule as per your scope.
    3. Create the new query rule depend upon your result source.
    4. Give the query rule name. Under the Query Condition-> select "Advanced Query Text Match"-> Select Option that you want form matches input->Make the Check box "Entire Query Matches Exactly".
    5. Create the promoted results and Result block as per your description.
    6. save the Query rule and apply the query rule to your search vertical.
    Regards,
    sharepoint for developer
    Basant Pandey

  • Drawing images gives 2 different results with the same code.

    Im adding my code on here, and its sort of long but ill try to explain it. Most of it you can ignore.
    Anyway i'm making a tree menu with only 1 level of expansion. So you have a TreeMenu object, and this object has some Branch classes. These Branch classes have Leaf classes. That is all. On the menu there is also a little box where you can click to expand and collapse each branch. if a branch is expanded, all of its leaves are shown. if it is collapsed only the branch name is shown.
    So far what I've described above works, there is a small scale compilable working program, that is alright. Theres just a few bugs to fix.
    A little feature of the tree is if a branch or a leaf is selected (has been clicked on in the past) it has a blue background. This sort of works. The branch names seem to work alright, and some of the leaves. However other if you run the example i provided you can click on Leaf 1, and it will be ok, but if you click on Leaf 2 then there blue background is twice as big as it should be. But for the rest, it works ok.
    This is weird to me because the same code handles any of these same situations. So it seems that i get 2 diferent results with the same code. If anyone would like to help heres some stuff you should know:
    You can ignore Leaf class, i dont think theres any errors in there.
    You can ignore just about all of Branch class except the update() method.
    You can ignore all of TreeMenu class except the inner MouseListener class might be useful.
    You can ignore TreeTester. Just the JFrame tester class.
    to run the code:
    javac TreeMenu.java
    java TreeMenu
    http://cs.ucsb.edu/~jsterling/treemenu.zip
    thanks.

    You make a good point Stefan but unfortunately I already checked that.  I have even copied the mapping (right click copy) and pasted it from the working Mapping to the bad Map (Paste) to make sure the context values were all the same.
    I also opened all the queues and compared the values in each.  All values match exactly except for the result(out) queue.
    In both tests I am using the same IDOC XML file. 
    These are the only differences I see.
    1.  The IDOC is exactly the same as far as I can tell but they come from two different source SWCV.  SAP APPL 4.7 and Steelcase_Procurement (ECC 6.0). 
    2.  The working map uses a local UDF.  The bad map calls the UDF from a Function Group.  Is there a Java version difference between the two?
    A better sample of the result queues look like this:
    Correct Result:
    Thickness of Glass: 20
    Height: 10
    Width: 5
    Length: 18
    Thickness of Glass: 10
    Height: 15
    Width: 8
    Length: 14
    Bad Result:
    Thickness of Glass: 20
    <null>
    <null>
    <null>
    Width: 5
    <null>
    <null>
    <null>
    I took this chance to redesign my Variant Config output to separate the characteristics/values, but I'm still bothered that I was unable to determine what would cause the differing values.
    Any ideas?
    Thanks,
    Matt

  • Inconsistent results with localtimestamp and current_timestamp

    Running XE on Windows XP with the system timezone to GMT rebooted, restarted XE)
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I'm getting incorrect and inconsistent results with current_timestamp and localtimestamp:
    With SQL, localtimestamp computes the wrong offset (appears to use 1987-2006 DST rules):
    select
    dbtimezone
    , sessiontimezone
    , current_timestamp
    , current_timestamp + numtodsinterval(18,'day') as current_timestamp18
    , localtimestamp
    from dual;
    +00:00     
    US/Eastern     
    17-MAR-10 10.27.17.376000000 AM US/EASTERN     
    04-APR-10 10.27.17.376000000 AM US/EASTERN     
    17-MAR-10 09.27.17.376000000 AM
    however, in PL/SQL, both current_timestamp and localtimestamp return the wrong hour value, and adding 18 to current_timestamp shows it is using 1987-2006 DST rules (1st sunday of april)/ note that this happens in straight PL/SQL and in embedded SQL (same results selecting from tables other than DUAL):
    begin
    for r1 in (
    select
    dbtimezone
    , sessiontimezone
    , current_timestamp
    , current_timestamp + numtodsinterval(18,'day') as current_timestamp18
    , localtimestamp
    from dual
    loop
    dbms_output.put_line('SQL dbtimezone = ' || r1.dbtimezone);
    dbms_output.put_line('SQL sessiontimezone = ' || r1.sessiontimezone);
    dbms_output.put_line('SQL current_timestamp = ' || r1.current_timestamp);
    dbms_output.put_line('SQL current_timestamp +18 = ' || r1.current_timestamp18);
    dbms_output.put_line('SQL localtimestamp = ' || r1.localtimestamp);
    end loop;
    dbms_output.put_line('dbtimezone = ' || dbtimezone);
    dbms_output.put_line('sessiontimezone = ' || sessiontimezone);
    dbms_output.put_line('systimestamp = ' || systimestamp);
    dbms_output.put_line('current_timestamp = ' || current_timestamp);
    dbms_output.put_line('current_timestamp +18 = ' || (current_timestamp + numtodsinterval(18,'day')));
    dbms_output.put_line('localtimestamp = ' || localtimestamp);
    end;
    SQL dbtimezone = +00:00
    SQL sessiontimezone = US/Eastern
    SQL current_timestamp = 17-MAR-10 09.29.32.784000 AM US/EASTERN
    SQL current_timestamp +18 = 04-APR-10 10.29.32.784000000 AM US/EASTERN
    SQL localtimestamp = 17-MAR-10 09.29.32.784000 AM
    dbtimezone = +00:00
    sessiontimezone = US/Eastern
    systimestamp = 17-MAR-10 02.29.32.784000000 PM +00:00
    current_timestamp = 17-MAR-10 09.29.32.784000000 AM US/EASTERN
    current_timestamp +18 = 04-APR-10 10.29.32.784000000 AM US/EASTERN
    localtimestamp = 17-MAR-10 09.29.32.784000000 AM
    dbtimezone = +00:00
    sessiontimezone = US/Eastern
    systimestamp = 17-MAR-10 02.16.21.366000000 PM +00:00
    current_timestamp = 17-MAR-10 09.16.21.366000000 AM US/EASTERN
    current_timestamp +18 = 04-APR-10 10.16.21.366000000 AM US/EASTERN
    localtimestamp = 17-MAR-10 09.16.21.366000000 AM
    is this a known bug?
    is there a patch or a work-around for XE?
    are other datasbase versions affected?

    Can't patch XE, unfortunately it comes with pre-2007 DST rules.
    There is a metalink note describing how to fix the DST changes, and while it's not really a "supported" method, neither is XE- if you can get updated timezone files from a later patch set for the same release, 10gR2, on the right operating system, shutdown/startup the database the updated DST rules will be in place. The timezone files are in $ORACLE_HOME/oracore/zoneinfo.
    Another unfortunately, any values already stored in the database using timestamp with local timezone datatypes for the affected period of the DST changes won't be correct, i.e. there is no 2010-03-14 02:01 (?) but with older timezone rules in place that would be a valid timestamp. The data has to be saved before updating the timezone file, and re-translated to timestamp w/local tz datatypes after the update.
    IMHO storing literal timezone info isn't an ideal practice, let the client settings do the time interpretation, time is always changing. Its the interpretation of the time that gets changed. From time to time. :(

  • Displaying results with a decimal place of two. Forcing decimal place.

    Hi there,
    Im writing a simple calculation device.
    You input one digit and press one of two buttons to multiply it by a certain number and then the result is displayed. The result is displyed hiding the result of the button you didn't press and visa versa.
    I am having a problem displaying the result with a constant two decimal place.
    I am using strings and thus don't know how to do this.
    Here is my code:
    import flash.events.MouseEvent;
    //restrict the input textfield to only numbers
    txtinput.restrict = "0-9";
    //restrict the input textfield to only two characters
    txtinput.maxChars = 6;
    // event listeners
    btnW.addEventListener(MouseEvent.CLICK, WHandler);
    btnC.addEventListener(MouseEvent.CLICK, CHandler);
    btnW.addEventListener(MouseEvent.CLICK, hideC);
    btnC.addEventListener(MouseEvent.CLICK, hideW);
    //functions
    function WHandler (e:MouseEvent):void
              //white calculation
              var answerW:Number = Number(txtinput.text) * Number(0.90);
              txtWResult.text = answerW.toString();
    function CHandler (e:MouseEvent):void
              //colour calculation
              var answerC:Number = Number(txtinput.text) * Number(0.99);
              txtCResult.text = answerC.toString();
    function hideC (e:MouseEvent):void
              //Hide colour result
              txtCResult.visible = false;
              txtWResult.visible = true;
    function hideW (e:MouseEvent):void
              //Hide white result
              txtWResult.visible = false;
              txtCResult.visible = true;
    After having a look online I have found these two resources:
    http://helpx.adobe.com/flash/kb/rounding-specific-decimal-places-flash.html
    and
    http://stackoverflow.com/questions/11469321/decimals-to-one-decimal-place-in-as3
    But I am confused when combining these techniques with strings.
    Any help would be greatly appreciated,
    Thanks in advance
    Mr B

    Use the toFixed() method of the Number class instead of the toString() method.  The result of it is a String with the number of decimal places you specify.
              var answerW:Number = Number(txtinput.text) * Number(0.90);
              txtWResult.text = answerW.toFixed(2);
              var answerC:Number = Number(txtinput.text) * Number(0.99);
              txtCResult.text = answerC.toFixed(2);

  • Running report and get the report result with coding

    Hi all,
    In our R/3 system, there is a custom sales report.
    My question is: is there possibility to get data by running this report and grab it the result with code and store it in internal table?
    Sorry if my question too basic because I am not abaper
    I am just wondering to find new solution for my project.
    Regards,
    Steph

    My requirement is: I want to get the result from this report
    (rather than try to get the data from SAP original table, because this report is very complicated with a lot of selection data) and use it this result into my new program.
    The mechanism that I want is pull the result from the current report, not to add some code in current report to push into new program, to avoid changed the report.
    Btw, the output of this report not only the excel file, we can also run this report on foreground mode and see the result.
    The report is not ALV report.
    Regards,
    Steph

Maybe you are looking for

  • Where can I get replacement feet?

    I've noticed that I've lost one of the rubber feet from the bottom of my 1st-gen MBP. Where can I get replacements? Will an Apple Store sell them to me? Much thanks.

  • Referencing in dreamweaver cs3

    Hi guys, I like very much to find out what window.focus() does and how do I reference such a code inside Dreamweaver if its even possible. Am new to this dreamweaver forum of Adobe so I like to say "Hello & Merry Christmas" to y'all here. Huat ah..

  • Message.app Version 7.0.1 (3322) does'nt show my picture when I chat from my mac Lion 10.8.5

    Message.app Version 7.0.1 (3322) does'nt show my picture when I chat from my mac Lion 10.8.5 But my email show my picture.

  • How to remove Gmail "sent message" label

    Hi all, I am using Lion in one of my Mac and I found one problem I am using my Gmail account in Lion Mail When I use Lion Mail to send/reply a mail, Gmail on brower will show a "sent message" label on that mail. What should I do to prevent it? I mean

  • RoomExtension: Room manipulation (parameters) not persistent

    Hi Folks, im going crazy with RoomExtensions. (ExtensionPoint: ON_CREATE_ROOM) I get the actual Room via the IRoomInfoReader. If I change for example the description - everything is fine. (I enter the room - and the description is changed) BUT: If I