How do I get sdo_point into C host variables from OTT structures?

How do I get sdo_point info into C host variables from structures generated by OTT?
Databse Version 10.1.0
I am using OTT to generate C structures for the Oracle Spatial datatype sdo_geometry. The file is generated as
#ifndef GEOMETRY_ORACLE
# define GEOMETRY_ORACLE
#ifndef OCI_ORACLE
# include <oci.h>
#endif
typedef OCIRef sdo_geometry_ref;
typedef OCIRef sdo_point_type_ref;
typedef OCIArray sdo_elem_info_array;
typedef OCIArray sdo_ordinate_array;
struct sdo_point_type
OCINumber x;
OCINumber y;
OCINumber z;
typedef struct sdo_point_type sdo_point_type;
struct sdo_point_type_ind
OCIInd _atomic;
OCIInd x;
OCIInd y;
OCIInd z;
typedef struct sdo_point_type_ind sdo_point_type_ind;
struct sdo_geometry
OCINumber sdo_gtype;
OCINumber sdo_srid;
struct sdo_point_type sdo_point;
sdo_elem_info_array * sdo_elem_info;
sdo_ordinate_array * sdo_ordinates;
typedef struct sdo_geometry sdo_geometry;
struct sdo_geometry_ind
OCIInd _atomic;
OCIInd sdo_gtype;
OCIInd sdo_srid;
struct sdo_point_type_ind sdo_point;
OCIInd sdo_elem_info;
OCIInd sdo_ordinates;
typedef struct sdo_geometry_ind sdo_geometry_ind;
#endif
I can successfully access the sdo_gtype and sdo_ordinates using the following ProC code
exec sql begin declare section;
int sptype;
double coord[100000];
sdo_geometry *spgeom;
sdo_ordinate_array *spcoords;
exec sql end declare section;
/* allocate memory for the geometry host variable */
exec sql allocate :spgeom;
select bounds into :spgeom from boundary;
/* retrieve the geometry type from the geometry host variable into a host variable */
exec sql object get sdo_gtype from :spgeom into :sptype;
/* allocate memory for the sdo_ordinate_array host variable */
exec sql allocate :spcoords;
/* move the coordinates from the geometry host variable into the sdo_ordinate_array host variable */
exec sql object get sdo_ordinates from :spgeom into :spcoords;
/* determine the number of coordinates */
exec sql collection describe :spcoords get size into :numord;
/* move the coordinates from the sdo_ordinate_array host variable into a host array */
exec sql for :numord collection get :spcoords into :coord;
I cannot, however, figure out how to get point data out of the host variable spgeom. If I prepare code analagous to the other types in the geometry structure, I get an error. I can see that sdo_point is different because it is a struct within the geometry definiton of typedef OCIRef but my knowledge of C is sufficeintly weak that I cannot figure out how to get sdo_point into C host variables. Some sample code for getting the sdo_point data would be greatly appeciated.
Thanks, Chris

To get point data from geometry column use following
select a.location.sdo_point.x, a.geometrycolumn.sdo_point.y
from tablename a;
Do not forget to alias the table.

