Oracle Spatial Object types in Designer 6

Hi all,
I'm trying to design a database that uses the new Oracle Spatial Object types (MDSYS.SDO_GEOMETRY) etc. I have been able to capture the object types from Oracle8i but when i try to save the design in the repository it fails. I am assuming that the version of Oracle Designer I am using does not support MDSYS.SDO_GEOMETRY. Is this correct and if so what version of Designer should I be using?
Martin

Hi Saso,
I'm sorry I don't have any help for you but maybe yo can answer a question for me relating to sdo_geometry. I'm trying to capture a database schema which contains tables with sdo_geometry columns & this fails because I don't have that object defined.
So how do I access the Oracle Object Types branch to define MDSYS.SDO_GEOMETRY? Is it in the object navigator or designer?
Thanks,
Jim Greetham

Similar Messages

  • Accessing Oracle spatial objects (SDO_GEOMETRY) through ODBC/OLEDB

    Hello.
    I tried googling and reading through these forums and Oracle documentation, but I'm still uncertain on this question:
    Are Oracle spatial objects (of type SDO_GEOMETRY) accessible through ODBC and/or OLE DB drivers? Can I retrieve them with SELECT clause? Can I write them to database?
    I'm limited to these options because I'm developing Delphi application based on ADO and it must work with different DB servers. However I certainly don't want to implement different ways of accessing database for each server.
    If geometry objects aren't suported by ODBC/OLEDB, is there any way to convert SDO_GEOMETRY to (and from) BLOB or string or whatever, so I can read and write them like a normal data field?
    Thanks in advance.
    Edited by: user13816863 on 25.01.2011 20:35
    Edited by: user13816863 on 25.01.2011 21:57

    The SDO_UTIL package has lots of options to help output spatial data to other formats, and you may be able to use some of them to help.
    Some that come to mind are:
    SDO_UTIL.TO_WKTGEOMETRY
    SDO_UTIL.TO_GMLGEOMETRY
    SDO_UTIL.TO_KMLGEOMETRY
    This is covered in chapter 32 of the Oracle® Spatial Developer's Guide 11g Release 2 (11.2).

  • Oracle Spatial Object

    I have more than 2 geographical points In USA saved in oracle DB using geometry object...
    are there any function in Oracle Spatial Object that gives me the shortest route to go through all theses geographical points

    You would need to create a network with all of your point geometries as nodes and lines as links.  See...
    Oracle® Spatial Topology and Network Data Models Developer's Guide
    11g Release 2 (11.2) Part II
    Once you do that you can use it to solve your problem (traveling salesman).

  • Oracle table object type - Error

    Hi,
    I have created an oracle object as like
    [CREATE OR REPLACE TYPE t_test_obj IS OBJECT (
       testid      INTEGER,
       testdesc    VARCHAR2(64)
    Then created the type table from above
    [ create or replace type t_table as table of t_test_obj;]
    i want to create the table containing the above type like below
    create table t_tab_test (test1 t_table); but i received the error as like
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or attribute
    Requirement: As one my function returns this table type object and i want to insert those values in a table hence i want this. Any other pointers are also helpful.
    Please help.
    Regards,
    Kapil

    Thanks for reply.
    As i described in Requirement, my function return the table type, hence if i try to insert i get error as below. t_table is the return type from function. I need conversion from table type to object type.
    SQL> insert into testing values(1,t_table(1,'a'));
    insert into testing values(1,t_table(1,'a'))
    ERROR at line 1:
    ORA-00932: inconsistent datatypes: expected IRP_DBO.T_TEST_OBJ got IRP_DBO.T_TABLE

  • Oracle 9i Object Type ..using self

    I have created and object with
    several attributes of standard oracle datatypes. I have one that is of a custom object type. this object provides encapsulated functionality. I instansiate the internal custom object using a constructor function. the constructor includes the creation of a primary key. once the constructor is done, the object is initialized( an internal flag is set, which should only be done once)
    To use this custom object in a member method, I have to do something like this..
    ( i have summarized code for brevity)
    MEMBER FUNCTION foo( ) return obj
    is
    l_self PARENT_OBJ_TYPE:= SELF;
    local INTERNAL_OBJ :=SELF.internal_obj;
    begin
    local.method1() -- insert record( flag is true)
    local.method1() --insert another record( but this time the flag that was set upon construction is now set to FALSE..
    I get an error.)
    end;
    I do not do anything tricky. the behavior seems to be that object types do not keep state appropriately.
    any ideas of why this could be happening?

    there was no real error code just unexpected behavior. it did not crash. I figured it out. it had to do with passing self as a parameter in out so that it keeps state

  • Trying to pass Oracle array/object type to Java

    I have a Java class with two inner classes that are loaded into Oracle:
    public class PDFJ
        public static class TextObject
            public String font_name;
            public int font_size;
            public String font_style;
            public String text_string;
        public static class ColumnObject
            public int left_pos;
            public int right_pos;
            public int top_pos;
            public int bottom_pos;
            public int leading;
            public TextObject[] column_texts;
    }I have object types in Oracle as such that bind to the Java classes:
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT" AS OBJECT
    EXTERNAL NAME 'PDFJ$TextObject'
    LANGUAGE JAVA
    USING SQLData(
      "FONT_NAME" VARCHAR2(25) EXTERNAL NAME 'font_name',
      "FONT_SIZE" NUMBER EXTERNAL NAME 'font_size',
      "FONT_STYLE" VARCHAR2(1) EXTERNAL NAME 'font_style',
      "TEXT_STRING" VARCHAR2(4000) EXTERNAL NAME 'text_string'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_TEXT_ARRAY" AS
      TABLE OF "PROGRAMMER"."PDFJ_TEXT";
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN" AS OBJECT
    EXTERNAL NAME 'PDFJ$ColumnObject'
    LANGUAGE JAVA
    USING SQLData(
      "LEFT_POS" NUMBER EXTERNAL NAME 'left_pos',
      "RIGHT_POS" NUMBER EXTERNAL NAME 'right_pos',
      "TOP_POS" NUMBER EXTERNAL NAME 'top_pos',
      "BOTTOM_POS" NUMBER EXTERNAL NAME 'bottom_pos',
      "LEADING" NUMBER EXTERNAL NAME 'leading',
      "COLUMN_TEXTS" "PROGRAMMER"."PDFJ_TEXT_ARRAY" EXTERNAL NAME 'column_texts'
    CREATE OR REPLACE TYPE "PROGRAMMER"."PDFJ_COLUMN_ARRAY" AS
        TABLE OF "PROGRAMMER"."PDFJ_COLUMN";
    /I successfully (as far as I know) build a PDFJ_COLUMN_ARRAY object in a PL/SQL procedure. The PDFJ_COLUMN_ARRAY contains PDFJ_COLUMN objects; each of those objects contains a PDFJ_TEXT_ARRAY of PDFJ_TEXT objects (Example: pdf_column_array(i).pdf_text_array(i).text_string := 'something';). In this procedure, I pass this PDFJ_COLUMN_ARRAY as a parameter to a Java function. I assume the Java function parameter is supposed to be a oracle.sql.ARRAY object.
    I cannot figure out how to decompose this generic ARRAY object into a ColumnObject[] array. I also tried Googling and searching the forums, but I can't figure out matching search criteria. I was wondering if anyone here knows anything about passing user-defined Oracle type objects to a Java function and retrieving the user-defined Java class equivalents that they are supposedly mapped to--especially a user-defined array type of user-defined object types containing another user-defined array type of user-defined object types.

    Ok. I will try asking on the JDBC forum. So, don't
    flame me for cross-posting. :PWe won't, if over there you just post basically a
    link to this one.
    sigh Guess what, he did it the flame-deserving way. It's crossposted at:
    http://forum.java.sun.com/thread.jspa?threadID=602805
    <flame level="mild">Never ceases to amaze me how people don't think that posting a duplicate rather than a simple link isn't wasteful, as people could end up answering in both of them, not seeing each other's answers</flame>

  • INVALID Oracle Spatial objects

    Hi,
    Me also facing same issue after upgrading the database from 11g R1 to 11g R2. can you please tell how to enable the spacial from invalid to valid .
    Regards,
    Ram

    Pl post details of OS version. Were these objects invalid in the source database ? What options have been enabled in 11gR1 and 11gR2 ?
    How To Validate Oracle Spatial in the DBA_REGISTRY (Doc ID 1100898.1)
    How To Diagnose Components With NON VALID Status In DBA_REGISTRY After an Upgrade (Doc ID 753041.1)
    HTH
    Srini

  • Mapping spatial object type

    I need to map a table with a spatial column of type MDSYS.SDO_GEOMETRY using TopLink. This type is defined as:
    CREATE TYPE SDO_GEOMETRY AS OBJECT (
    SDO_GTYPE NUMBER,
    SDO_SRID NUMBER,
    SDO_POINT SDO_POINT_TYPE,
    SDO_ELEM_INFO MDSYS.SDO_ELEM_INFO_ARRAY,
    SDO_ORDINATES MDSYS.SDO_ORDINATE_ARRAY
    Has anyone done this before, or can someone tell me how to do this? Do I need to use ConversionManager or Structure Mapping or something else?

    Can I conclude from the lack of replies that this is rather complicated?

  • Designer and SDO_GEOMETRY object type

    I want to have tables with columns of object type MDSYS.SDO_GEOMETRY (Oracle Spatial's type) in Designer 9i and then generate these tables.
    So I created in Oracle Object Types branch object type called MDSYS.SDO_GEOMETRY without attributes, methods or source table.
    Then I created in Designer table with column named GEOMETRY which has Datatype property empty and Oracle Type property of value MDSYS.SDO_GEOMETRY.
    But when I generate this table I get these two messages:
    CDS-11349 Warning: The Oracle Object Type MDSYS.SDO_GEOMETRY cannot be generated.
    CDS-18025 Error: Table 'PRK_PRIMER_GEO_SDO' will not be created as Oracle Object Type 'MDSYS.SDO_GEOMETRY' is not created
    Object type MDSYS.SDO_GEOMETRY already exists in database for sure.
    What is wrong here?
    Regards
    Saso Celarc

    I think, Designer cannot handle SDO_GEOMETRY type.
    Workaround: use a other datatype/size not used in your schema ( such as varchar2(99) ), generate scripts and do a text substitution on them to SDO_GEOMETRY.

  • Java Visualizer for Oracle 8i Object model

    I have used the java visualizer demo version that is within Ora8iR2 but it cant work with oracle spatial object model I think this version is designed for the relational model.
    Where I can find a object model oracle spatial visualizer??
    Where I can find any oraclevector2image (jpeg or gif) traslator?
    Anybody knows whats the procedure for geolocate the address field of any other table in the database?
    null

    This is a duplicate question. Answers are in the other posting. Thanks.
    Dan

  • Oracle Spatial datatype problems - HELP!!

    Can anyone help with this problem. I am using Pro*C/C++ to create a DLL which I am then
    linking to another C based application. I am attempting to use Pro*C/C++ to read/write
    Oracle Spatial Objects. I have no problem writing Pro*C/C++ code or accessing the
    functions in the DLL. My problem is returning values from the DLL functions to my
    application. So far the only values I seem able to return are character strings.
    Below are two versions of the same function. One that returns a char string and a second
    that returns nothing. I would like the second function to work and to return an integer
    value for "g_type". Any ideas??? By the way "g_type" is the return value in question. I am
    using Oracle Pro*C/C++ 8.1.5 and the V8 Oracle Call Interface for the datatype conversion.
    Header files for the Object types have been generated by the Object Type Translator.
    THIS FUNCTION WORKS AS EXPECTED. THE PARAMETER G_TYPE RETURNS THE ANTICIPATED STRING VALUE
    int Read_Geometry
    int gid,
    char *g_type,
    char *errMsg
    char err_msg[128];
    sword retcode;
    int tester;
    size_t buf_len, msg_len;
    SDO_GEOMETRY geom = (SDO_GEOMETRY )0;
    SDO_GEOMETRY_ind geom_ind = (SDO_GEOMETRY_ind )0;
    exec sql at db_name allocate :geom:geom_ind;
    exec sql at db_name select geometry into :geom:geom_ind from test81 where gid=:gid;
    if (SQLCODE !=0)
    exec sql whenever sqlerror continue;
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    strcpy(errMsg,err_msg);
    return ERROR;
    else
    retcode = OCINumberToInt(err,&geom->sdo_gtype, sizeof(g_type), OCI_NUMBER_SIGNED,&tester);
    if (retcode == OCI_ERROR)
    sprintf(errMsg,"Convert failed");
    return ERROR;
    else
    sprintf(g_type,"%d", tester);
    sprintf(errMsg,"gType=%s",g_type);
    return SUCCESS;
    return SUCCESS;
    THIS FUNCTION DOES NOT WORK. THE FUNCTION EXECUTES BUT THE PARAMETER G_TYPE RETURNS NOTHING?????????
    int Read_Geometry
    int gid,
    int g_type,
    char *errMsg
    char err_msg[128];
    sword retcode;
    size_t buf_len, msg_len;
    SDO_GEOMETRY geom = (SDO_GEOMETRY )0;
    SDO_GEOMETRY_ind geom_ind = (SDO_GEOMETRY_ind )0;
    exec sql at db_name allocate :geom:geom_ind;
    exec sql at db_name select geometry into :geom:geom_ind from test81 where gid=:gid;
    if (SQLCODE !=0)
    exec sql whenever sqlerror continue;
    buf_len = sizeof (err_msg);
    sqlglm(err_msg, &buf_len, &msg_len);
    strcpy(errMsg,err_msg);
    return ERROR;
    else
    retcode = OCINumberToInt(err,&geom->sdo_gtype, sizeof(g_type), OCI_NUMBER_SIGNED,&g_type);
    if (retcode == OCI_ERROR)
    sprintf(errMsg,"Convert failed");
    return ERROR;
    else
    return SUCCESS;
    return SUCCESS;
    Header file is as follows
    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;

    Hi,
    From a quick look I can't see anything wrong. You might want to compare this with the example in $ORACLE_HOME/md/demo/examples.
    Also, note that in 9i there will probably be an occi (C++ OCI) available, should this be useful to you.

  • Converting Spatial Objects to strings

    Hi,
    Many tools (SQL*Plus, DBVisualizer, various Python modules) seem to be able to retrieve spatial objects as strings. Is this conversion being done by each tool, or does the database know how to convert objects (at least Oracle Spatial objects) to strings?
    Is there any way to get string as the result of a query of an Oracle Spatial object with Pro*C or the other precompilers?
    Thanks for any information,
    -- Andrew Bell
    [email protected]

    Andrew
    Is your question about decoding the struct returned in an OCI, Pro*C, or SQLJ program to get at the fields of an sdo_geometry type?
    There are oci examples (readgeom.c, writegeom.c) on OTN.
    Jayant

  • Oracle Spatial system requirements

    Hi Experts,
    I have a 32bit window 2003 server with 8G memory (PAE added to *g from 2G) with 4 CPU.
    we use oracle 10GR4 suppour in stream.
    Based on application, I need to install Oracle Spatial ( Actually, I can saw Oracle Spatial object in sysaux tablespace).
    I could not find how many system resource requirement to support Oracle Spatial future.
    ALso How to check Oracle Spatial is installed into system?
    Thanks for HELP!!
    JIM

    You can see what kind of options you have with:
    select * from dba_registry;
    Do you really need Oracle Spatial or just the free subset Oracle Locator?

  • Plsql object type polymorphism

    Hi everyone.
    Is adhoc polymorphism possible in pl/sql using Oracle's object types? Here is some sample code that I tried on an Oracle 10.2.0.3 64-bit database running on Solaris.
    Connected.
    09:58:58 SQL> create type root_ty as object (
    09:59:03   2    a1     varchar2(32 char)
    09:59:03   3  ) not final
    09:59:03   4  /
    Type created.
    Elapsed: 00:00:00.17
    09:59:05 SQL> create type sub_ty under root_ty (
    09:59:10   2    a2     varchar2(32 char)
    09:59:10   3  , constructor function sub_ty(str in varchar2) return self as resul
    09:59:10   4  , member procedure display_a2
    09:59:10   5  ) final
    09:59:10   6  /
    Type created.
    Elapsed: 00:00:00.06
    09:59:12 SQL> create or replace type body sub_ty is
    09:59:18   2    constructor function sub_ty(str in varchar2)
    09:59:18   3      return self as result
    09:59:18   4    is
    09:59:18   5    begin
    09:59:18   6      self.a2 := str;
    09:59:18   7     
    09:59:18   8      return;
    09:59:18   9    end;
    09:59:18  10   
    09:59:18  11    member procedure display_a2
    09:59:18  12    is
    09:59:18  13    begin
    09:59:18  14      dbms_output.put_line('a2 value is .... '||a2);
    09:59:18  15    end;
    09:59:18  16  end;
    09:59:18  17  /
    Type body created.
    Elapsed: 00:00:00.04
    09:59:20 SQL> set serveroutput on
    10:00:31 SQL> declare
    10:00:35   2    l_ty    root_ty;
    10:00:35   3  begin
    10:00:35   4    l_ty := new sub_ty('Woot!');
    10:00:35   5   
    10:00:35   6    l_ty.display_a2();
    10:00:35   7  end;
    10:00:35   8  /
      l_ty.display_a2();
    ERROR at line 6:
    ORA-06550: line 6, column 8:
    PLS-00302: component 'DISPLAY_A2' must be declared
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    Elapsed: 00:00:00.06
    10:00:37 SQL> declare
    10:00:53   2    l_ty    root_ty;
    10:00:53   3  begin
    10:00:53   4    l_ty := new sub_ty('Woot!');
    10:00:53   5   
    10:00:53   6  --  l_ty.display_a2();
    10:00:53   7  end;
    10:00:53   8  /
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.01
    10:00:53 SQL> declare
    10:01:30   2    l_ty    sub_ty;
    10:01:30   3  begin
    10:01:30   4    l_ty := new sub_ty('Woot!');
    10:01:30   5   
    10:01:30   6    l_ty.display_a2();
    10:01:30   7  end;
    10:01:30   8  /
    a2 value is .... Woot!
    PL/SQL procedure successfully completed.Certainly seems like this should be possible ... Am I missing something simple?
    Thanks for any input.
    - KR

    Here is an example of what polymorphism is supposed to do:
    SQL> create type bird as object
      2  (name varchar2 (30)
      3  , member function fly return varchar2
      4  , member function make_a_noise return varchar2)
      5  not final
      6  /
    Type created.
    SQL>
    SQL> create type birds_nt as table of bird;
      2  /
    Type created.
    SQL>
    SQL>
    SQL> create or replace type body bird as
      2
      3      member function fly return varchar2
      4      is
      5      begin
      6          return 'my name is '||self.name;
      7      end;
      8
      9      member function make_a_noise return varchar2
    10      is
    11      begin
    12          return 'generic twitter';
    13      end;
    14
    15  end;
    16  /
    Type body created.
    SQL>
    SQL>
    SQL> create type duck under bird (
      2  overriding member function make_a_noise return varchar2
      3  , member procedure waddle
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type body duck as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'quack!';
      8      end;
      9
    10      member procedure waddle
    11      is
    12      begin
    13          null;
    14      end;
    15
    16
    17  end;
    18  /
    Type body created.
    SQL>
    SQL>
    SQL>
    SQL> create type chicken under bird (
      2  overriding member function make_a_noise return varchar2
      3  , member procedure peck
      4  )
      5  not final;
      6  /
    Type created.
    SQL>
    SQL> create or replace type body chicken as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'cluck!';
      8      end;
      9
    10      member procedure peck
    11      is
    12      begin
    13          null;
    14      end;
    15
    16
    17  end;
    18  /
    Type body created.
    SQL>
    SQL> create type canary under bird (
      2  overriding member function make_a_noise return varchar2
      3  );
      4  /
    Type created.
    SQL>
    SQL> create or replace type body canary as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'I taught I taw a puddy tat!!!';
      8      end;
      9
    10
    11  end;
    12  /
    Type body created.
    SQL>
    SQL> create type rooster  under chicken (
      2  overriding member function make_a_noise return varchar2
      3  )
      4  ;
      5  /
    Type created.
    SQL>
    SQL> create or replace type body rooster as
      2
      3
      4      overriding member function make_a_noise return varchar2
      5      is
      6      begin
      7          return 'That''s a joke... I say, that''s a joke, son.';
      8      end;
      9
    10
    11  end;
    12  /
    Type body created.
    SQL>
    SQL>
    SQL>
    SQL>
    SQL> declare
      2      my_aviary birds_nt := birds_nt();
      3  begin
      4      my_aviary.extend(5);
      5      my_aviary(1) := duck('Donald');
      6      my_aviary(2) := chicken('Chicken Little');
      7      my_aviary(3) := canary('Tweetie Pie');
      8      my_aviary(4) := rooster('Foghorn Leghorn');
      9      my_aviary(5) := bird('?');
    10      for idx in my_aviary.first()..my_aviary.last()
    11      loop
    12          dbms_output.put_line( my_aviary(idx).fly() );
    13          dbms_output.put_line( my_aviary(idx).make_a_noise() );
    14      end loop;
    15  end;
    16  /
    my name is Donald
    quack!
    my name is Chicken Little
    cluck!
    my name is Tweetie Pie
    I taught I taw a puddy tat!!!
    my name is Foghorn Leghorn
    That's a joke... I say, that's a joke, son.
    my name is ?
    generic twitter
    PL/SQL procedure successfully completed.
    SQL>Now, in that loop woudl it make sense to execute a peck() on all of those entries? Nope. Furthermore as far as I can tell it is not possible to find out what sub-type an object is from with PL/SQL, so you couldn't even use Padders's TREAT ploy.
    So: if you want to do something generic use a super-type. If you want to do something specific use a sub-type.
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • JDBC overview to support ORACLE spatial databases

    Hello, where can I get some examples to access ORACLE SPATIAL objects from JAVA using JDBC?Does anybody now the link where can I read this.Thakx.
    Tomas Kloucek

    I have the same problem, i have been trawling through the internet trying to find
    out how to solve this problem but to know avail.

Maybe you are looking for