Sdo_util.to_gmlgeometry on an optimized rectangle with a hole

11.2.0.2 on Linux
This is a bit of an obscure one - I've worked around it, but thought I'd put it up here anyway...
I've got a polygon geometry that is an optimized rectangle outer ring with an optimized rectangle inner ring - I know, very odd and not really a good idea, but it does pass validation:
SQL> select sdo_geom.validate_geometry_with_context(
  2    sdo_geometry(2003, null, null, sdo_elem_info_array(1, 1003, 3, 5, 2003, 3), sdo_ordinate_array(0, 0, 10, 10, 0.5, 0.5, 9.5, 9.5)),
  3    0.005) as valid
  4  from dual;
VALID
TRUE
sdo_util.to_gmlgeometry produces a sensible result:
SQL> select sdo_util.to_gmlgeometry(
  2    sdo_geometry(2003, null, null, sdo_elem_info_array(1, 1003, 3, 5, 2003, 3), sdo_ordinate_array(0, 0, 10, 10, 0.5, 0.5, 9.5, 9.5))) as gml
  3  from dual;
GML
<gml:Polygon srsName="SDO:" xmlns:gml="http://www.opengis.net/gml">
  <gml:outerBoundaryIs>
  <gml:LinearRing>
  <gml:coordinates decimal="." cs="," ts=" ">0.0,0.0 10.0,0.0 10.0,10.0 0.0,10.0 0.0,0.0 </gml:coordinates>
  </gml:LinearRing>
  </gml:outerBoundaryIs>
  <gml:innerBoundaryIs>
  <gml:LinearRing>
  <gml:coordinates decimal="." cs="," ts=" ">0.5,0.5 0.5,9.5 9.5,9.5 9.5,0.5 0.5,0.5 </gml:coordinates>
  </gml:LinearRing>
  </gml:innerBoundaryIs>
</gml:Polygon>
But sdo_util.to_wktgeometry makes a dogs dinner of it:
SQL> select sdo_util.to_wktgeometry(
  2    sdo_geometry(2003, null, null, sdo_elem_info_array(1, 1003, 3, 5, 2003, 3), sdo_ordinate_array(0, 0, 10, 10, 0.5, 0.5, 9.5, 9.5))) as wkt
  3  from dual;
WKT
POLYGON ((0.0 0.0, 10.0 0.0, 10.0 10.0, 0.0 10.0, 0.0 0.0))
Looks like a bug in sdo_util.to_wktgeometry?
We'll get around it by writing these geometries out in the long format, but I'd expect sdo_util.to_wktgeometry to handle it nonetheless.
John

Same on 12.1.1.0 too.
PDB1@ORCL> select banner from v$version;
BANNER
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
PL/SQL Release 12.1.0.1.0 - Production
CORE 12.1.0.1.0 Production
TNS for Linux: Version 12.1.0.1.0 - Production
NLSRTL Version 12.1.0.1.0 - Production
PDB1@ORCL> select sdo_util.to_wktgeometry(
  sdo_geometry(2003, null, null, sdo_elem_info_array(1, 1003, 3, 5, 2003, 3),
  sdo_ordinate_array(0, 0, 10, 10, 0.5, 0.5, 9.5, 9.5))) as wkt
from dual;  2    3    4 
WKT
POLYGON ((0.0 0.0, 10.0 0.0, 10.0 10.0, 0.0 10.0, 0.0 0.0))

