How to get point ordinates in oracle spatial with oo4o and VC++

Hi,
I need some help baddly.Would someone help me?
Now I need to get the point ordinates in a table called cities.I use oo4o C++ class library and VC++ 6.0 . In the table, the column name of SDO_GEOMETRY object
type is "goem". For the reason that the table is created for a point layer, all the point ordinates are stored in the SDO_POINT.
I read the ordinates in my program as below. But every time the final result of x,y,z are all be 0.000000000 . Although I checked it many times, I still couldn't found why.
So could some experts tell me the reason or show me how to do that?
Thanks in advanced.
ODatabase odb("", "scott", "tiger");
ODynaset odyn(odb, "SELECT * FROM CITIES");
if (odyn.IsOpen())
odyn.MoveFirst();
OObject geometry;
oresult ores = odyn.GetFieldValue("geom", &geometry);
if(ores==OCSUCCESS)
OObject sdopoint;
const char* attrname3=geometry.GetAttrName(3);
     geometry.GetAttrValue(attrname3, &sdopoint);
     const char* ittypename=sdopoint.GetTypeName();     
     int itnumber=sdopoint.GetCount();
     int attrtype=sdopoint.GetAttrType(1);
     const char* attrnameX=sdopoint.GetAttrName(1);
const char* attrnameY=sdopoint.GetAttrName(2);
     const char* attrnameZ=sdopoint.GetAttrName(3);
     double *x;
     double *y;
     double *z;
     sdopoint.GetAttrValue(attrnameX,x);
     sdopoint.GetAttrValue(attrnameY,y);
     sdopoint.GetAttrValue(attrnameZ,z);
}

Yes. I have tried your code and got the same result.
And I also tried to use SQL to get the result.But it
also failed.
I am intrested in this problem too.
Could some oo4o experts help me too?
jeff