Similar Messages

  • How do I get direct into P/S cc from a picture in Bridge instead of it coming up in Windows photo viewer when I click on the picture?

    On previous versions I simply clicked on a picture in BR and it came up in P/S at the moment it defaults to Windows photo viewer. I also get a version of Elements editor 12 trial showing in the "open with" table that I would like to get rid of ?

    at the moment it defaults to Windows photo viewer.
    In Bridge preferences file type associations you can alter the application you want Bridge to open that file type in.
    I also get a version of Elements editor 12 trial showing in the "open with" table that I would like to get rid of ?
    The open with shows all applications on your system, if you have not uninstalled the trial version properly you should try to do so or just ignore it.

  • TS2972 How do i get files into the library form a Windows host computer

    How do I get files into the sharing library with a Windows host Computer? Other than buying another computer!

    You use iTunes, though only specific formats are supported.
    Which AppleTV modesl do you have? 1, 2 or 3?

  • How can I get back into my application aftermath invoking Start up page of index.htm ?

    Gorgeous Hello All,
    If anyone of you can please provide me a solution for the following, will help me in plentious and galore.
    Am using Adobe RoboHelp, Version 10 and IE version being 10.
    A hurdle :-
    I have a application which has been developed in ASP .NET, Version 4.0. Help link has been created in this application wherein here the Start up page of index.htm has been linked to be read from the RoboHelp local project folder\!SSL!\Multiscreen_HTML5\desktop. All are working absolutely fine except when
    I login into the above-said application -> click on the Help page -> the index.htm opens with Contents, Index, Glossary -> Am able to successfully perform any task by respective clickings
    -> But I am not able to get back into my application when I click on the IE provided Back button (Alt+Left) -> Any amount of invoking Back button makes the system getting looped into this Start up page of index.htm only -> When I Close Tab (Ctrl + W) or Close ( X ) -> The window session gets closed and I have to repeat all by relogin once again.
    How can I get back into my application aftermath invoking Start up page of index.htm ?
    (I can always get back into the application easily by erasing those parts in the url which refers to this RoboHelp linkages – but this certainly looks non-polished work)
    Help Please
    Cheese – Vipin Nambiar, Bangalore

    Hey Jeff, I used Internet Explorer 10.0.9200 and Google Chrome 26.0.1410. Alas - it is the same behavior.
    (But Jeff : When I used Microsoft HTML Help as primary layout to generate chm file , My Help when launched from my Application opened in a new browser window and when I closed this Help browser window did not close my application. Looks like need to write few liner code to get this issue settled )
    Thanks Indeed of lots for your concerns Jeff !!!

  • How do I get signed into Icloud when it says my apple id is valid but not an icloud acct?

    How do I get signed into Icloud when it says my apple id is valid but not an icloud acct?

    You will have to sign in to I cloud on any of the iOS device with version 5 or above  once with your Apple Id to use your Apple Id as I cloud account. So if you have an iPhone iPad or iPod touch with iOS 5 or later.
    On your iOS device go to settings > I cloud and sign in and you should be able to use your Apple Id as an icloud Id.

  • When I try to sync my music on my iPhone 4 I have a tab at the top that says 'on this iPhone' The music in that tab is always on my phone but does not show in my itunes library.  How can I get it into my library?

    When I try to sync my music on my iPhone 4 I have a tab at the top that says 'on this iPhone'.  This is at the end of all the other tabs like info, ringtones, music etc. The music in that tab is always on my phone but does not show in my itunes library.  How can I get it into my library?  It doesn't sync either.

    The new iTunes has a somewhat different look from the previous version.  You can get the old look back if you prefer it by doing View > Show Sidebar in iTunes.  Or you can adapt to the new look.

  • HT1911 Someone else set up my itunes account for me and I cant remember the Apple ID, the Password, or the name he put under it all. How do I get back into my iTunes account???

    Someone else set up my iTunes account for me and I can't remember the Apple ID, the Password, or the name he put under it all. How do I get back into my iTunes account???? Or at least a number to call to get back???

    Go to Settings>Store>Apple ID, tap the ID shown, sign out, sign back in using the alternate ID.

  • I changed my Apple ID, now I can't login to iCloud because it still has my old Apple ID and the password no longer works to log me in. How can I get back into iCloud so that I can switch off Find my iPhone so I can make these changes? Thank you.

    I changed my Apple ID, now I can't login to iCloud because it still has my old Apple ID and the password no longer works to log me in. How can I get back into iCloud so that I can switch off Find my iPhone so I can make these changes? Thank you. (iPhone 4s)

    Well, you're gonna have to recover the password for that Apple ID:
    http://support.apple.com/kb/ht5787

  • How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them

    How can I get my books that I download from the Library that are WMA files into my I tunes so I can listen to them. They have a ton of books but I can only listen to them from my windows media player and I wouldlove to download to my I pod but I have tried everything I can think of it they won't go over.  Someone said all I had to do was copy them over and they would convert but I can't even get them to copy.  Thanks.

    Well it started happening AGAIN with my 2nd IPod. No matter what I did, it Itunes would NOT restore it!
    I finally installed Itunes on my hubby's PC at work and managed to get it restored there.
    Apparently, there must be some sort of compatibility issue with the windows version of Itunes and some other piece of software on my pc.
    And one more important thing! I had to follow the instructions in the other thread that talks about how to correctly uninstall itunes and quicktime, in order to completely eliminate ALL traces of my "first" ipod's existence so it wouldn't demand that I restore it.
    I think the software got "confused" and thought when I connected my 2nd ipod, that it was the 1st and that it still needed to be restored.
    Basically, this is just POORLY written and POORLY tested software!

  • HT1347 I have movies on my Hard drive that I would like to add to my iPad how do I get them into iTunes to download to my iPad question mark

    I have movies on my Hard drive that I would like to add to my iPad how do I get them into iTunes to download to my iPad?

    READ the article from which the question was posted.  Then follow the instructions for importing content to iTunes on the computer.
    Once the content is in iTunes, connect the device, select the content desired to sync, and sync.

  • I am new to IPhoto 9.5  and I think I missed a step. I uploaded pictures but they do not appear as an event in my library.  They are in Last imported only. How can I get them into event.

    I am new to IPhoto 9.51  and I think I missed a step when I uploaded my vacation pictures. I uploaded pictures but did not import them into the library.  They are in L\last imported only.  How can I get them into events?

    If the Photos are under 'Last Import' or 'Last N Months' then they are in the Library somewhere, just not where you are expecting them to be. We know this as both Last Import and 'Last N Months' are not places, just listings of elements in the the Library.
    The two most common reasons that they can't be found is either an incorrect date on the camera or the Sorting (View Menu -> Sort Photos - or Sort Events, as appropriate) has changed.
    Quick route to find them: Right-click on one of the images in Last Import and select 'Show Event'. This will bring you to the image in the Library.

  • I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    I am a CC subscriber and trying to update lr5.7 and I am told to got to my CC folder and click on install. The problem is, LR is not in my file. I guess I have been using my original lr that I bought years ago. What now? How do i get lr into the CC file?

    Gary116 please remove and reinstall Lightroom by following the steps listed in CC desktop lists applications as "Up to Date" when not installed.  The version of Photoshop Lightroom available through the Creative Cloud Desktop application supports your Creative Cloud Membership.

  • How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?

    How do you get your tunes and voice recordings from your iPod Touch into iTunes on a new computer if you don't have Mobile Me?
    iTunes on tmy new computer shows none of my data and I fear if I sync my iPod with the computer all will be deleted on the iPod.
    I still have everything in iTunes on the old computer.

    Just move your iTunes library to you new computer.  You can transfer iTunes purchases to you new computer from your iPod by:
    iTunes Store: Transferring purchases from your iPhone, iPad, or iPod to a computer
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/HT1848Make sure you also move the backup.  You an find where the the backup is located here:
    iPhone and iPod touch: About backups
    You can move other items by:
    Best iPod to PC
    After you move you stuff to the new computer, restore the iPod from backup.

  • How can you get back into your iPhone if you don't remember the passoword?, How can you get back into your iPhone if you don't remember the password?

    Help!   My daughter changed the password on her iPhone and she can't remember it.  How can she get back into it.  Restoring is not an option so I'm hopeful there is another way.   Thanks!

    Hey KimmyP123,
    Thanks for the question. I understand your daughter has an unknown passcode on her iPhone. The following article provides a few solutions for this situation:
    iOS: Forgotten passcode or device disabled after entering wrong passcode
    http://support.apple.com/kb/HT1212
    I notice you are looking for solutions other than restoring, the article does outline how you can use iCloud's Find My iPhone:
    If you have Find My iPhone enabled, you can use Remote Wipe to erase the contents of your device. If you have been using iCloud to back up, you may be able to restore the most recent backup to reset the passcode after the device has been erased.
    Thanks,
    Matt M.

  • HT4236 how do i get back into my ipod if i forgot the password

    how do i get back into my ipod if i forgot the password

    If you have a passcode to the screen lock that you've forgotten, restore the iPod from the computer to which the iPod is synced. For information and instructions, see:
    http://support.apple.com/kb/ht1212
    If that will not work, you'll need to put the iPod into Recovery Mode and then try the Restore again:
    http://support.apple.com/kb/ht1808
    If that still doesn't work, as a last resort try DFU mode:
    http://www.iclarified.com/entry/index.php?enid=1034
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

Maybe you are looking for