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).

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 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

  • 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

  • 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?

  • 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

  • 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.

  • 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.

  • Does Oracle Lite support Oracle Spatial

    Does anybody know whether Oracle Lite or Personal Oracle supports the Oracle Spatial plug-in. Also, for extra credit does anybody know what the difference between Personal Oracle and Oracle Lite is?
    We will be needing to provide some attribute and spatial data from our Oracle Enterprise database to several laptops for field personnel using an electronic map we developed. We would like to use a portable version of Oracle that supports Oracle Spatial objects.
    Any help would be greatly appreciated.
    Thanks
    Dan

    oh, I didn't realize it was so limited. No, that won't do. We're looking for a "mini" version of the real production database including stored code, triggers etc. Should be scaled down enough to allow rapid syncing of data and schema changes from the production (or really QA) database, but full enough to include the objects necessary to allow the developers to test their code changes to the front end applicaiton on their own environment.

  • 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

  • How to Query Sdo_Geometry Object of ORACLE SPATIAL in PHP?

    Hi,
    I am trying to Query the Oracle Spatial's Geometry object in the PHP page but its giving me the ADT Error. How can i see the GEOMETRY object information on the web using PHP. Thanking you in advance and waiting for ur prompt reply.
    Adnan!

    Hi Ana,
    In the Query below its returning the result as each value of one row in diffrent rows i wanna ask from u is:
    1- May i get all these values in one row ?
    2- Second, i want to query more than one row values from the table? as this is a single row subquery.
    Thanks for your help and i m looking forward for a positive reply from you.
    Regards,
    Adnan!
    The following select lists all ordinate-values from ONE object in the table:
    select *
    from table(select a.<column_name>.sdo_ordinates
    from <table_name> a
    where ID = xxxx
    *******************************************************************

  • What time Oracle Spatial Can support text object

    Hi:
    I want know what time oracle spatial can support text object. it is very useful for
    GIS and LBS customer.
    null

    Hi,
    I think it is an interesting idea, but there are difficulties when implementing such objects in the database level. For one thing, the placement, orientation of text for a point geometry is often dependent on point geometries stored in other rows in order to acheive an optimal and non-overlapping placement. It also depends on the font and size of the text, as well as the scale and level of detail when visualizing the spatial data. Such contextual information is only available to an application. I hope I understood you correctly and if you have further comments I would like to hear them too.

  • Oracle Spatial Performance with 10-20.000 users

    Does anyone have any experience when Oracle Spatial is used with say 20.000 concurrent users. I am not interested in MapViewer response time, but lets say there is:
    - an app using 800 different tables each having an sdo_geometry column
    - the app is configured with different tables visible on different view scales
    - let's say an average of 40-50 tables is visible at any given time
    - some tables will have only a few records, while other can hold millions.
    - there is no client side caching
    - clients can zoom in/out pan.
    Anwers I am interested in:
    - What sort of server would be required
    - How can Oracle serve all that data (each Refresh renders the map and retrieves the data over the wire as there is no client side caching).
    - What sort of network infrastructure would be required.
    - Can clients connect to different servers and hence use load balancing or does Oracle have an automatic mechanism for that?
    Thanks in advance,
    Patrick

    Patrick, et al.
    There are lots of things one can do to improve performance in mapping environments because of a lot of the visualisation is based on "background" or read-only data. Here are some "tips":
    1. Spatially sort read-only data.
    This tip makes sure that data that is close to each other in space are next to each other on disk! Dan gave a good suggestion when he referenced Chapter 14, "Reorganize the Table Data to Minimize I/O" pp 580- 582, Pro Oracle Spatial. But just as easily one can create a table as select ... where sdo_filter() where the filtering object is an optimized rectangle across the whole of the dataset. (This is quite quick on 10g and above but much slower on earlier releases.)
    When implementing this make sure that the created table is created such that its blocks are next to each other in the tablespace. (Consider tablespace defragmentation beforehand.) Also, if the data is READ ONLY set the PCTFREE to 0 in order to pack the data up into as small a number of blocks as possible.
    2. Generalise data
    Rendering spatial data can be expensive where the data is geometrically detailed (many vertices) esp where the data is being visualised at smaller scales than it was captured at. So, if your "zoom thresholds" allow 1:10,000 data to be used at 1:100,000 then you are going to have problems. Consider pre-generalising the data (see sdo_util.simplify) before deployment. You can add multiple columns to your base table to hold this data. Be careful with polygon data because generalising polygons that share boundaries will create gaps etc as the data is more generalised. Often it is better to export the data to a GIS which can maintain the boundary relationships when generalising (say via topological relationships).
    Oracle's MapViewer has excellent on-the-fly generalisation but here one needs to be careful. Application tier caching (cf Bryan's comments) can help here a lot.
    3. Don't draw data that is sub-pixel.
    As one zooms out objects become smaller and smaller until they reach a point where the whole object can be drawn within a single pixel. If you have control over your map visualisation application you might want to consider setting the SDO_FILTER parameter "min_resolution" flag dynamically so that its value is the same as the number of meters / pixel (eg min_resolution=10). If this is set Oracle Spatial will only include spatial objects in the returned search set if one side of a geometry's MBR is greater than or equal to this value. Thus any geometries smaller than a pixel will not be returned. Very useful for large scale data being drawn at small scales and for which no selection (eg identify) is required. With Oracle MapViewer this behaviour can be set via the generalized_pixels parameter.
    3. SDO_TOLERANCE, Clean Data
    If you are querying data other than via MBR (eg find all land parcels that touch each other) then make sure that your sdo_tolerance values are appropriate. I have seen sites where data captured to 1cm had an sdo_tolerance value set to a millionth of a meter!
    A corollary to this is make sure that all your data passes validation at the chosen sdo_tolerance value before deploying to visualisation. Run sdo_geom.validate_geometry()/validate_layer()...
    4. Rtree Spatial Indexing
    At 10g and above lots of great work went in to the RTree indexing. So, make sure you are using RTrees and not QuadTrees. Also, many GIS applications create sub-optimal RTrees by not using the additional parameters available at 10g and above.
    4.1 If your table/column sdo_geometry data contains only points, lines or polygons then let the RTree indexer know (via layer_gtype) as it can implement certain optimizations based on this knowledge.
    4.2 With 10g you can set the RTree's spatial index data block use via sdo_pct_free. Consider setting this parameter to 0 if the table/column sdo_geometry data is read only.
    4.3 If a table/column is in high demand (eg it is the most commonly used table in all visualisations) you can consider loading (a part of) the RTree index into memory. Now, with the RTree indexing, the sdo_non_leaf_tbl=true parameter will split the RTree index into its leaf (contains actual rowid reference) and non-leaf (the tree built on the leaves) components. Most RTrees are built without this so only the MDRT*** secondary tables are built. But if sdo_non_leaf_tbl is set to true you will see the creation of an additional MDNT*** secondary table (for the non_leaf part of the rtree index). Now, if appropriate, the non_leaf table can be loaded into memory via the following:
    ALTER TABLE MDNT*** STORAGE(BUFFER_AREA KEEP);
    This is NOT a general panacea for all performance problems. One should investigate other options before embarking on this (cf Tom Kyte's books such as Expert Oracle Database Architecture, 9i and 10g Programming Techniques and Solutions.)
    4.4 Don't forget to check your spatial index data quality regularly. Because many sites use GIS package GUI tools to create tables, load data and index them, there is a real tendency to not check what they have done or regularly monitor the objects. Check the SDO_RTREE_QUALITY column in USER_SDO_INDEX_METADATA and look for indexes with an SDO_RTREE_QUALITY setting that is > 2. If > 2 consider rebuilding or recreating the index.
    5. The rendering engine.
    Whatever rendering engine one uses make sure you try and understand fully what it can and cannot do. AutoDesk's MapGuide is an excellent product but I have seen it simply cache table/column data and never dynamically access it. Also, I have been at one site which was running Deegree and MapViewer and MapViewer was so fast in comparison to Deegree that I was called in to find out why. I discovered that Deegree was using SDO_RELATE(... ANYINTERACT ...) for all MBR queries while MapViewer was using SDO_FILTER. Just this difference was causing some queries to perform at < 10% of the speed of MapViewer!!!!
    6. Consider "denormalising" data
    There is an old adage in databases that is "normalise for edit, denormalise for performance". When we load spatial data we often get it from suppliers in a fairly flat or normalised form. In consort with spatial sorting, consider denormalising the data via aggregations based on a rendering attribute and some sort of spatial unit. For example, if you have 1 million points stored as single points in SDO_GEOMETRY.SDO_POINT which you want to render by a single attribute containing 20 values, consider aggregating the data using this attribute AND some sort of spatial BUCKET or BIN. So, consider using SDO_AGGR_UNION coupled with Spatial Analysis and Mining package functions to GROUP the data BY <<column_name>> and a set of spatial extents.
    6. Tablespace use
    Finally, talk to your DBA in order to find out how the oracle database's physical and logical storage is organised. Is a SAN being used or SAME arranged disk arrays? Knowing this you can organise your spatial data and indexes using more effective and efficient methods that will ensure greater scalability.
    7. Network fetch
    If your rendering engine (app server) and database are on separate machines you need to investigate what sort of fetch sizes are being used when returning data from queries to the middle-tier. Fetch sizes for attribute only data rows and rows containing spatial data can be, and normally are, radically different. Accepting the default settings for these sizes could be killing you (as could the sort_area_size of the Oracle session the application server has created on the database). For example I have been informed that MapInfo Pro uses a fixed value of 25 records per fetch when communicating with Oracle. I have done some testing to show that this value can be too small for certain types of spatial data. SQL Developer's GeoRaptor uses 100 which is generally better (but this one can modify this). Most programmers accept defaults for network properties when programming in ADO/ODBC/OLEDB/JDBC: just be careful as to what is being set here. (This is one of the great strengths of ArcSDE: its TCP/IP network transport is well written, tuneable and very efficient.)
    8. Physical Format
    Finally, while Oracle's excellent MapViewer requires data its spatial data to be in Oracle, other commercial rendering engines do not. So, consider using alternate, physical file formats that are more optimal for your rendering engine. For example, Google Earth Enterprise "compiles" all the source data into an optimal format which the server then serves to Google Earth Enterprise clients. Similarly, a shapefile on local disk to the application server (with spatial indexing) may be faster that storing the data back in Oracle on a database server that is being shared with other business databases (eg Oracle financials). If you don't like this approach and want to use Oracle only consider using a dedicated Oracle XE on the application server for the data that is read only and used in most of your generated maps eg contour or drainage data.
    Just some things to think about.
    regards
    Simon

  • Oracle Spatial for XE 10g / APEX 3.1

    I am working with the "2 Day + Developer's Guide" on my Oracle 10g XE / APEX 3.1 installation. There are the OEHR sample objects... the guide says that I need to install "Oracle Spatial" first:
    "Tip: In order to successfully import the objects associated with the
    OEHR Sample Objects application, your Oracle database must include
    Oracle Spatial. If your database instance does not include Oracle
    Spatial, you can install it using Database Configuration Assistant. To
    learn more, see the Oracle Database Installation Guide for your operating
    environment." (page 27, 3-5)
    Does 10g XE already includes Spatial? I couldn't find it in the Oracle downloads section :-/
    Maybe my installation doesn't have Spatial since I can't install the OEHR sample objects: Problems installing the OEHR sample objects application
    Thanks a lot!

    Does 10g XE already includes Spatial?XE supports only Locator, which is a subset of Spatial.
    The Locator is described in detail here:http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14255/sdo_locator.htm#i632018
    HTH

  • ORA-13050:unable to construct spatial object in using SDO_INTERSECTION

    Hi Specialists,
    I am using Oracle Spatial and getting the ORA-13050 error when using the SDO_Intersection procedure. Below are the details of this.
    Objective: To find the addresses whose boundary lie within a user defined polygon.
    Input: List of coordinates for the user defined poygon.
    Query I am using: SELECT SDO_GEOM.SDO_INTERSECTION (add.boundary, SDO_GEOMETRY(2003,8311,NULL, SDO_ELEM_INFO_ARRAY(1,1003,1),
    SDO_ORDINATE_ARRAY( 149.986507,-36.727242,149.985898,-36.726819,149.986756,-36.726512,149.987288,-36.726803,149.986507,-36.727242)), 0.000001)
    FROM address add
    WHERE add.id = '254378298'
    Error Received:
    ORA-13050: unable to construct spatial object
    ORA-06512: at "MDSYS.SDO_3GL", line 715
    ORA-06512: at "MDSYS.SDO_3GL", line 745
    ORA-06512: at "MDSYS.SDO_GEOM", line 3016
    ORA-06512: at "MDSYS.SDO_GEOM", line 3065
    Please can any one help me in this issue very urgent.
    Thanks,
    Ashish

    Hi All,
    The problem has been resolved by transforming the user defined polygon coordinates into the database specific coordinate system.
    Thanks

Maybe you are looking for

  • Need Help W/ Conditional Statement...

    Hi guys, I have a project uploaded at: http://www.jasonfraziercreativedesign.com/client_sites/kimyarbrough2/ After everything has loaded into place, and you click on -- say MODELING -- the photos slide away, the separator bars disappear, and the part

  • Jax-ws: dynamic proxy-suppress weblogic's default ws-policy handling

    hi all, i am writing my own jax-ws client (dynamic proxy) to call a web service, secured by usernametoken profile. the wsdl of the web service do include the ws-policy information. sample client side code: URL url = new URL("path_to_wsdl_file"); QNam

  • JSP comments

    hi ,           We have around 150 JSPs in our web application.           Lot of commenting code has gone inside these JSPs.           Though it is essential for maintenance purpose that we preserve the comments, it has been found that the comments ap

  • ManagedServer fails on integration domain

              Folks,           I use weblogic platform 81sp2. I created only one server under a integration domain           and started the server and it is just fine and connection pools are running fine.           When I create admin server and manage

  • Importing of business package gives one error!

    Hello, I am trying to import BPCRM40602_3-10002661.ZIP (https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/webcontent/uuid/30b2479f-ae6d-2910-ad99-c5844a1faa5d) into Portal 6.0 and am getting following one SEVERE message in the whole process: 44