Similar Messages

  • How to Trim Rectangle with text to create reflection?

    Hello Everyone,
    I am realtively new to Illustrator and I am facing a problem that I am hoping some expert here can resolve. I have some text and I have converted it to outlines. Now I want to create shine on it. I want to fill a rectangle with white color and then clip it with text to give reflection effect but I can't figure out how to do it. I have selected my text and rectangle and tried all options in path finder tool but nothing seems to work. Please guide me how can this be done.
    Regards,
    Afraz Ali

    Afraz Ali,
    If you want to have the colour/colours/colour transition of the rectangle where the text is is nothing outside it, in other words colour the text with the colouring of the rectangle, you may:
    Use Live Type over the rectangle, select both, and Object>Clipping Mask>Make.
    With outlined type, you have to turn the lettershapes into a Compound Shape first.
    As you can see, it is simpler to just use Live Type, and it is editable.

  • I have a rectangle with the word caption written twice on it which appears on my page and obscures my information - how can I get rid of this please?

    I have a rectangle with the word 'caption' written twice on it which appears on my page and obscures my information. How can I get rid of it please?

    Can you post the URL so we can test the page and look at its code?

  • VIDEOS ARE COVERED WITH WHITE RECTANGLES WITH THIS MESSAGE ON THEM Calibrated (Q) XD decode PLEASE HELP.

    I DOWNLOADED CALIBRATED XD DECODED DEMO VERSION TO WATCH A VIDEO THAT MY QUICKTIME WOULD NOT PLAY BECAUSE IT WAS SHOT WITH  XDcam AFTER WATCHING THE VIDEO I ERASED THE CALIBRATED XD...
    NOW THE PROBLEM IS EVERYTIME I GO AND BURN A DVD USING TOAST THE VIDEOS ARE COVERED WITH WHITE RECTANGLES WITH THIS MESSAGE ON THEM Calibrated (Q) XD decode PLEASE HELP..

    CONTACT CALIBRATED TECH SUPPORT.  THey can best help with the removal of the demo.

  • Can't reshape rectangle with the "Selection Tool"

    Hi,
    After updating Illustrator CC 2014 to the newest versions I can't reshape rectangles with the "Selection Tool".
    Is this a new feature where you have to go to: "Shape > Expand rectangle" to be able to reshape it?
    -C

    ristogoertz,
    I am afraid you have come across the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks).
    So a switch to Mavericks with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • How can i creat several rectangles with one draw rect.vi

    how can i creat several rectangles with one draw rect.vi? thanks
    Solved!
    Go to Solution.

    You can call it in a for loop, with an array of the rectangle coordinates you want to draw. Is this what you mean?
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    rectangle.png ‏11 KB

  • Scale simple rectangle with .css on hover

    Good evening dear members,
    I uploaded you a sample project to illustrate the problem. (Dropbox - Example.zip)
    Over all I only want to resize a rectangle with a hover effect. However, the problem arises that the size of the rectangle with scale = 1 changes?!
    I create a rectangle "button" and give the "button" as mouseout-action the following code:
    var object = sym $ ("button").
    rescale = 1;
    object.css ('transform', 'scale (' + rescale + ')');
    object.css ('o-transform', 'scale (' + rescale + ')');
    object.css ('- ms-transform', 'scale (' + rescale + ')');
    object.css ('- webkit-transform', 'scale (' + rescale + ')');
    object.css ('- moz-transform', 'scale (' + rescale + ')');
    object.css ('- o-transform', 'scale (' + rescale + ')');
    object.css ('z-index', '1');
    I don´t understand why the rectangle is changing!
    Maybe you can explain it to me :-)
    Best regards and many thanks
    Marc

    It shouldn't get smaller, in fact at a value of 1, it should not change at all because 1 equates to 100% of the original.
    Change the value to a higher number, like 2, for example. Which says 'transform to 200% of the original'.
    var object = sym.$("button");
    rescale= 2;
    object.css({
                'transform': 'scale(' + rescale + ')',
                '-ms-transform': 'scale(' + rescale + ')',
                '-moz-transform': 'scale(' + rescale + ')',
                '-webkit-transform': 'scale(' + rescale + ')',
                '-o-transform': 'scale(' + rescale + ')',
                'z-index':'1'
    To get a better understanding of how the values work and there equivalents.
    - Select any element on your Stage;
    - Then toy with the Transform property (see capture);
    - as captured a transform at 167% equates to a value of 1.67
    hth
    Darrell

  • Rectangles with colors

    <mx:Canvas id="b1" x="10" y="10" height="40" width="300" borderStyle="solid" borderColor="black"/>
    to add rectangles side by side inside this canvas i wrote the following code
    for(var i:int=b1.x;i<b1.x+b1.width;i=i+15)
                        var line1:UIComponent = new UIComponent();
                        var lineThickness1:Number = 1;
                        var lineColor1:Number = 0x000000;
                        var lineAlpha1:Number = 1;
                        line1.graphics.lineStyle(lineThickness1,lineColor1,lineAlpha1);
                        line1.graphics.moveTo(i,b1.y);
                        line1.graphics.drawRect(i,b1.y,15,b1.height);
                        this.addChild(line1);
    now I want to fill those rectangles with colored rectangles starting to ending
    i pass the units then units*15 will be calculated and the covered rectangles will be populated with colored rectangles for that i wrote the following code
                             var c:UIComponent = new UIComponent();
                            var xposstr:String = arr1.getItemAt(arr1.length).toString();
                            var xpos:int = parseInt(xposstr);
                           c.graphics.beginFill(0xFFCC00,1);
                            c.graphics.drawRect(xpos,0,numUnits*15,b1.height-2);
                            c.graphics.endFill();
                            b1.addChild(c);
                            arr1.addItem(c.x+numUnits*15);
    arr1 is the ArrayCollection
    but iam not getting the required output

    This code draws rectangle (random background color),
    var colors: Array = [0x0000FF, 0x00FF00, 0xFF0000, 0xFF00FF]
    for(var i: int = 0; i < b1.width; i = i + 15) {
         var lineThickness1:Number = 1;
         var lineColor1:Number = 0x000000;
         var lineAlpha1:Number = 1;
         var bgColor: uint = colors[Math.floor(Math.random() * colors.length)];
         var g: Graphics = b1.graphics;
         g.lineStyle(lineThickness1,lineColor1,lineAlpha1);
         g.beginFill(bgColor, 1.0);
         g.moveTo(i, 0);
         g.drawRect(i, 0, 15, b1.height - 1);
         g.endFill();

  • Rectangle with editable text

    Hi
    I am working on drawing applet, in which as soon as the user clicks and drags rectangle in canvas a pop up comes asking for some input by user.If the user drags the rectangle somewhere that input area should also move with it.
    Tht means I want editable rectangle.
    I don't know how to perform this and also I don't have to use javascript.
    Kindly guide me for the same.
    Thanks

    Thnx for the reply.
    Till now what I have come to know is that basically I need to use Composite Objects . I want a rectangle with text field. So that the user could enter some information like name and location.
    I am working on map applet.
    How can I use the concept of composite object for the same?
    If there is any other way to do this please tell me.
    I am new to java programming.
    Thanks
    Message was edited by:
    rapid

  • No bounding box for resizing rectangles with latest Illustrator update (CC 2014 18.1.0). iMac with OS 10.8.5. Please fix.

    Lost ability to resize rectangles with latest Illustrator update. Please correct.

    The following entry may indicate a failing harddrive, so doing backups and replacing the harddrive may be in order.
    Disk Information:
              TOSHIBA MK7559GSXF disk0 : (750,16 GB)
              S.M.A.R.T. Status: Failing                                  <-----------
    A little bit about drive S.M.A.R.T. status:
    "The most basic information that SMART provides is the SMART status. It provides only two values: "threshold not exceeded" and "threshold exceeded". Often these are represented as "drive OK" or "drive fail" respectively. A "threshold exceeded" value is intended to indicate that there is a relatively high probability that the drive will not be able to honor its specification in the future: that is, the drive is "about to fail". The predicted failure may be catastrophic or may be something as subtle as the inability to write to certain sectors, or perhaps slower performance than the manufacturer's declared minimum."
    http://en.wikipedia.org/wiki/S.M.A.R.T.

  • The airport icon (upper right portion of the screen) says I am connected to my airport; but, I don't get the icon on the Itunes window (rectangle with a triangle at the bottom of it) that allows me to select the stereo that is connected to my airport?

    The airport icon (upper right portion of the screen) says I am connected to my airport; but, the Itunes window doesn't show the icon (rectangle with an arrow in it) that allows me to select the stereo system speakers that are attached to the airport.  What's up with that?

    If the modem is also a router, either use the modem in bridge and run pppoe client on the TC.. that is assuming ADSL or similar eg vdsl. If it is cable service.. and the modem is a router, then bridge the TC.. go to internet page and select connect by ethernet and below that set connection sharing to bridge.
    Please tell us more about the modem if the above gives you issues.

  • When I create a rectangle, I can not to change the shape of a rectangle with the cursor in illustrator CC 2014 For what?

    When I create a rectangle, I can not to change the shape of a rectangle with the cursor in illustrator CC 2014 For what?

    Xavigarcia,
    I am afraid you have come across the Live Rectangle bug which is limited to the MAC versions starting with 10.7 and 10.8, but not 10.9 (Mavericks) or 10.10 (Yosemite). Hopefully, the bug will be fixed soon.
    So a switch to Mavericks or Yosemite with a reinstallation might be the way to solve it here and now.
    To get round it in each case, it is possible to Expand the Live Rectangles to get normal old fashioned rectangles, or to Pathfinder>Unite, or to use the Scale Tool or the Free Transform Tool.
    A more permanent way round that is to create normal old fashioned rectangles, after running the free script created by Pawel, see this thread with download link:
    https://forums.adobe.com/thread/1587587

  • I want to draw rounded rectangle with dashed border

    Hello,
    I am working on flex 4.5 air 2.7 . And i want to draw rounded rectangle which has dashed border or solid border as per user's selection. Also rectangle can be rounded or simple. I am able to draw simple rectangle with dashed border. I want a solution for rounded rectangle.
    If anyone have any idea then post as soon as possible..
    Thanks
    Dhwani

    Good day!
    Could you please post a screenshot with the Layers Panel visible?
    Is the iten by any chance a Shape Layer and therefore does have a Vector Mask?
    Regards,
    Pfaffenbichler

  • Spark - Drawing a rounded rectangle with 3-sided border?

    I am upgrading to the Spark theme, and I am trying to draw a rectangle, with a corner radius of 20, with a border on only the top, right, and bottom sides.
    Basically, I want it to dock flush left in my application and extend out in a rounded rectangle.
    But I Cannot figure out how I would draw this in SVG? Anyone done this yet?

    Ned,
    Thank you for your response.  I apologize for the delay in my own response.
    I was seeing distortion in x direction as well.
    I was able to solve my problem using 9-slice scaling.  I used the scale9Grid property.

  • Fill a rounded rectangle with a gradient paint with "new RoundRectangle2D"?

    Hello,
    at the moment I have to do a lot of Java2D to draw a customized GUI. Now it comes to a simple task, filling a rounded rectangle with a gradient paint. I have a solution for this - but I don't know if it is bad to do it this way:
    private void drawBackground( Component component, Graphics2D graphics2d ) {
         int w = component.getWidth() - 1;
         int h = component.getHeight() - 1;
         graphics2d.setPaint( gradientPaint );
         RoundRectangle2D backgroundShape =
              new RoundRectangle2D.Float( 0, 0, w, h, 10, 10 );
         graphics2d.fill( backgroundShape );
    }This is very easy and it works. The backdraw is, that on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D. On the other hand, I don't know how to fill a rounded rectangle with a gradient paint without a RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.
    Well, I would like to hear some kind of "this is okay" (maybe because those Shape implementation are all not very memory consuming and the instanciation in Java is not very time consuming) by you Java2D experts :) Or, of course, how I could do it better.
    Thanks a lot for your help!

    patb1 wrote:
    on every call of "drawBackground", which is called on a repaint() method by Swing, a "new RoundRectangle2D.Float" will be created. I don't know how "expensive" it is to create a new RoundRectangle2D.
    When I do it this way, I worry that at a later time, when I created a lot of custom components that all create shapes on a repaint, the GUI may become horrible slow or has a huge memory footprint.You could do as many UI delegates in the Swing code do with Rectangles: maintain a RoundRectangle2D as a field and set its attributes when it is to be painted (setRoundRect(double x, double y, double w, double h, double arcw, double arch)).
    db

Maybe you are looking for