SDO_UTIL.FROM_WKTGEOMETRY seems ignorant of ring rotation

Hello,
Back with more WKT issues. The OGC WKT spec does not enforce any kind of ring rotation on its polygons. However Oracle SDO_GEOMETRY does. When SDO_UTIL.FROM_WKTGEOMETRY converts a WKT polygon it doesn't seem to correct the ring rotation - it just leaves the rings rotated exactly as in the WKT resulting in invalid SDO_GEOMETRY polygons. Wouldn't this be a bug? I can't find anywhere in the SDO_UTIL documentation where we are told to always runs RECTIFY_GEOMETRY after the conversion.
Simple Example:
{color:#008000}SELECT SDO_UTIL.VALIDATE_WKTGEOMETRY('
POLYGON((
-76.57418668270113 38.91891450597657,
-76.57484114170074 38.91758725401061,
-76.57661139965057 38.91881851059802,
-76.57418668270113 38.91891450597657
))') FROM dual
{color}
returns TRUE though ring is clockwise - okay for WKT.
But when we convert it to SDO_GEOMETRY, the ring is still clockwise and throws an error
{color:#008000}SELECT SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
SDO_GEOMETRY('
POLYGON((
-76.57418668270113 38.91891450597657,
-76.57484114170074 38.91758725401061,
-76.57661139965057 38.91881851059802,
-76.57418668270113 38.91891450597657
))',8265),0.0001) FROM dual
{color}
returns {color:#ff0000}13367 [Element <1>] [Ring <1>]
{color}{color:#000000}
So is this a bug or a feature? Does all WKT polygons coming into Oracle need to have their rings prerotated and if so, why would VALIDATE_WKTGEOMETRY not warn us of the problem.
Cheers,
Paul
{color}

Paul,
In case you are not aware:
SELECT SDO_MIGRATE.TO_CURRENT(
MDSYS.SDO_GEOMETRY('POLYGON((-76.57418668270113 38.91891450597657,-76.57484114170074 38.91758725401061,-76.57661139965057 38.91881851059802,-76.57418668270113 38.91891450597657))',8265)
,SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -99999.00000, 99999.00000, 0.0001),SDO_DIM_ELEMENT('Y', -99999.00000, 99999.00000, 0.0001)))
FROM dual
---produces:
MDSYS.SDO_GEOMETRY(2003, 8265, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.SDO_ORDINATE_ARRAY(-76.5741866827011,38.9189145059766,-76.5766113996506,38.918818510598,-76.5748411417007,38.9175872540106,-76.5741866827011,38.9189145059766))
---thus:
SELECT SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(
MDSYS.SDO_GEOMETRY(2003, 8265, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1), MDSYS.SDO_ORDINATE_ARRAY(-76.5741866827011,38.9189145059766,-76.5766113996506,38.918818510598,-76.5748411417007,38.9175872540106,-76.5741866827011,38.9189145059766))
,0.0001) FROM dual
---produces: TRUE
r,
dennis

Similar Messages

  • ORA-00932 error: limitations for SDO_UTIL.FROM_WKTGEOMETRY and SDO_GEOMETRY

    Hi all,
    In my project, I use C# .net and Oracle 11g. I use ADO.NET OracleClob object in my C# code which will be passed to a procedure (procedure defined in a package) where I convert the input clob/wkt geometry into SDO_GEOMETRY using SDO_UTIL.FROM_WKTGEOMETRY and subsequently the GEOMETRY can be pushed into a table as shown below.
    PROCEDURE insert_extent(p_key_id IN NUMBER, p_extent IN CLOB) AS
    m_geom SDO_GEOMETRY;
    BEGIN
    m_geom := SDO_UTIL.FROM_WKTGEOMETRY(p_extent);
    UPDATE TEMP SET GEOM = m_geom
    WHERE IDS = p_key_id;
    COMMIT;
    END insert_extent;
    The above code is working fine for small size clob inputs, but, I have encountered ORA-00932 error when my clob/wkt geometry was more than 30MB in size.
    Can any one tell me what is the limitation of size of the clob to convert the CLOB to SDO_GEOMETRY and is there any limitaion on SDO_GEOMETRY datatype object to write the geometry into a table as well via insert/update statement.
    Also share your thoughts on how to resolve the issue.
    Please let me know if further information is required and thanks for the help in advance.
    Regards,
    Kumar

    MDSYS.SDO_ORDINATE_ARRAY in sdo_geometry can hold 1048576 numbers:
    desc MDSYS.SDO_ORDINATE_ARRAY
    MDSYS.SDO_ORDINATE_ARRAY VARRAY(1048576) OF NUMBER

  • ORA-01704 error form spatial data type (SDO_UTIL.FROM_WKTGEOMETRY)

    I am trying to make a program (C# & ODP.NET)to do the task , get geometry data From sqlserver2008 database and INSERT INTO Oracle11 Spatial Database.
    Because of using the Well-Known text (WKT) syntax , so I need to use "SDO_UTIL.FROM_WKTGEOMETRY('POLYGON ((56678400..." to insert geometry data to oracle. When the polygon text is longest than 4000 chr, I got the exception
    [ORA-01704: string literal too long]
    How can we solve this problem? It's urgent!
    Hope to hear from you.
    Fan

    Try with bind variables:
    oerr ora 1704
    01704, 00000, "string literal too long"
    // *Cause:  The string literal is longer than 4000 characters.
    // *Action:  Use a string literal of at most 4000 characters.
    //          Longer values may only be entered using bind variables.Please read http://www.oracle.com/technetwork/issue-archive/2005/05-sep/o55odpnet-101704.html.

  • Java Exception with SDO_UTIL.FROM_WKTGEOMETRY

    Anyone have any idea why the following is not working?
    INSERT INTO "OBJECT_EVENT" ("title", GEOMETRY) VALUES ( 'testPoly', SDO_UTIL.FROM_WKTGEOMETRY('POLYGON((-76.57418668270113 38.91891450597657 0, -76.57484114170074 38.91758725401061 0, -76.57661139965057 38.91881851059802 0, -76.57418668270113 38.91891450597657 0))'));This is producing the following error:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.RuntimeException: -2
    ORA-06512: at "MDSYS.SDO_UTIL", line 137I'm a n00b with Oracle Spatial and there's so much documentation I can't find anything that references this issue. Which usually means I have something all wrong.
    Thoughts? Help?
    Thanks so much!

    Nick,
    So does that mean the JTS download at spatialdbadvisor.com is the latest codebase you've contributed? i.e. Do I have your latest work? If not I'll redownload once you update. If so, I'll play around with the .sh script and see if I can't get it working. The current download is still called JTS. At some point the name will change, probably to something like JSC4O (Java Spatial Companion 4 Oracle)... I may drop the "Companion" but I don't want people thinking I am trying to replace SDO_GEOMETRY
    like ESRI does or Jaspa aspires to. All I want to do is make the SDO_GEOMETRY experience for users a little easier in those areas where gaps appear between releases that users need plugged but the Oracle release/license cycle isn't flexible enough.
    I often update the JTS library as I find bugs or add new functionality. For example, I release a version a few days ago which contained:
       * ST_LineMerger
       * Takes set of linestring geometries and constructs a collection of linear components
       * that form maximal-length linestrings. The linear components are returned as a MultiLineString.
       * @param p_resultSet  : RefCur_T : Ref Cursor of Linestring Geometries 
       * @param p_precision  : int   : Number of decimal places of precision when comparing ordinates.
       * @return STRUCT      : Collection of linear sdo_geometries as MultiLineString.
       * @throws SQLException
       * @history Simon Greener, January 2012, Original Coding
       * @copyright  : Licensed under a Creative Commons Attribution-Share Alike 2.5 Australia License.
       *               http://creativecommons.org/licenses/by-sa/2.5/au/
      Function ST_LineMerger(p_resultSet in &&defaultSchema..JTS.refcur_t,
                             p_precision in number)
        Return mdsys.sdo_geometry
               Deterministic;Also, I am improving/tuning my XSV exporter right now so those changes will go up.
    As each goes up I modify this page: http://www.spatialdbadvisor.com/source_code/223/geoprocessing-package-documentation
    I believe the latest version has some modifications to the install.sh script after your comments. Perhaps you might want to look at that version before starting?
    regards
    Simon

  • SDO_UTIL.SIMPLIFY seems to be rather unhappy with my polygon

    Hi folks,
    Not sure if this is a bug or just how things are. I have a polygon that is valid, looking like an upside Q - i.e. a ring-like polygon with a big hole in the middle. On 10.2.0.4, when I run SDO_UTIL.SIMPLIFY with a 20 meter threshold, it returns NULL. A threshold of 80 returns a line whilst a threshold of 10 returns a reasonable result. But NULL? I don't see anything in the documentation about this.
    Next I tried the exact same thing on 11.1.0.7 and rather than NULL, I get ORA-13199 instead. This seems like an improvement. So I assume what produces NULL on 10g throws an error on 11g. I guess we call that progress and move on - any plans to backport this behavior to 10g?
    But back to the results. Looking through
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_util.htm#sthref2702
    I don't see any mention that a legal function result can be ORA-13199. So is this a bug? Or are some threshold values "just not gonna" work and always return an error by design?
    Thanks!
    Paul
    SELECT
    SDO_UTIL.SIMPLIFY(
    SDO_GEOMETRY(
    2003,
    8265,
    NULL,
    SDO_ELEM_INFO_ARRAY(
    1,
    1003,
    1,
    63,
    2003,
    1
    SDO_ORDINATE_ARRAY(
    -80.6678363850029,
    27.1544468240932,
    -80.6676581190441,
    27.1544578908543,
    -80.6673811848868,
    27.1545404243406,
    -80.6669873181666,
    27.1546888239902,
    -80.6669011856599,
    27.154727424447,
    -80.6667227848805,
    27.1548484903997,
    -80.6666243193133,
    27.1549804918455,
    -80.6665567184542,
    27.1551016239273,
    -80.6665443185942,
    27.1552556914498,
    -80.6666181177095,
    27.1555144243224,
    -80.6667779183997,
    27.1559106917256,
    -80.6668025185416,
    27.1560536914105,
    -80.6668271189153,
    27.1560868245381,
    -80.6668579182135,
    27.1560866907775,
    -80.6669009855045,
    27.1560592917636,
    -80.6669071190522,
    27.1559382250141,
    -80.6669871190558,
    27.1559106906018,
    -80.6673439852962,
    27.1559052909276,
    -80.6673931847717,
    27.1558888246279,
    -80.6674363186955,
    27.1558722246153,
    -80.6675469848459,
    27.1557622244607,
    -80.6678731857396,
    27.155575091261,
    -80.6679839844916,
    27.1554870246634,
    -80.6680947191472,
    27.1553660239724,
    -80.668279384442,
    27.1550798248074,
    -80.66834698489,
    27.1549642916886,
    -80.6683593847143,
    27.1548432242984,
    -80.6683101849162,
    27.1547276237897,
    -80.6681687190595,
    27.1545734909874,
    -80.6679841179111,
    27.1544468907341,
    -80.6678363850029,
    27.1544468240932,
    -80.6670609857901,
    27.1558170906695,
    -80.6669317858199,
    27.1558172245472,
    -80.6668271853341,
    27.1557840250493,
    -80.6666919857747,
    27.1552446911476,
    -80.6667105183963,
    27.155134623902,
    -80.6668213180802,
    27.1549420246816,
    -80.6670549849476,
    27.154793491146,
    -80.6674795852521,
    27.1546338906477,
    -80.6678303186443,
    27.154556890968,
    -80.6679287847641,
    27.1545568916289,
    -80.6681071851569,
    27.1546450245379,
    -80.6681933180075,
    27.1547606247241,
    -80.6682117191289,
    27.1548872243023,
    -80.6681931847942,
    27.1549532242227,
    -80.6681809185176,
    27.1549918246254,
    -80.6678917187281,
    27.1553990242445,
    -80.6677069852055,
    27.155542091489,
    -80.667479384833,
    27.1556740913815,
    -80.667270184745,
    27.1558170915238,
    -80.6670609857901,
    27.1558170906695
    ),20,0.001) from dual

    Hi folks,
    Not sure if this is a bug or just how things are. I have a polygon that is valid, looking like an upside Q - i.e. a ring-like polygon with a big hole in the middle. On 10.2.0.4, when I run SDO_UTIL.SIMPLIFY with a 20 meter threshold, it returns NULL. A threshold of 80 returns a line whilst a threshold of 10 returns a reasonable result. But NULL? I don't see anything in the documentation about this.
    Next I tried the exact same thing on 11.1.0.7 and rather than NULL, I get ORA-13199 instead. This seems like an improvement. So I assume what produces NULL on 10g throws an error on 11g. I guess we call that progress and move on - any plans to backport this behavior to 10g?
    But back to the results. Looking through
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28400/sdo_util.htm#sthref2702
    I don't see any mention that a legal function result can be ORA-13199. So is this a bug? Or are some threshold values "just not gonna" work and always return an error by design?
    Thanks!
    Paul
    SELECT
    SDO_UTIL.SIMPLIFY(
    SDO_GEOMETRY(
    2003,
    8265,
    NULL,
    SDO_ELEM_INFO_ARRAY(
    1,
    1003,
    1,
    63,
    2003,
    1
    SDO_ORDINATE_ARRAY(
    -80.6678363850029,
    27.1544468240932,
    -80.6676581190441,
    27.1544578908543,
    -80.6673811848868,
    27.1545404243406,
    -80.6669873181666,
    27.1546888239902,
    -80.6669011856599,
    27.154727424447,
    -80.6667227848805,
    27.1548484903997,
    -80.6666243193133,
    27.1549804918455,
    -80.6665567184542,
    27.1551016239273,
    -80.6665443185942,
    27.1552556914498,
    -80.6666181177095,
    27.1555144243224,
    -80.6667779183997,
    27.1559106917256,
    -80.6668025185416,
    27.1560536914105,
    -80.6668271189153,
    27.1560868245381,
    -80.6668579182135,
    27.1560866907775,
    -80.6669009855045,
    27.1560592917636,
    -80.6669071190522,
    27.1559382250141,
    -80.6669871190558,
    27.1559106906018,
    -80.6673439852962,
    27.1559052909276,
    -80.6673931847717,
    27.1558888246279,
    -80.6674363186955,
    27.1558722246153,
    -80.6675469848459,
    27.1557622244607,
    -80.6678731857396,
    27.155575091261,
    -80.6679839844916,
    27.1554870246634,
    -80.6680947191472,
    27.1553660239724,
    -80.668279384442,
    27.1550798248074,
    -80.66834698489,
    27.1549642916886,
    -80.6683593847143,
    27.1548432242984,
    -80.6683101849162,
    27.1547276237897,
    -80.6681687190595,
    27.1545734909874,
    -80.6679841179111,
    27.1544468907341,
    -80.6678363850029,
    27.1544468240932,
    -80.6670609857901,
    27.1558170906695,
    -80.6669317858199,
    27.1558172245472,
    -80.6668271853341,
    27.1557840250493,
    -80.6666919857747,
    27.1552446911476,
    -80.6667105183963,
    27.155134623902,
    -80.6668213180802,
    27.1549420246816,
    -80.6670549849476,
    27.154793491146,
    -80.6674795852521,
    27.1546338906477,
    -80.6678303186443,
    27.154556890968,
    -80.6679287847641,
    27.1545568916289,
    -80.6681071851569,
    27.1546450245379,
    -80.6681933180075,
    27.1547606247241,
    -80.6682117191289,
    27.1548872243023,
    -80.6681931847942,
    27.1549532242227,
    -80.6681809185176,
    27.1549918246254,
    -80.6678917187281,
    27.1553990242445,
    -80.6677069852055,
    27.155542091489,
    -80.667479384833,
    27.1556740913815,
    -80.667270184745,
    27.1558170915238,
    -80.6670609857901,
    27.1558170906695
    ),20,0.001) from dual

  • SDO_UTIL.FROM_WKTGEOMETRY doing some odd math

    Hello,
    Can anyone explain simply what's going on here with the WKT transformation? Why are the coordinates snapping to some kind of grid? How do I control this and where is this documented? Why would I want my coordinates to go from 14 digits of precision to 38 digits? I get the same results with the straightforward use of FROM_WKTGEOMETRY where the fucntion
    {color:#008000}SELECT
    MDSYS.SDO_GEOMETRY(
    'GEOMETRYCOLLECTION(POLYGON((
    -76.57573699951172 38.91845748333781,
    -76.57571822404861 38.91807558545071,
    -76.57517105340957 38.918440788391166,
    -76.57573699951172 38.91845748333781
    ',8265)
    from dual{color}
    results in
    {color:#008000}SDO_GEOMETRY
    2004,
    8265,
    NULL,
    SDO_ELEM_INFO_ARRAY
    1,
    1003,
    1
    SDO_ORDINATE_ARRAY
    -76.57573699951171875,
    38.91845748333781074279613676480948925018,
    -76.575718224048614501953125,
    38.91807558545070833133650012314319610596,
    -76.575171053409576416015625,
    38.9184407883911660519515862688422203064,
    -76.57573699951171875,
    38.91845748333781074279613676480948925018
    {color:#000000}Thanks,
    Paul{color}
    {color}

    Hello Siva,
    Thanks for answering my question, I appreciate your time. I would argue that the primary problem here is the utter lack of any documentation concerning this issue by Oracle. I am glad that Oracle will correct this in "the next version". Does that include 10g or just 11g? Does that mean that these utilities will be converted from java into the core database or just rewritten better in java?
    My organization serves basically as data middlemen and processors. We take data from various sources and then host it for services and analysis by our clients. The expectation is that we are not changing the source data beyond our documented processes (reprojection, etc). It not uncommon for a client to compare our output with the original data to see if we are following their specifications. As GIS professionals we value our ability to pass this scrutiny. I would argue that this java number jumble creates the impression of sloppiness. I do understand that this is meaningless in spatial terms.
    Lets look at my triangle again:
    Original valid WKT triangle from source
    {color:#008000}-76.57418668270113{color} {color:#000080}38.91891450597657{color}
    {color:#008000}-76.57484114170074{color} {color:#000080}38.91758725401061{color}
    {color:#008000}-76.57661139965057{color} {color:#000080}38.91881851059802{color}
    {color:#008000}-76.57418668270113{color} {color:#000080}38.91891450597657
    {color}
    After SDO_GEOMETRY conversion (results in invalid geometry)
    {color:#008000}-76.57418668270112505069846520200371742249{color} {color:#000080}38.91891450597657353682734537869691848755{color}
    {color:#008000}-76.57484114170074462890625{color} {color:#000080}38.91758725401061269622005056589841842651{color}
    {color:#008000}-76.57661139965057373046875{color} {color:#000080}38.91881851059802244208185584284365177155{color}
    {color:#008000}-76.57418668270112505069846520200371742249{color} {color:#000080}38.91891450597657353682734537869691848755
    {color}
    After correction via SDO_UTIL.RECTIFY_GEOMETRY
    {color:#008000}-76.5741866827011{color} {color:#000080}38.9189145059766{color}
    {color:#008000}-76.5766113996506{color} {color:#000080}38.918818510598{color}
    {color:#008000}-76.5748411417007{color} {color:#000080}38.9175872540106{color}
    {color:#008000}-76.5741866827011{color} {color:#000080}38.9189145059766
    {color}
    {color:#000000}So if we institute a test and autocorrection of badly converted geometries:
    {color}<ul><li>geometries which convert properly get nutty precision added (out to 38 places in many case)</li>
    <li>geometries which fail conversion and then are rectified actually lose precision</li>
    </ul>
    The issue here is explaining and documenting this so that clients are confident that we know what we are doing. If I pass someone two geometries with 14 digits of precision and they send me back one with 38 digits and a second with 12 digits I might wonder what the heck they are doing to my data. Is there any place where these issues are documented in depth by Oracle?
    Thanks again for your time,
    Paul

  • Flash ring (rotating) as clipart?

    Hi,
    this is a combination of questions.
    I am doing some tutorial videos. I want to have a rotating ring on the screen to show people where to click.
    My understanding is, that you can use *.swf files as cliparts.
    My questions:
    1) Is there a free download for a simple rotating ring? (e.g. a ring made with a dotted line that rotates, used often as loading gfx in flash)
    2) Is there a detailed tutorial how to use these things? I made a test with a free SWF file, and I can't change the lenght of the swf. So if the animation is a lenght of 1 second, I want to display it for 10 seconds, starting over and over again. I did not find anything on that topic in the Elements' help.
    Thank you
    Smo

    Now, one way to "loop" would be to drag multiple instances of the animation onto the Timeline in the appropriate Video Track. This would have the same effect as having an animated Clip that did loop. The trick would be to make sure that the starting point, Frame 1, matched the end point, last Frame. That would need to be done in the animation program.
    If one needed interactivity (not sure if this is a goal), then the output would need to be into a format, like Flash/FLV, which could then be packaged in an SWF container for distribution.
    Good luck,
    Hunt

  • Orion-ejb-jar works in oc4j, but seemingly ignored while running in jdev

    I'm using OC4J 9.0.2.0 and JDeveloper 9.0.2.
    I have a set of entity classes. I'm trying to map the entity name to a different table name, and map the field names to different column names.
    I have an ejb-jar.xml that sets the ejb-name, and I have an orion-ejb-jar.xml that uses the ejb-name, specifies a "table-name", and uses "cmp-field-mapping" elements. The "table-name" and "cmp-field-mapping" elements do what I said, using a table name different from the ejb name, and db column names different from the field names.
    When I build and deploy this in standalone OC4J, it works fine. It creates the exact table and column names that I specified.
    Now, how the heck do I get this to work in JDeveloper 9.0.2? Is this impossible as of this version? I need to know this.
    In JDeveloper, I can edit the orion-ejb-jar.xml file, and I can do the "Edit Settings" option, and that all looks correct, but when I finally run the embedded OC4J, it creates the wrong tables with the wrong attributes.

    I tried a simple test case and it seems to work fine
    I create a entity bean by name "foo" with 2 fields "col1" (CMP PK) and "col2" (CMP field)
    Select orion-ejb-jar.xml in project and right-click on it and choose settings
    Select foo in the upper left hand items
    Added table name on the right hand side "deployfoo"
    Select CMP Field Mappings on the lower left hand side
    Select col1 and in the persistence name add "firstcolumn"
    Seelct col2 and in the persistence namd add "secondcolumn"
    When I run the bean the table is created with the above name and columns
    Message in log window
    <<
    Auto-creating table: create table deployfoo (firstcolumn VARCHAR2(255) not null primary key, secondcolumn VARCHAR2(255) null)
    >>>
    raghu
    JDev Team

  • Polygons - array clockwise

    Hi,
    In Oracle spatial 10g, we are having few millions of circular arc polygons (simply polygon, no interior polygon) "sdo_geometry (2003, null, null, sdo_elem_info_array (1, 1003, *2*)," and are finding the whether the user gps locations falling in any of these polygons (POI in polygon) . We are storing the vertices array in counter clockwise direction.
    Now, we are going to buy POIs (sdo_geometry (2003, null, null, sdo_elem_info_array (1, 1003, *1*)) just straight line connected polygons, no interior poygons.
    The problem here is, the third party poi may have vertices in clockwise or counter clockwise directions.
    Whether loading the third party's poi will impact my current table having circular poly in counter clockwise directions and calculating the Point in polygon?
    Is there any best practice to be followed here.

    Hi unnamed user 810260,
    Oracle Spatial defines a valid outer ring as counter-clockwise, no ifs ands or buts about it. Getting your rings into this orientation is your responsibility either by not accepting backwards polygons or by running SDO_UTIL.RECTIFY_GEOMETRY (or SDO_MIGRATE.TO_CURRENT) on each polygon you bring into Oracle Spatial.
    A reference might be similar issues surrounding importing WKT into Oracle Spatial
    SDO_UTIL.FROM_WKTGEOMETRY seems ignorant of ring rotation
    The OGC spec for WKT does not specify a ring rotation so your average WKT polygon could have rings going either way. As Dr. Ravada responds in that thread, it our problem to fix it. The generic WKT utility for Oracle Spatial just loads whatever its given however the rings are rotated and does not attempt to fix anything.
    So a best practice might be to rectify everything. I am not really a big fan of rectify myself (search the list for folks talking about NULL output). Rather I just test the ring rotation and reverse it if I find the problem.
    Cheers,
    Paul

  • Problem with TO_WKTGEOMETRY/FROM_WKTGEOMETRY

    Hello everyone
    I've installed Oracle 10g XE and I'm trying to use the geometry functions as described in OGC's Simple Features for SQL Spec. (see http://www.opengis.org/docs/99-049.pdf ), but they don't seem work. Is this a bug or is there a mistake in my SQL??
    SQL> CREATE TABLE spatial ( id int, g SDO_GEOMETRY );
    Tabelle wurde erstellt.
    SQL> INSERT INTO spatial VALUES( 1, SDO_GEOMETRY(2001, 1, SDO_POINT_TYPE(1, 1, NULL), NULL, NULL) );
    1 Zeile wurde erstellt.
    SQL> INSERT INTO spatial VALUES( 2, SDO_UTIL.FROM_WKTGEOMETRY( 'POINT(2 2)' ) );
    1 Zeile wurde erstellt.
    SQL> SELECT COUNT(*) FROM spatial;
    COUNT(*)
    2
    SQL> SELECT * FROM spatial;
    ID
    G(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    1
    SDO_GEOMETRY(2001, 1, SDO_POINT_TYPE(1, 1, NULL), NULL, NULL)
    2
    SQL> SELECT g FROM spatial WHERE id = 2;
    G(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
    SQL> SELECT id, SDO_UTIL.TO_WKTGEOMETRY( g ) FROM spatial;
    ID
    SDO_UTIL.TO_WKTGEOMETRY(G)
    1
    2
    SQL>
    Thanks and bye..
    Thomas

    Hello siva
    Thanks for your quick response!
    The thing is, we're two students and are currently working on implementing support for spatial datatypes in JPOX (a JDO implementation). To enable Oracle in our plugin we need the WKB/WKT-functions. Is there a royalty-free, workstation-only developers edition we can use that has these functions enabled?
    Thanks, bye...

  • Can only view the text of each email by rotating iPad

    My ipad 2 email client is not displaying the email text at all. It displays the headers ok - sender, time, date, etc. However, there is no text in the main body window. The only fix seems to be to rotate the iPad screen from Landscape to Portrait (or vice-versa) and the text and pictures appear. Also, if I go back to the emails later, they are blank once again, and have to be rotated again. This has to be done for each and every individual email. Any ideas? You cant delete an re-install the email client can you? Cheers.

    Have you tried closing the Mail app completely and then seeing if it works ok when you re-open it ? From the home screen (i.e. not with the Mail app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Mail app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    If that doesn't work then you could try a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Get text frame's angle of rotation

    Hello. Does anyone know if there's a way to get/return a text frame's angle of rotation? I've searched through the CS4 AppleScript documentation and the closest I found was a text frame's "matrix" property which seems to be used to rotate an object but not return an object's current angle of rotation. (There is a character rotation property but this seems to return the rotation of each character in the text frame, not the text frame as a whole.)
    Ben

    I don't think you need to go to Ruby or satimage for this. Neat though it is to figure out the math of the matrix and implement this yourselves, Illustrator's scripting dictionary has the commands to make Illustrator translate an angle to a matrix value and vice versa:
    see
    concatenate rotation matrix
    and
    get rotation matrix
    in the language dictionary.
    There are the equivalent commands for scale and translation matrices too.
    In the Illustrator CS6 Applescript Dictionary, I'm looking at Page 99.

  • DVT:  Line Graph O1TickLabels do not rotate and are misaligned

    Hi,
    I have been trying to get the O1TickLabels aligned correctly when using the line graphs, but I am still not having any luck.
    It seems that when I have enough data points and the labels are sufficiently long in length, the labels for the O1 Axis start to the left of the Y1 axis.
    I would have assumed that the auto layout would have rotated the labels, but that is not the case. I have tried changing the chart type to a bar chart and that seems to know to rotate the labels.
    Is this a limitation of the line graph or is there something else I need to set for a line graph.
    I have also tried to set the following attribute: tickLabel.setAutomaticRotation(BaseGraphComponent.AR_NO_ROTATE), but this does not solve the issue.
    Thanks,
    Will

    Try to set seriesSet  defaultMarkerShape="MS_CIRCLE" and markerDisplayed="true" like:
    <dvt:seriesSet defaultMarkerShape="MS_CIRCLE" markerDisplayed="true">
           <dvt:series/>
    </dvt:seriesSet>

  • Local rotation problem

    I am programming a spaceship moving around in Java3D.
    My problem is that I want the ship to be able to rotate around its z-axis(roll) and along its x-axis(nose up or down), when I am doing this however only one of the axis will follow the ships local coordinates.
    The scene looks like this.
    BG - TG1 - TG2 - Model
    TG2 is the z-axis rotation, and that works fine since it will rotate when T1, the x-axis rotation rotates. T1 however will be fixed to the world and not be affected by TG2s rotation...
    How do I make both rotations move along the axis of the local coordinates of the ship, instead of the world axis (BG axis).

    That does not matter, one rotation will cone first and that will mess up the other one. It seems like the first rotation is always locked to the world coordinate axis.
    This is my behavior code (after combining both transform groups into one):
    class FighterRotate extends Behavior
         double angleX;
         double angleZ;
         TransformGroup targetTG;
         Transform3D rotationX;
         Transform3D rotationZ;
         KeyEvent evt;
         WakeupOnAWTEvent awaken;
         FighterRotate(TransformGroup TG)
              angleX = 0;
              angleZ = 0;
              targetTG = TG;
              rotationX = new Transform3D();
              rotationZ = new Transform3D();
              awaken = new WakeupOnAWTEvent(KeyEvent.KEY_PRESSED);
         public void initialize()
              this.wakeupOn(awaken);
         public void processStimulus(Enumeration criteria)
              evt = (KeyEvent)awaken.getAWTEvent()[0];
              if (evt.getKeyCode() == KeyEvent.VK_UP)
                   angleX += 0.1;
              if (evt.getKeyCode() == KeyEvent.VK_DOWN)
                   angleX -= 0.1;
              if (evt.getKeyCode() == KeyEvent.VK_RIGHT)
                   angleZ += 0.1;
              if (evt.getKeyCode() == KeyEvent.VK_LEFT)
                   angleZ -= 0.1;
                   rotationX.rotX(angleX);
                   rotationZ.rotZ(angleZ);
                   rotationX.mul(rotationZ);
                   targetTG.setTransform(rotationX);
              this.wakeupOn(awaken);
    How can I change this to make my model move as it should?

  • Problem with rotated canvas in Illustrator

    I'm having a strange problem here. Friend of mine sent me a screen grab of her Illustrator workspace - it seems the artboard got rotated somehow. And she can't get it to straighten back... Neither can I, or any of our friends of designing persuasion... I wasn't even aware you can do that in Illustrator. Anyway, the question is, how do you undo this? All the new files start already rotated, too.
    Screen grab follows:
    http://img27.imageshack.us/img27/1882/ctrln2.jpg
    Any help would be greatly appreciated.

    See Constrain Angle inside the Illustrator Preferences.

Maybe you are looking for