How to get the x1,y1 and z1 coordinates out of an sdo_geometry object?

Hello,
i have stored several boxes into an sdo_geometry object like the following:
mdsys.sdo_geometry(3003,null,null,
mdsys.sdo_elem_info_array(1,1003,3),
mdsys.sdo_ordinate_array(x1,y1,z1,x2,y2,z2)
now i would like to get the x1,y1,z1 coordinates from the boxes. how can i get them with a simple sql-statement?
When i do "SELECT v.shape.sdo_ordinates ..." then i get a sdo_ordinate_array. But how can i get only the first coorinates?
I know how it works to get x1,y1 and z1 over a java-prog. But i want to get them with a sql-statement as i also want to get the min and max x1,y1,z1.
Hope there is anybody that can help me. Thanks in advance.
Markus Veith

You can get coordinates from an SDO_POINT_TYPE as follows:
SELECT      t.GEOMETRY.SDO_POINT.x,t.GEOMETRY.SDO_POINT.y
FROM      TABLE T
(where geometry is the geometry column and table is the geometry table, note
that a table alias must be used.)
Getting the coordinates from the SDO_ORDINATES is a little trickier.
You'll need to use a loop in PL/SQL, eg:
SET SERVEROUT ON
DECLARE
i number;
j NUMBER;
BEGIN
FOR sel IN (SELECT <geom_column> FROM <geom_table> WHERE ROWNUM < 10) LOOP
i := 1;
while i < sel.<geom_column>.sdo_ordinates.count LOOP
j:= sel.GEOMETRY.sdo_ordinates(i);
dbms_output.put_line(j);
i := i + 1;
j:= sel.GEOMETRY.sdo_ordinates(i);
end loop;
dbms_output.put_line(j);
END LOOP;
END;
This will print the SDO_ORDINATES to the SQLPLUS screen, put a WHERE clause to reduce output.
To use these values in a query, put them in a cursor.

Similar Messages

  • Does anyone know how to get the vendor ID and product ID for NI-Visa? TIA

    Does anyone know how to get the vendor ID and product ID for NI-Visa? TIA

    This question has already been addressed in this thread:
    Does anyone know how to get the vendor ID and product ID for a USB device in NI-Visa?
    John M
    National Instruments

  • Does anyone know how to get the vendor ID and product ID for a USB device in NI-Visa? TIA

    Does anyone know how to get the vendor ID and product ID for a USB device in NI-Visa? TIA

    Hello,
    Exactly which USB device are you referring to? Is the device a NI product?
    The Product ID for National Instruments DAQPad-6020E is 0x12C0. The USB vendor ID is 0x3923. This is a 16-bit hexadecimal number(1093) (that is decimal 4243).
    Also, here's a document on our website that will help you in configuring NI-VISA to control your USB device:
    http://zone.ni.com/devzone/conceptd.nsf/webmain/6792BAB18242082786256DD7006B6416?opendocument
    Swapnil P.
    National Instruments Engineer

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • I have been charged 274.55 from 8-23-2013 - 8-26-2013. These are not my charges. I need to know how to get the charges reversed and put back on my account ASAP. Please confirm!

    I have been charged 274.55 from 8-23-2013 - 8-26-2013. These are not my charges. I need to know how to get the charges reversed and put back on my account ASAP. Please confirm!

    You can contact iTunes Support via this page (we are fellow users here on these forums) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • When I went and connected  phone to my laptop and hit restore and it got rid of everything my photos my contacts everything and I don't know how to get the stuff back and if you need to know I have an IPhone4S

    When I went and connected my phone to my laptop and hit restore and it got rid of everything my photos my contacts everything and I don't know how to get the stuff back and if you need to know I have an IPhone4S

    I take it you were replacing an older iPhone and this was the first time you plugged it in? If so, that's what happens. It restored the backup of your old phone. A backup of the current phone is not made in those circumstances.
    If that's not what happened, you need to clarify.

  • How to get the Equipements number and desciption for the contract item ?

    Hi Gurus,
            How to get the Equipements number and desciption for the contract item items? It would gr8 helpful to me...
    VBAP,,EQUI,,,,,,?
    Thanks
    Krisna

    Check with below tables :
    EQUI    Equipment master data
    EQKT   Equipment short text
    EQUZ   Equipment time segment
    Thanks
    Seshu

  • How to Get the Login Window and/or Bypass Login Items?

    Greetings, folks!
    This is a silly question, but the old standby of “hold down the shift key” doesn’t work in 10.6.1:
    What key(s) need to be pressed to get the LogIn window and then after LogIn, to bypass LogIn Items?
    Thanks!!
    Richard Fairbanks

    Not here, on a fresh (erased) install.
    Pressed either before or after the initial gray Mac appears, the shift key does not access the LogIn screen. It is possible to bypass the account’s LogIn items by holding down the shift key after the LogIn screen has been called and successfully commenced, but how does one call the Login screen when the Mac is normally set up for automatic login?
    It used to be the shift key . . . 
    Thanks!

  • How to get the client date and time ?

    Dear Sirs...
    Using jdeveloper 10.1.2.0
    How can i get the client date and time using the HttpServletRequest ?
    thanks for any help in advance
    best regards

    If your code is running on the client pc you can just create a new instance of the java.util.Date class. That class automatically defaults to the current time of the client machine. Otherwise if you're running the code on the server, you could insert/post the client date/time by adding its string representation as a parameter to the HTTP request object.
    Ronald

  • How to get the class name and field name dynamically

    Hi
    I have a class (ex: Contract) the fields (ex : a,b,c) .i need to get the class name and field name dynamically
    ex
    if( validation file for the field Contract.a){
    return contract.a;
    }else if(validation file for the field Contract.b){
    return contract.b;
    how to pass the field name and object dynamically
    Please help me .............
    Thanks in Advance..
    Edited by: 849614 on Aug 11, 2011 6:49 AM

    YoungWinston wrote:
    maheshguruswamy wrote:
    Agreed, but IMO, i still feel its best if there is no tie in between consumer class level details and the database it talks to. A service layer is needed in between them.Sounds like you've done a bit of this before. Me, I've either been a modeller/DBA, doling out data, or a nuts and bolts programmer (and actually more toolmaker than apps, but did a bit of that too).
    Do you know of a good book about the "middle ground" (ie, these service layers)? I understand it empirically, but haven't had a lot of exposure to it.
    Winston
    Edited by: YoungWinston on Aug 11, 2011 10:34 PM
    PS: Apologies. Edited my previous post, presumably while you were composing your reply, when I finally realized what '.filed' meant.Most of my work is in web development, never been a DBA :) . The biggest 'concern' in my shop is 'separation of concerns'. The UI group reports up to a different IT head, the DB group reports up to a different IT head and so on. The looser the coupling between these systems, the lesser the project costs (Integration, QA etc) are. Martin Fowler's books contain good information about separation of concerns in an enterprise environment. The two books which i recommend are
    [url http://www.amazon.com/Patterns-Enterprise-Application-Architecture-Martin/dp/0321127420]Enterprise Application Architecture and
    [url http://www.amazon.com/Enterprise-Integration-Patterns-Designing-Deploying/dp/0321200683/ref=pd_sim_b_1]Enterprise Integration Patterns

  • OIM: How to get the last operation and data from a child form action

    Dear OIM guru,
    I have a regular Process form, a child form and a process definition. When there is an insert/delete into child form a trigger is raised and the process task gets called. The process task does whatever it needs to do on the target system. This is all fine. However, after the task completes, lets say successfully, I want to send out an email to the user saying, for example, group 1 has been added to you or just got deleted.
    I am not able to figure out how to get that last operation and child form data. I am sure you came across this and if so please let me know how to do this.
    Thanks

    So, Can I add a similar process task with the same exact condition one more time? I thought I couldn't use the same condition again. For example, when a group is deleted can I use the process data->child data->group Id with old value check box checked on another process task?

  • When we run query how it gets the characteristic values and attributes.

    Hi,
    When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert  DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
    Bye
    GK

    when we run the query how it checks and gets the characteristic values and attributes.
    Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.

  • How to get the exact Height and width of the text in TextLayout Framework

    Hello fellow developers,
    I start working with TLF when there is three different SWC's Now I am working with Single SWC with flex 4 and lot of things are changed like
    I use calculateHeight(),calculateWidth()  now these methods are not available.
    Please if anyone know the replacement of these methods then Let me know.
    thanks

    If the text exceeds the container, which can happen in a scrollable container where you have to scroll to see some of the text, then the values getContentBounds returns are estimated values. This is because we don't want to force the text to recompose all the way to the end of a very long TextFlow in order to return a value. However, if you want to get the exact amount, and don't mind taking the time to recompose, call textFlow.flowComposer.composeToPosition(), before calling getContentBounds. This forces all the text to recompose to the end, and then getContentBounds will return the fully calculated value instead of estimating.

  • SDK : how to get the server adress and port ?

    Almost everything is in the title, I'm look for code to get the server URL and port where the ME is running ;o)
    There should be some standard API I guess.
    Thanks
    Regards

    Hi,
    In the code that I write I usually have access to the HTTP Request Object.
    String serverName = request.getServerName();
    String serverPort = request.getServerPort();
    Then I just do a compare on the returned value to see if I am on our Test or Production server.
    if(request.getServerName().indexOf("prodservername") >= 0)
      // PRODUCTION CODE HERE
    else
      // TEST CODE HERE
    Hope this helps,
    Mike

  • How to get the server port and id from the Initialcontext

    hi
    i know that i can get the server port and id where the jndi service is listening from the InitialContext ( when i create InitialContext ic = new InitialContext(); from within a EJB. ). Does this work on any application server and where (at what position is for example the port) in the Enumeration at the ic are the different things put?

    I would usually just get the PROVIDER_URL property from the InitialContext and use that to determine the location of the naming service:
    String providerURL = (String)ic.getEnvironment().get(Context.PROVIDER_URL);You'll then need to parse that string to obtain the port and the server name. For example:
    // Assume that the provider URL is of form "protocol://server:port"
    int serverStartIndex = providerURL.indexOf("://" + 3);
    int serverEndIndex = providerURL.indexOf(:, serverStartIndex);
    String server = providerURL.substring(serverStartIndex, serverEndIndex);
    String port = providerURL.substring(serverEndIndex + 1);It's a fairly universal approach but there'll doubtlessly be some special cases (for example, the provider URL could be null and the InitialContextFactory class defaults it).
    You might have to adjust the server/port parsing stuff a bit as I just made that up and your URL might not conform to the pattern I described.
    Hope this helps.

Maybe you are looking for

  • Can I connect a Pioneer se-m390 to iPod shuffle 4?

    I own iPad 2 and I connected my headphones Pioneer se-m390 to this device and I can listen to music with a very strong audio volume. My question is: can I connect a Pioneer se-m390 to iPod shuffle 4? In other words: Audio hardware is similar to iPad

  • Reuse a spry menu bar

    I have tried many things to reuse my menu bar, template,library and snippets, will minimal results, is their a other way to do this? The closes I got was with the template, but when I edited the template it never carried over to the new page. dwcs4,

  • Retrieve long-term transaction history from locked users

    Hi all, I need to gather an audit report on terminated users and their transaction codes for a specific date range. We have an auditor using the FOX tool to gather information, but it only applies to currently active users. They are able to get data

  • Power issues with Mac Pro (early 2009)

    I have a problem that seems to be related to power issues. I have to disconnect the power cord for a few hours, then, I connec it again and turn on the mac. I have replaced the power supply (by a certified technician) and the problem seemed solved. N

  • Photoshop freezes when placing text

    Using Photoshop CC 2014,When I try to place text in my document, the program fails to respond. I have to terminate the program to clear it.