Similar Messages

  • How to get connectivity between Personal Oracle 8.0.0.3 & Developer 2000 (Any Version

    Can anybody tell me how to get connectivity between Personal Oracle 8.0.3 and Developer 2000 Rel 2.1 in Win 98 Environment.
    I am able to install either Oracle 8 or Developer 2000 but not both, even if I use different Oracle Homes.
    When I posted the same question to www.xperts.com someone wrote to me saying that a patch has to be used to get the connectivity.
    I have been trying to solve the problem for last 6 months, but could not do it.
    Can you please tell me how to get the connectivity or atleast tell me which version will facilitate connectivity in a stand alone PC.
    Thanks and regards,
    Ashok
    null

    For Windows98. Worked for me, but no guarantee it will solve your problem.
    1) Install Dev2K.
    2) Install PO8i in a separate Oracle home.
    3) Use the following for TNSNAMES.ORA in your DEV2K Home:
    # C:\ORAWINKS\NETWORK\ADMIN\TNSNAMES.ORA Configuration File:C:\orawinKS\NETWORK\ADMIN\tnsnames.ora
    # Generated by Oracle Net8 Assistant
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    MYORCL =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = ORCL)
    null

  • Getting point ordinates using sdo_intersection

    I have two crossing lines. I try to get point of crossing using spatial function SDO_INTERSECTION. I got it, but ordinates was null.
    I don't know why.
    geom_edge1 := MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(-654713,-1021390,-767748,-1011681));
    geom_edge2 := MDSYS.SDO_GEOMETRY(2002,NULL,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(-727527,-983943,-730301,-1083802));
    select MDSYS.SDO_GEOM.SDO_INTERSECTION(geom_edge1, geom_edge2, 0.005) into geom_intersection from dual;
    X := geom_intersection.SDO_POINT.X;
    Y := geom_intersection.SDO_POINT.Y;
    I have oracle version 9.2.0.6.
    Thank you for replay.

    I already found solution - for geometry of intersection I must ask for SDO_ORDINATES, not SDO_POINT.

  • How to get the most current file based on date and time stamp using SSIS?

    Hello,
    Let us assume that files get copied in a specific directory. We need to pick up a file and load data. Can you guys let me know how to get the most current file based on date and time stamp using SSIS?
    Thanks
    thx regards dinesh vv

    hi simon
    i excuted this script it is giving error..
       Microsoft SQL Server Integration Services Script Task
       Write scripts using Microsoft Visual C# 2008.
       The ScriptMain is the entry point class of the script.
    using System;
    using System.Data;
    using Microsoft.SqlServer.Dts.Runtime;
    using System.Windows.Forms;
    namespace ST_9a6d985a04b249c2addd766b58fee890.csproj
        [System.AddIn.AddIn("ScriptMain", Version = "1.0", Publisher = "", Description = "")]
        public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
            #region VSTA generated code
            enum ScriptResults
                Success = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Success,
                Failure = Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure
            #endregion
            The execution engine calls this method when the task executes.
            To access the object model, use the Dts property. Connections, variables, events,
            and logging features are available as members of the Dts property as shown in the following examples.
            To reference a variable, call Dts.Variables["MyCaseSensitiveVariableName"].Value;
            To post a log entry, call Dts.Log("This is my log text", 999, null);
            To fire an event, call Dts.Events.FireInformation(99, "test", "hit the help message", "", 0, true);
            To use the connections collection use something like the following:
            ConnectionManager cm = Dts.Connections.Add("OLEDB");
            cm.ConnectionString = "Data Source=localhost;Initial Catalog=AdventureWorks;Provider=SQLNCLI10;Integrated Security=SSPI;Auto Translate=False;";
            Before returning from this method, set the value of Dts.TaskResult to indicate success or failure.
            To open Help, press F1.
            public void Main()
                string file = Dts.Variables["User::FolderName"].Value.ToString();
                string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::FolderName"].Value.ToString());
                System.IO.FileInfo finf;
                DateTime currentDate = new DateTime();
                string lastFile = string.Empty;
                foreach (string f in files)
                    finf = new System.IO.FileInfo(f);
                    if (finf.CreationTime >= currentDate)
                        currentDate = finf.CreationTime;
                        lastFile = f;
                Dts.Variables["User::LastFile"].Value = lastFile;
                Dts.TaskResult = (int)ScriptResults.Success;
    thx regards dinesh vv

  • How can I point the premiere to a blank folder and bring only the files needed for the project

    When I start premiere it loads all files from all my photo/video libraries (app 150 gb almost 20,000 photo).  I do not want to sort thru all these files for a project.  How can I point premiere Elements to a blank folder and get the appropriate media for a project as I
    need them.

    As Steve points out, there are really three programs in the Premiere and Photoshop Elements "suite," PrE, PSE and then Organizer, which links between the two, and is an Asset cataloging program. Because of the commonality of the GUI (Graphic User Interface), there can be confusion as to exactly which program one is in.
    If you launch just PrE, and not Organizer (can be launched from within either PrE, or PSE), the only Assets/media that you will see is that, which you have Imported into your Project.
    Also, having the Assets for a Project, in a separate folder, or folder structure, is a great way to set up the Project. This article goes into details on one set up method: http://forums.adobe.com/message/4491450#4491450
    Good luck, and hope that helps,
    Hunt

  • How to get length of data on column with long datatype

    How to get length of data on column with long datatype without using pl/sql block

    ...another reason not to use LONG datatype for columns.
    Oracle advises to switch to LOB columns instead
    SQL> create table t
      2  (x long)
      3  /
    Table created.
    SQL> insert into t values (rpad ('x', 10000, 'x'))
      2  /
    1 row created.
    SQL> alter table t
      2  modify x clob
      3  /
    Table altered.
    SQL> desc t
    Name                                      Null?    Type
    X                                                  CLOB

  • How to get the PO no in the smart form and in the print program from ME23N

    hello all,
                     I am new to smart form printing.I want to make a smartform along with print program that will show PO Details.It has to be created as an o/p type in ME23N. I have created an o/p type ZPO using NACE ..Can some one tell me how to get the PO number in the smart form and in the print program  from ME23N ,so that I can then program the necessary calculations?plz help me with the code.Thanks in advance.
    Subhabrata.

    Hello Everyone,
    I am new to the forum and also to abap.
    Excuse me if it is a basic question.
    I am taking care of the output types.
    This is 1st time SAP will be implemented .
    For purchase order , I go to NACE ---EF----NEU---Processing routines
    print output---SAPFM06P---ENTRY_NEU----MEDRUCK
    FAX-----------SAPFM06P---ENTRY_NEU----MEDRUCK
    EDI------------RANASTED--EDI_PROCESSING
    DISTRIBUTION(ALE)---RANASTED---ALE_PROCESSING
    Are the above settings fine ?
    What are the standard programs for the PO outputs . I am looking for the smartforms and the driver program .
    I searched and found that IN ECC 6 , we have to install OSS notes .
    Gurus, please help  me . Let me know what all oss notes be implemented and how to proceed from here .
    Any help will be greatly appreciated ,
    Monalisa

  • How to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    how to get reading list in my all my devices and computer (window 7). i have installed ios 6 on iphone and icloud control panel on both PC's (home and office) but i dont get updated reading list on all my devices.

    Hi bluegrandpanash,
    Thanks for visiting Apple Support Communities.
    If you backed up your iPhone to iCloud before updating the software, first try the steps under "Restore from an iCloud backup" in this article to recover your data:
    iOS: Back up and restore your iOS device with iCloud or iTunes
    http://support.apple.com/kb/HT1766
    Best Regards,
    Jeremy

  • How to get rid of the blue underline with green arrows on words and then a pop-up ad appears.

    How to get rid of the blue underline with green arrows on words and then a pop-up ad appears.

    Click here and follow the instructions, or if they don't cover the type of adware on the computer, these ones. If you're willing to use a tool to remove it(you don't need to, but may find it easier), you can instead run Adware Medic; this link is a direct download.
    (119795)

  • How to get the current logged in username from windows and put it into an AS var

    Hello,
    I was hopeing someone would know how to get the current logged in username from windows and put it into a var, so I can create a dynamic text box to display it.
    Thanks in advance
    Michael

    Just for everyone’s info, this is the script I have used to get the logged in windows username into flash ---- not and air app.
    In the html page that publishes with the .swf file under the <head> section:-
    <script language="JavaScript" type="text/javascript">
    function findUserName() {
         var wshell=new ActiveXObject ("wscript.shell");
         var username=wshell.ExpandEnvironmentStrings("%username%");
         return username;
    </script>
    The ActionScript:-
    import flash.external.ExternalInterface;
    var username:String = ExternalInterface.call ("findUserName");
    trace (username); // a quick test to see it in output

  • How to get my images always order by file name, and not by time of captur, in all the folders in the library?

    How to get my images always order by arquive name, and not by time of captur, in all the folders in the library?
    Sorry for the poor english, but im portugues.
    In the library we can change the order of classification of image by, time of capture, name of file etc... I'm wondering if its possible define to be always by the name of file.
    It ´s possible?
    And i have other question, in print label we have an option to auto rotate to feet in page to have the image using the maximum area in the page (auto rotate, zoom etc), its possible to change the orientation of the rotation to be always in  the other direction?

    The Muvos are USB Mass Storage devices and do not have the ability to display track information based upon ID3 tags.
    The Zens all read and display track info based upon ID3 tag information that is either gathered from an online source or entered by the end-user.
    If you want the track information displayed instead of the ID3 tag information, you could edit the ID3 tags and rename the title to whatever you have as the file name. Not sure why your file names would differ so much from the ID3 tag info though, almost all of my content has the same name for the filename as it does on the ID3 tag title.

  • How to get all images in indesign CS5 with javascript?

    Hi,everybody,
    How to get all images in indesign CS5 with javascript?I want to delete them.
    Anyone can give me some example codes?
    Thanks,
    Bridge

    Hey!
    This will remove all images from your InDesign document:
    var myLinks = app.activeDocument.links.everyItem().parent;
    for(var i = 0; i < myLinks.length; i++)
        myLinks[i].remove();
    Hope that helps.
    tomaxxi
    http://indisnip.wordpress.com/
    http://inditip.wordpress.com/

  • How to get the stock of STO Report with suppling Plant/receiving Plant/open

    How to get the stock of STO Report with suppling Plant/receiving Plant/open/close qty.

    MB5T gives you Details of STO which have stok in transit.
    ME2W gives you supplying plant wise STO details.  Also in ME2W , in the ALV report output, if you select  the "delivery Schedule line" icon , you will get details such as , STO qty, Issued qty , undelivered qty etc.

  • I accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    i accidentally deleted my iMovie off my mac, anyone know how to get it back because it came for free and is now 15 dollars to buy back??? pls help

    If you mean you accidentally removed the icon for iMovie from the Dock (the array of icons at the bottom of the window), you can add it back easily.
    Open the Applications folder (if you open it from the Dock you may then need to click the Open in Finder icon), locate the iMovie program.
    Drag the icon for iMovie down to the Dock, somewhere between the icon for Finder and the dashed line toward the right.
    Wait for the icons at that spot to move aside, then drop it in.

  • How to get the iPhone 5c to pair with my mac book pro and my ue speaker

    How to get the iphone 5c to pair with my mac book pro and my ue speaker

    TerryReynar wrote:
    How to get the iphone 5c to pair with my mac book pro
    You don't. It only sync using iTunes.
    It doesn't "pair".
    and my ue speaker
    What is "ue speaker"?
    Ultimate Ears wirless bluetooth speaker?
    Set speaker to Pairing mode.
    On the iPhone, Settings > BlueTooth.
    Select the speaker.

Maybe you are looking for

  • Image Processing in Bridge lost PSD originals HELP!

    I am somewhat new to using Adobe Bridge CS4 super frequently, I have been processing batches of images mostly using the 'Image Process' function under tools>photoshop>image processing. I was using it to watermark my photos and size them down. It work

  • How do I install 9iAs on 9i DB?

    Hi, I have installed oracle 9i Database Re 1(9.0.1), and Oracle 9iDs Re 2 (9.0.2) on Windows/2000. Now I want to install Oracle 9iAs Re 1 (1.0.2.2.0), but I got Error message for depedencies :"Not all dependencies for the component Oracle Enterprise

  • I Pod Update Problems

    This message appears when I try to update my I Pod. The software works for playing music from my library, but my I Pod can't sync with the new updates. There is a Problem downloading the I Pod software for the I Pod "Phil's I Pod". An unknown error o

  • My computer detects my ipod as a unknow device

    this is the message my computer says when i plug my ipod in " one of the usb devices attached to this computer has malfunctioned, and windows does not recognize it. for assistance in solving this problem click this message" when i click on it the usb

  • Optional operations on extended data type

    Hello everyone, I am currently working on a project where I have to read data from either a database or a file and depending on how much information is available different statistics will be computed. Currently I have two data types MyRecord and Exte