SDO_NN with Oracle Spatial

Hello,
although the description of my problem is a bit long, I hope you could help me.
I would like to compute the nearest neighbor of a point being located on the surface of the unit sphere.
For that query, I would like to take advantage of the features provided by Oracle Spatial (10g).
Table spatial_test contains the columns point_name, x, y, z, ra, dec where:
point_name is the primary key
x, y, z are the coordinates of the points on the unit sphere (so x^2+y^2+z^2=1)
ra, dec are the the concerning spherical coordinates where the following conditions hold: x=cos(dec)*cos(ra) , y=cos(dec)*sin(ra), z=sin(dec).
For computing the nearest neighbor of a point with point_name='point1' the query without using Oracle Spatial is:
select * from(
select
acos(t1.x*t2.x+t1.y*t2.y+t1.z*t2.z) as distance, t1.*
from spatial_test t1,
spatial_test t2
where t2.point_name='point1'
and t1.name != t2.name
order by dist
where rownum<2;
For taking advantage of Oracle Spatial, I have to prepare my data doing the following five steps:
1. add a column to of type SDO_GEOMETRY to table spatial_test
2. insert values to that table
3. update table user_sdo_geom_metadata
4. create the spatial index
5. execute the following query on the amended table spatial_test:
SELECT t1.point_name name1, t2.point_name name2 FROM spatial_test t1, spatial_test t2
WHERE SDO_NN(t2.geom, t1.geom, 'sdo_num_res=2') = 'TRUE'
and t1.point_name = 'point1'
and t1.point_NAME != t2.point_name
As mentioned in the User Guide for Oracle Spatial, only two dimensional objects are supported.
So, if I insert tuples in the following form to my table:
insert into spatial_test (point_name, x, y, z, geom) values (..., ..., ..., ...,
SDO_GEOMETRY(3001,
NULL, --SDO_SRID is null, so no coordinate system is associated with the geometry
SDO_POINT_TYPE(x_value, y_value, z_value),
NULL,
NULL));
I won't get the correct results. I assume that the z_value is just ignored. Am I right with that assumption?
For using Oracle Spatial, I have to use the equivalent just using two dimensions. Since ra, dec is another representation for x, y, z, I tried to do the same, just using ra and dec. But here, my results also differ from the ones computed with my own computation of the nearest neighbor.
Here an minimal example which shows my problem:
CREATE TABLE spatial_test(
point_name varchar(20) PRIMARY KEY,
x float,
y float,
z float,
ra float,
dec float,
geom SDO_GEOMETRY);
-- INSERT POINTS --
insert into spatial_test(point_name, x, y, z, ra, dec, geom) values ('point1', -0.00472924, 0.110927216, 0.99381728, 92.44125, 83.62542,
SDO_GEOMETRY(2001, -- 2 dimensions, last dimension is the measure, geometry type 01 = point
NULL, --SDO_SRID is null, so no coordinate system is associated with the geometry
SDO_POINT_TYPE(92.44125, 83.62542, null),
NULL,
NULL));
insert into spatial_test(point_name, x, y, z, ra, dec, geom) values ('point2', -0.00239923, 0.112814014, 0.993613226, 91.21833, 83.52097,
SDO_GEOMETRY(2001, -- 2 dimensions, last dimension is the measure, geometry type 01 = point
NULL, --SDO_SRID is null, so no coordinate system is associated with the geometry
SDO_POINT_TYPE(91.21833, 83.52097, null),
NULL,
NULL));
insert into spatial_test(point_name, x, y, z, ra, dec, geom) values ('point3', -0.00701052, 0.122780703, 0.992409065, 93.26792, 82.93584,
SDO_GEOMETRY(2001, -- 2 dimensions, last dimension is the measure, geometry type 01 = point
NULL, --SDO_SRID is null, so no coordinate system is associated with the geometry
SDO_POINT_TYPE(93.26792, 82.93584, null),
NULL,
NULL));
-- UPDATA user_sdo_geom_metadata --
INSERT INTO user_sdo_geom_metadata
(TABLE_NAME,
COLUMN_NAME,
DIMINFO,
SRID)
VALUES (
'spatial_test',
'geom',
MDSYS.SDO_DIM_ARRAY(
MDSYS.SDO_DIM_ELEMENT('ra', 0.0, 360.0, 0.0000000000001),
MDSYS.SDO_DIM_ELEMENT('dec', -90.0, 90.0, 0.0000000000001)
NULL -- no specific coordinate system should be associated with the geometries.
-- CREATE THE SPATIAL INDEX --
CREATE INDEX spatial_test_idx
ON spatial_test(geom)
INDEXTYPE IS MDSYS.SPATIAL_INDEX;
Now I could execute the following queries which should both compute the nearest neighbor of 'point1'.
This is the statement computing the nearest neighbor without Oracle Spatial:
select * from(
select
acos(t1.x*t2.x+t1.y*t2.y+t1.z*t2.z) as distance, t2.point_name p1, t1.point_name p2
from spatial_test t1,
spatial_test t2
where t2.point_name='point1'
and t1.point_name != t2.point_name
order by distance
where rownum<2;
RESULT:
DISTANCE P1 P2
,003005107 point1 point2
With the following statement, I compute the nearest neighbor of 'point1' using Oracle Spatial:
SELECT t1.point_name name1, t2.point_name name2 FROM spatial_test t1, spatial_test t2
WHERE SDO_NN(t2.geom, t1.geom, 'sdo_num_res=2') = 'TRUE'
and t1.point_name = 'point1'
and t1.point_NAME != t2.point_name;
RESULT:
NAME1 NAME2
point1 point3
As you see, unfortunately, the two results differ.
Could you please tell me, what I understood wrong in using Oracle Spatial?
In addition, what kind of coordinate system is assumed if it isn't specified in my SDO_GEOMETRY? Which kind of distance is computed using sdo_nn (euclidean distance, ...)?
Would be glad, if you could tell how to reach the same results for my nearest neighbors using Oracle Spatial.
Regards,
Ina

I would like to compute the nearest neighbor of a
point being located on the surface of the unit
sphere.That would be a spherical 3D computation. Currently, OS does not work well with 3D such as spheres, sorry. I know R2 was supposed to improve on this for cubes and pyramids, but to be honest; I haven’t had time to go back and test the simple cube operations. With 10gR1, for most of the operators and functions 2,2,3 and 2,2,5 are same point. I know this is something that is being worked on, possibly Dan can comment further.
See for more info:
Re: 3D Polygon
For now, if you have your own routines, I’d use them as a package instead. If you need help there, let us know and we’ll try to point you in the right direction or help you to translate the code to PL/SQL.
Bryan

Similar Messages

  • Poor performance with Oracle Spatial when spatial query invoked remotely

    Is anyone aware of any problems with Oracle Spatial (10.2.0.4 with patches 6989483 and 7003151 on Red Hat Linux 4) which might explain why a spatial query (SDO_WITHIN_DISTANCE) would perform 20 times worse when it was invoked remotely from another computer (using SQLplus) vs. invoking the very same query from the database server itself (also using SQLplus)?
    Does Oracle Spatial have any known problems with servers which use SAN disk storage? That is the primary difference between a server in which I see this poor performance and another server where the performance is fine.
    Thank you in advance for any thoughts you might share.

    OK, that's clearer.
    Are you sure it is the SQL inside the procedure that is causing the problem? To check, try extracting the SQL from inside the procedure and run it in SQLPLUS with
    set autotrace on
    set timing on
    SELECT ....If the plans and performance are the same then it may be something inside the procedure itself.
    Have you profiled the procedure? Here is an example of how to do it:
    Prompt Firstly, create PL/SQL profiler table
    @$ORACLE_HOME/rdbms/admin/proftab.sql
    Prompt Secondly, use the profiler to gather stats on execution characteristics
    DECLARE
      l_run_num PLS_INTEGER := 1;
      l_max_num PLS_INTEGER := 1;
      v_geom    mdsys.sdo_geometry := mdsys.sdo_geometry(2002,null,null,sdo_elem_info_array(1,2,1),sdo_ordinate_array(0,0,45,45,90,0,135,45,180,0,180,-45,45,-45,0,0));
    BEGIN
      dbms_output.put_line('Start Profiler Result = ' || DBMS_PROFILER.START_PROFILER(run_comment => 'PARALLEL PROFILE'));  -- The comment name can be anything: here it is related to the Parallel procedure I am testing.
      v_geom := Parallel(v_geom,10,0.05,1);  -- Put your procedure call here
      dbms_output.put_line('Stop Profiler Result = ' || DBMS_PROFILER.STOP_PROFILER );
    END;
    SHOW ERRORS
    Prompt Finally, report activity
    COLUMN runid FORMAT 99999
    COLUMN run_comment FORMAT A40
    SELECT runid || ',' || run_date || ',' || run_comment || ',' || run_total_time
      FROM plsql_profiler_runs
      ORDER BY runid;
    COLUMN runid       FORMAT 99999
    COLUMN unit_number FORMAT 99999
    COLUMN unit_type   FORMAT A20
    COLUMN unit_owner  FORMAT A20
    COLUMN text        FORMAT A100
    compute sum label 'Total_Time' of total_time on runid
    break on runid skip 1
    set linesize 200
    SELECT u.runid || ',' ||
           u.unit_name,
           d.line#,
           d.total_occur,
           d.total_time,
           text
    FROM   plsql_profiler_units u
           JOIN plsql_profiler_data d ON u.runid = d.runid
                                         AND
                                         u.unit_number = d.unit_number
           JOIN all_source als ON ( als.owner = 'CODESYS'
                                   AND als.type = u.unit_type
                                   AND als.name = u.unit_name
                                AND als.line = d.line# )
    WHERE  u.runid = (SELECT max(runid) FROM plsql_profiler_runs)
    ORDER BY d.total_time desc;Run the profiler in both environments and see if you can see where the slowdown exists.
    regards
    Simon

  • Webinar Replay URL: Situational Analysis at OnStar with Oracle Spatial

    A free replay is now available for the Directions webinar Situational Analysis at OnStar with Oracle Spatial, which was held on Feb. 22.
    To view the replay, visit https://www2.gotomeeting.com/register/237138906
    OnStar is the largest telematics solution provider on the globe, with 6 million subscribers in North America and abroad. OnStar uses situational awareness and real-time analysis to deliver fast, accurate emergency services to its customers. At the core of this solution is an Oracle Spatial-based analytical server that supports Google Earth visualization and NAVTEQ data. With this system, OnStar gains better understanding of customer use and behavior and better insight during emergency situations. In hurricanes, wildfires and other disasters, OnStar has developed early warning capabilities for use in near real-time. It can then manage call center resources based on anticipated call volumes and ultimately develop more effective new processes and services.
    Learn from OnStar how the company uses Oracle Spatial to deliver insight, performance and scalability.
    Key learning points include:
    * How OnStar’s Oracle Spatial analytical server supports its real-time call center Advisor application in an environment using Google Earth visualization and NAVTEQ data
    * How spatial analysis allows OnStar to obtain better insight into disaster situations, develop early warning capabilities, and improve call center coverage
    * How Oracle Database 11g (with Oracle Spatial, Real Application Clusters, Partitioning) provides scalability and performance required to process and query OnStar’s large amounts of transactional data
    Speakers include:
    * Jeff Joyner, Emergency Strategy and Outreach, GM OnStar and Injury Research Fellow, University of Michigan Program for Injury Research and Education
    * James Steiner, Vice President, Product Management, Oracle Server Technologies
    Who should attend:
    This webinar is appropriate for CIOs, business and technical managers and analysts involved in the design and management of enterprise systems where spatial analysis can add insight and value to business processes.

    Nice to have a EXPERT in this FORUM...!!
    Hi Dan, if you look at my reply I mentioned that I had loaded loc_updates.sql
    From my previous reply:
    execute loc_updates.sql which doenot update any of the rows since if you look at the syntax in loc_updates.sql file it shows update the table customers whose customer_id=344.
    Where is this customer_id=344 coming from?
    Also the datatype is a number.
    Dan, were you able to get the results as desired?
    or may be I am missing something...
    Thanks and Regards,
    Nandakishore.

  • Free Webinar - Situational Analysis at OnStar with Oracle Spatial Feb. 22

    Join us for the next Directions webinar: Situational Analysis at OnStar with Oracle Spatial
    When:  Wednesday, February 22nd, 2:00 PM - 3:00 PM EST
    Register now:  https://www2.gotomeeting.com/register/237138906
    OnStar is the largest telematics solution provider on the globe, with 6 million subscribers in North America and abroad. OnStar uses situational awareness and real-time analysis to deliver fast, accurate emergency services to its customers. At the core of this solution is an Oracle Spatial-based analytical server that supports Google Earth visualization and NAVTEQ data. With this system, OnStar gains better understanding of customer use and behavior and better insight during emergency situations. In hurricanes, wildfires and other disasters, OnStar has developed early warning capabilities for use in near real-time. It can then manage call center resources based on anticipated call volumes and ultimately develop more effective new processes and services.
    Learn from OnStar how the company uses Oracle Spatial to deliver insight, performance and scalability.
    Key learning points include:
    * How OnStar’s Oracle Spatial analytical server supports its real-time call center Advisor application in an environment using Google Earth visualization and NAVTEQ data
    * How spatial analysis allows OnStar to obtain better insight into disaster situations, develop early warning capabilities, and improve call center coverage
    * How Oracle Database 11g (with Oracle Spatial, Real Application Clusters, Partitioning) provides scalability and performance required to process and query OnStar’s large amounts of transactional data
    Speakers include:
    * Jeff Joyner, Emergency Strategy and Outreach, GM OnStar and Injury Research Fellow, University of Michigan Program for Injury Research and Education
    * James Steiner, Vice President, Product Management, Oracle Server Technologies
    Who should attend:
    This webinar is appropriate for CIOs, business and technical managers and analysts involved in the design and management of enterprise systems where spatial analysis can add insight and value to business processes.
    Register now: https://www2.gotomeeting.com/register/237138906

    Markus,
    Sorry for my late reply it had been awhile since I was here at SDN
    I did it manually in the 'old' way and at that time it did work.
    Kulvir,
    I did get it from SAPnet but when I downloaded it it contained the proper file.But I did had the same with an add-on for the business connector which only contained an empty file.
    Thanks for your answers and again sorry for my late reply back to you all

  • Using Java with Oracle Spatial

    I am using the JDBC (Java classes dowloaded from
    technet.oracle.com - (sdoapi.zip)) together with Oracle Spatial
    8.1.6. I am writing a collection of Linestrings into Oracle
    Spatial using the supplied java classes(sdoapi.zip). I use the
    function createGeometryCollection(myCollection)to write the
    Linestring collection to Oracle Spatial and they are written to
    the database without error. However, when I try to read the
    object back I get the following error:
    Exception in thread "main"
    oracle.sdoapi.geom.InvalidGeometryException
    at oracle.sdoapi.adapter.AdapterSDO.importGeometry
    (AdapterSDO.java:101)
    at
    MapInfoToOracleSpatial.MapInfoToOracleSpatial.main
    (MapInfoToOracleSpatial.java:211)
    I do not have a listing of this code so can you please tell me
    what the error is (line of code) at line 211. Also, when I use
    the Oracle Spatial Index Advisor to view the spatial data, it
    only displays a quarter of the data. When I use MapInfo to view
    it's equivalent TAB (Table) file it views correctly all the
    data.
    I can't understand why this is happening because the writing to
    oracle and creation of each individual linestring does not
    throw an error. It is only when I try to read back larger
    objects from the database (2500 points) that it gives an error.
    Is there a limitation on the size one can create linestrings?
    Thanks
    Regards
    Stephen Syrett
    Mobile Telecommunications Network
    (MTN) South Africa

    Latest Oracle Openworld Spatial/MapViewer activities list:
    http://www.oracle.com/us/products/database/options/spatial/ssLINK/oow10-focuson-spatial-169204.pdf
    thanks
    LJ

  • Regarding  working with oracle spatial database connections

    sir/madem,
    i am an engg student, my final year project on inserting data into oracle spatial database through java /jsp , i am working with oracle spatial database 10g/11g,
    i want know how to insert/retrive/ manuplute the spatial data into oracle spatial databse for 10g/11g, through java programing,
    the syntax for connection of oracle spatial database 10g/11g, needed,
    i have less time to finish my project
    i hope u  help me
    thank u
    kasim
    ([[email protected]|mailto:[email protected]])

    For database access from Java, you will use JDBC.
    For the specifics of the oracle spatial database, you'll have to check the documentation/forum of Oracle.
    * [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]
    * [JDBC Tutorial|http://java.sun.com/docs/books/tutorial/jdbc/index.html]

  • Starting with Oracle Spatial

    Hi, in few weeks I will have to start a new project in wich I will work with Oracle Spatial. I will like to know a good book, or any online resource to learn about this new world for me...
    Thanks a lot for your help...!!!

    Decide what version of Oracle you'll be using, then start here for documentation:
    http://www.oracle.com/technology/documentation/spatial.html
    Also Pro Oracle Spatial is essential reading:
    http://www.amazon.com/Pro-Oracle-Spatial-Euro-Beinat/dp/1590593839

  • Server Hardware for Oracle Database 11g Release 2 with Oracle Spatial

    Hi ,
    We're to set up an Oracle Database 11g Release 2 Enterprise with Oracle Spatial.
    Can you provide me the possible Server Hardware CPU / Memory specs , number of CPUs,type of OS and teh Model, for Spatial which a million users hits the database via a webservice?
    The vendor suggested us SDD instead of HDD, any performance hike on this?
    Budget seems to okay but I think Exadata will be too dear.
    Your insights is much appreciated.Anything relating to setting up a server with spatial is greatly appreciated.
    P/S: Been a programmer and don't knwo much about server hardware specs.

    It depends.
    Seriously - before anyone can offer anything but generalities here you need to really define exactly what you expect the database to deliver.
    In general however, I will throw out these questions and ideas...
    For instance - you say a million users "hit" the database (via a web service). Is that WFS, WMS, KML or ???
    Over - how long? A year? A month? A minute? A million hits over a year spread out evenly is only about 2 per minute.
    And what is a hit? A single random record? Or about 10,000 records in the same spatial area... or? And for each record - are you returning simple point data - or hugely complex polygons with thousands of vertexes each?
    How does this software work? Is it custom - or is it well known? Does it really query the database for every map (I assume it is a map service) feature - or does it read an area once and cache it in the middle tier? Or does it do something really smart and use cached tiles for static data - overlayed with vectors for dynamic data?
    And although you say Oracle Spatial - are you really using Spatial - or just Locator functions (less processing in general)? And if spatial - are you doing raster in the db - or 3D analysis - or other special functionality?
    SSD vs. HDD. - If you can buy a server with more RAM than the data set size (pretty easy these days) - and you do mostly reads (almost always the case for a map app) - buy a small cheap array of RAID'd HDD's - internal to the server is fine. Once the data is read into RAM - the HDD's do basically nothing.
    Server CPU and memory. Amount - see above. CPU Speed (use performance benchmarks - not GHz numbers) AND memory speed (often overlooked) - buy as fast as possible. Why? You pay for licenses by the core (2 cores per license for x64). And HW is MUCH MUCH MUCH cheaper than Oracle licenses. Plan to upgrade HW every year if necessary to avoid buying more licenses (sounds crazy - but it is much cheaper).
    This may seem like a lot - but these questions are just the tip of the iceberg. I have been in charge of spec'ing, building, and programming spatial systems now for about 20 years, so I have a pretty good idea of how to do enterprise scale computing on a Ramon-noodle budget.
    Smart clean software is your friend - don't ask the HW to do anything unless absolutely necessary (cache results and reuse as much as possible), and you can get crazy performance from minimal hardware.
    Bryan

  • Using Toplink with Oracle Spatial (missing right parenthesis error)

    Hi,
    I always get the following error when I try to create spatial query with toplink.
    Internal Exception: java.sql.SQLException: ORA-00907: missing right parenthesis
    Any idea ? Also, there is no trace of my point in the generated sql....
    Here is the generated query:
    SELECT ID, [...]
    FROM QUEBEC_CITY
    WHERE (MDSYS.SDO_NN(GEOMETRY, JGeometry (gtype=1, dim=2, rid=8307, NULL) = 'TRUE')
    ORDER BY ID ASC
    Here is my code... :
    double[] coord = new double[]{-71.25163d, 46.8527d};
    JGeometry point = JGeometry.createPoint(coord, 2, 8307);
    SpatialOperator nearestNeighbor = SpatialOperator.nearestNeighbor(session);
    ReadAllQuery query = new ReadAllQuery(UrbanEdgeDescriptor.class);
    ExpressionBuilder eb = query.getExpressionBuilder();
    Expression geom = eb.get("geometry");
    query.setSelectionCriteria(nearestNeighbor.buildExpression(geom, point));
    query.addAscendingOrdering("id");
    List<UrbanEdgeDescriptor> results = (List)db.getSession().executeQuery(query);
    System.out.println(results!=null);

    The problem is the toString() on JGeometry. It does not print out a complete description the database can use inline. It produces:
    JGeometry (gtype=1, dim=2, rid=8307
    To get JGeometry types to work in your queries the easiest solution is to use parameter binding so the literal representation is not used.
    Doug

  • Getting Started with Oracle Spatial

    I am not sure if this is the appropriate forum for this question but here goes:
    I have just started using Spatial, and am
    trying to setup a simple within-distance query, following closely the html documentation.
    I create a parks table:
    CREATE TABLE parks (GID VARCHAR2(32), shape MDSYS.SDO_GEOMETRY);
    and then the geometry metadata table:
    INSERT INTO sdo_geom_METADATA VALUES ('parks', 'shape', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', 0, 100, 0.005), MDSYS.SDO_DIM_ELEMENT('Y', 0, 100, 0.005)));
    I insert some entries into my PARKS table:
    INSERT INTO parks VALUES ('park1', MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,1,NULL),NULL, NULL));
    INSERT INTO parks VALUES ('park2', MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,3,NULL),NULL, NULL))
    and create a spatial index:
    create index parks_fixed on parks(shape) indextype is mdsys.spatial_index parameters('SDO_LEVEL=8');
    Finally, I do my within-distance query:
    select parks.GID from TARGET parks where mdsys.sdo_within_distance(parks.shape,
    MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,1,NULL),NULL, NULL),
    'distance=2')='true';
    to find points within 2 units of (1,1).
    Unfortunately, I get the error:
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 73
    ORA-06512: at line 1
    So a few questions:
    1: What am I doing wrong?
    2: In 4.2.3 of the Oracle HTML documentation,
    the example query has SELECT A.Feature_ID
    FROM TARGET A . . . . . .
    What is TARGET?
    3: The documentation has many errors. Where can I find better documentation?
    Any help on any of these matters would be greatly appreciated!
    Sincerely Yours,
    Hirohisa

    I am not sure if this is the appropriate forum for this question but here goes:
    I have just started using Spatial, and am
    trying to setup a simple within-distance query, following closely the html documentation.
    I create a parks table:
    CREATE TABLE parks (GID VARCHAR2(32), shape MDSYS.SDO_GEOMETRY);
    and then the geometry metadata table:
    INSERT INTO sdo_geom_METADATA VALUES ('parks', 'shape', MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', 0, 100, 0.005), MDSYS.SDO_DIM_ELEMENT('Y', 0, 100, 0.005)));
    I insert some entries into my PARKS table:
    INSERT INTO parks VALUES ('park1', MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,1,NULL),NULL, NULL));
    INSERT INTO parks VALUES ('park2', MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,3,NULL),NULL, NULL))
    and create a spatial index:
    create index parks_fixed on parks(shape) indextype is mdsys.spatial_index parameters('SDO_LEVEL=8');
    Finally, I do my within-distance query:
    select parks.GID from TARGET parks where mdsys.sdo_within_distance(parks.shape,
    MDSYS.SDO_GEOMETRY(1,NULL,MDSYS.SDO_POINT_TYPE(1,1,NULL),NULL, NULL),
    'distance=2')='true';
    to find points within 2 units of (1,1).
    Unfortunately, I get the error:
    ERROR at line 1:
    ORA-29902: error in executing ODCIIndexStart() routine
    ORA-13207: incorrect use of the [SDO_WITHIN_DISTANCE] operator
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD", line 73
    ORA-06512: at line 1
    So a few questions:
    1: What am I doing wrong?
    2: In 4.2.3 of the Oracle HTML documentation,
    the example query has SELECT A.Feature_ID
    FROM TARGET A . . . . . .
    What is TARGET?
    3: The documentation has many errors. Where can I find better documentation?
    Any help on any of these matters would be greatly appreciated!
    Sincerely Yours,
    Hirohisa

  • Oracle Spatial and Oracle Forms

    Hi,
    Does anyone have experience with Oracle Spatial and Oracle Forms?
    I have generated a form, which is based on a view. The view uses the mdsys.sdo_relate operator. Somehow I am unable to get the form to perform (to get one record it takes over 20 minutes). While useing sql-navigator to process the same statement it seems no problem. The query that also uses the view, is then processed in 10 seconds.
    I also noticed that when text-functions like ' lower' of ' upper' are used to query the view, the query is processed within 15 seconds. If I don't use ' lower' or ' upper' it takes a long time (> 20 minutes) to process the query. Is it possible that this causes the bad performance of the form?
    On metalink I have found that forms and spatial do not cooperate because of the pl/sql version that
    forms6 uses. There is no solution presented, does anyone know of a work around?
    My configuration is:
    Oracle 8.1.7 on WIN2K @ PIII-800Mhz 256 Mb memory.
    Formsbuilder 6
    If requested I can post the queries that I have made.
    With regards,
    Gerjan Walrecht
    [email protected]
    null

    Hello Priya,
    Look into the following.
    1. Book - Pro Oracle Spatial for Oracle Database 11g by r. Kothuri, A. Godfrind, E. Beinat. This book provides a nice introduction on Oracle Spatial concepts and have examples.
    2. Look at the Oracle Spatial & Graph User Guide
    2. Book - Applying and Extending Oracle Spatial by S. Greener and S. Ravada. This book provides hands on information for advanced oracle spatial application developers. Practical guide on hands-on examples, Data models and  develop cross-vendor database solutions.
    3. This oracle spatial forum, once you understand these concepts.
    In the future consider Certification on Oracle Spatial 11g Certified Implementation Specialist.
    Best
    Navaneet

  • Oracle Spatial User Conference  - GITA Conference Seattle

    http://www.gita.org/events/annual/31/Oracle.asp
    Oracle Spatial User Conference
    Please note that online registration for this event is now closed.
    Thursday, March 13, 2008
    Sheraton Seattle Hotel
    1400 6th Avenue
    Seattle, Washington USA
    GITA invites you to attend the Oracle Spatial Users Conference. If you are currently a user, solutions provider, or systems integrator who depends upon Oracle’s spatial technologies, or if you want to learn why thousands of organizations use Oracle’s spatial database and application server capabilities, this is one event you won’t want to miss.
    Learn about the latest Oracle geospatial technologies and the business and technical benefits they provide as users, solutions providers and Oracle executives share real world experience with the world's most widely used geospatial information technology platform.
    More details will be posted soon—sign up for e-mail updates today!
    ORACLE SPATIAL USER CONFERENCE AT GITA
    Thursday, March 13, 2008—Seattle, Washington
    Preliminary Agenda
    Please check back for updates in the future. This agenda is subject to change.
    Feb. 12 Update: Complete user sessions schedule and abstracts posted
    Wednesday, March 12
    6:00 – 8:30 p.m.      Oracle Spatial User Conference Reception — Cirrus Ballroom, Sheraton Seattle Hotel
    Open to registered & paid user conference attendees only. Registration will be available at the door.
    Thursday, March 13
    8:00 – 8:30 a.m.
    Oracle Spatial Special Interest Group Meeting
    8:30 – 9:00 a.m.      Welcome – Oracle
    9:00 – 10:30 a.m.
    Maps in Business Solutions and Applications (Jayant Sharma)
    * Fusion Middleware and BI
    * OGC Web Services
    * Work and Asset Management
    * Mobile Workforce Management
    10:30 – 11:00 a.m.
    Break
    11:00 a.m. – Noon
    Oracle Spatial 11g – Technical Overview (Siva Ravada)
    * What’s Better?
    * What’s New?
    * What Would You Like To See?
    12:00 – 1:30 p.m.
    Award Luncheon
    1:30 – 3:00 p.m.
    TECHNICAL USE CASES – USER SESSIONS
    Track A
    Mapping & Business Intelligence Applications in Insurance and Retail
    Audatex Insight: Claims Analytics with Oracle Business Intelligence Enterprise Edition and Oracle MapViewer
    Yasser Kanoun, Principal Consultant, KPI Partners
    Sally Suico, Audatex
    Audatex Insight is a claim analytics application that presents automobile claims data in graphical and geographical views for management decision support.
    This presentation describes how the integration of Oracle MapViewer with OBIEE dashboards allowed Audatex to display claim analytics geographically. For instance, a user can view the average cost of car repair variance, for a specific insurance company compared to whole industry, on US map at desired geographical levels.
    CatPortal's LocWizard: An Innovative Approach to Mapping Insurance Risk Intelligence and Enabling Faster Decision Making
    Guru Rao, President, Catastrophe Systems,
    Aon Re Services, Inc.
    Deepak Badoni, Vice President, Catastrophe Systems, Aon Re Services, Inc.
    Instant access to policy and location level insurance data is one of the keys to faster decision making during and after a catastrophe event. Using Oracle Business Intelligence Enterprise Edition and Oracle MapViewer, Aon Re Global has developed an industry leading business intelligence and mapping tool that allows users to seamlessly navigate between reports and maps.
    The design was driven entirely by their clients’ need to answer key questions about their exposures and losses to catastrophes. The system uses a blend of custom programming and out-of-the-box functionality to create an interface that allows users to create powerful visualizations and reports with a few mouse-clicks – which previously took days, even weeks of manual effort.
    Unobtrusive Spatial Enablement of the Oracle Business Intelligence Suite at RL Polk
    Steven Pierce, Principal, Johnston McLamb
    Robert Murray, Technical Product Manager, RL Polk
    This presentation will describe RL Polk’s approach to integrating Oracle MapViewer into Oracle Business Intelligence Suite using Oracle MapViewer's Non-Spatial Data Provider. The NSDP brought an elegant and efficient approach to integrating spatial and non-spatial data in real time.
    Track B
    Oracle Spatial in Public Sector
    Maximizing the Value of Cuyahoga County-Wide GIS Using Oracle Spatial and Oracle Fusion Middleware
    J. Kevin Kelley, Geospatial Information Officer, Cuyahoga County
    G. Patrick Zhu, Software Systems Developer,Michael Baker Corporation
    Discover how to leverage Oracle Spatial and Fusion Middleware technologies to solve current complex county-wide Geospatial needs. Cuyahoga is implementing a cutting-edge architecture to support Grid computing, service-oriented architecture (SOA) and event-driven architecture (EDA) that delivers unprecedented flexibility, performance and scalability.
    Web Mapping with Microsoft Virtual Earth and Oracle 10g in U.S. EPA's Grant Tracking Systems
    Trevor Quinn, Principal Developer, Systalex Corporation
    This presentation details how a U.S. EPA enterprise web application was "geo-enabled" using Microsoft Virtual Earth and Oracle Application Express, and how the back-end Oracle 10g database was transformed into a spatial data engine for Virtual Earth. The presentation demonstrates how to make Oracle MapViewer maps available to commercial mapping APIs as cached tiles, and describes how to serve feature data directly from the database to Virtual Earth using AJAX and PL/SQL.
    Automatic Vehicles Monitoring System at Cotral
    Giovanni Corcione, Sales Consultant, Oracle Italy
    Paolo Castagno, Principal Consultant, Oracle Italy
    Diego Ponzi, Production Monitoring- Innovation Manager, Cotral SPA
    The Automatic Vehicles Monitoring (AVM) system at Cotral SPA monitors a fleet of 1600 buses that take about 4600 trips per day on a "near real time" basis. Through GPRS/HTTP, buses send information such as position, events, alarms, timing, schedule to a central system for storage and analysis in the Spatial Data Infrastructure, based on Oracle Spatial, for bus monitoring, mapping, reporting and trip planning. With Oracle’s linear referencing, buses can be located and displayed in real time. The Oracle MapViewer browser front-end renders interactive maps with dynamic bus positions according to routes and bus stop positions. A demo will be shown.
    3:00 – 3:30 p.m.
    Break / Vendor Booths
    3:30 – 5:15 p.m.
    TECHNICAL USE CASES – USER SESSIONS
    Track A
    Utilities Case Studies
    A Case Study: Re-engineering Cable Industry Business Processes with Spatial Database Technologies
    Dennis Beck, President, Spatial Business Systems
    This presentation highlights how a suite of customer-service related business applications are being deployed to change cable industry. An overview of the key design criteria will be presented along with highlights of the technical challenges that were faced in building a large-scale set of applications. Details of the applications will be highlighted as well as an overview of the technical implementation considerations and challenges. The presentation will conclude with a demonstration.
    Web based geospatial business applications - embedding the CAD/GIS client
    Philip O'Doherty, CEO, eSpatial Inc.
    Jon Polay, VP Sales, eSpatial Inc.
    This talk looks at the emerging drive towards development of geospatial GIS/CAD features within web enabled business applications. It has always been a goal to embed CAD like capabilities within business applications, but it is only recently that the required database and software infrastructure has made this possible. Leading Wireless Telecommunications Company, Verizon, will present its VEGA Application. This demo includes CAD data editing and manipulation features, seamlessly provided as an end to end process, all accessible within a pure web browser.
    Foundations of the New Enterprise: Managing Critical Business Data using Oracle Spatial
    Justin Lokitz, Director of Sales Engineering Organization Leica Geosystems Geospatial Imaging
    Washington Suburban Sanitary Commission (WSSC) is among the top ten Water and Waste Water utilities in the United States. Early on, to support its business needs with regards to geospatial data, WSSC had built a system using software from many traditional GIS vendors that lacked integration and support for many vital business processes. In 2006 WSSC moved all enterprise data to Oracle Spatial (vector and raster data) and implemented the Leica Geosystems' ADE suite.
    Modeling Utility Networks with Oracle Spatial Network Data Model
    Peter Manskopf, Senior Consultant, GE Energy
    The capabilities in Oracle Spatial allowed GE to build its next generation GIS client using Oracle Spatial as the data repository. The Oracle Spatial network data model provides the primitive spatial data structures required to model and meet the complex needs of utility customers. This presentation will give a technical overview how an electrical utility network can be modeled using the Oracle network topology model. The presentation will cover: How Oracle Spatial data structures can be used to model a connected utility network. How the SDO_NET API is used to perform different types of network tracing crucial to utilities. A demo will show the GE client performing network operations on Oracle Spatial.
         Track B
    Oracle Spatial in Public Sector & Map Production
    Using Oracle Spatial and MapViewer for Evaluation of Urban Area Development in Brazil
    Andre Luis Carvalho da Motta e Silva, Stategical Projects Director, CODEPLAN
    Gustavo Neves de Andrade Lemes, Consultant, Sete Serviços
    Fernando Targa, Development Director, GEMPI
    To meet information demand concerning income and job generation programs implemented by Brazil’s Federal District Economic Development Office (SDE), the Federal District Planning Company developed the Urban Areas Management System (SIGAU). Local areas are evaluated through performance indexes that take into account urban features, land plot, block and district, and analysis/simulation of a large volume of data from many governmental offices and systems. Thematic maps enable follow up and decision making on current programs. Oracle Spatial, GeoRaster and MapViewer provide a safe, high performance implementation platform. A demo will be shown.
    Creation, Publication & Update of Maps out of Databases
    Sebastien Lanoe, Product Marketing Manager, Lorienne SA
    The production of maps out of GIS databases is often a challenging process. Lorienne innovates with a new map production environment for map creation, map publication and map updates from Oracle Spatial, with a focus on high quality, production cost, data integrity and diversification of map products across media. The case study with Tele Atlas data stored in Oracle Spatial will address the benefits, the level of quality, the efficiency of the production process and its dedicated user-friendly environment.
    Reengineering Desktop Thick Workgroups into Web
    Rich Enterprise Clients
    Bryan Hall, Spatial Architect, L-3 Communications
    Jeff Walawender, Senior Software Engineer, L-3 Communications
    Cost cutting requires reengineering spatial solutions to directly address business requirements. But enterprise computing for spatial data has, with even "Web 2.0", required the user to lose the responsiveness and feedback that traditional desktop thick client GIS software has provided. We took a different approach in the re-engineering effort and concentrated on making it work as much like a traditional desktop thick client - while simplifying use, making editing more reliable, and actually speeding up rendering. All this, while only supporting one versioned Oracle Spatial database, and application tier for all users.
    Complete eGovernment solution at City of Bolzano
    Stefan Putzer, CreaForm
    Giulio Lavoriero, Director of Engineering, CreaForm
    The City of Bolzano, Italy has a unique, complete editing and publishing environment for geographical data. The Oracle Spatial-based enterprise editing environment supports import and export into geospatial tools from Bentley and ESRI, and network modeling from Oracle Spatial. Data is shared with GeoJAX, an easy-to-use geographical web browser that uses the Oracle MapViewer framework in combination with J2EE and AJAX for browsing Oracle Spatial data. This provides a flexible viewer supports spatial queries, and can be fully customized (style and functionality). Users can easily import any kind of geographical data from an ESRI file, edit it with a CAD precision functionality and make those data visible to anyone via the web in a very short time.
    5:00 – 5:30 p.m.
    Closing Reception
    Questions about the Oracle Spatial Users Conference? Contact us!
    Phone: 303-337-0513 Fax: 303-337-1001 E-mail: [email protected]

    Hi:
    Some updates regarding the Oracle Spatial User Conference 2008.
    1 - Presentations are now available at
    http://www.oracle.com/technology/products/spatial/htdocs/spatial_conf_0803_idx.html
    All submitted presentations have been posted except for the 3:30 track B slides. Those will be available in a day or two.
    2 - Survey for Conference Attendees: If you attended the conference, please take a few minutes to complete the brief survey: http://www.zoomerang.com/Survey/survey-intro.zgi?p=WEB227LQXQUMMD.
    Take the survey by April 2 to be entered in a random drawing to receive a copy of the Pro Oracle Spatial for Oracle Database 11g book. We'll also give away 10 GITA shoulder bags.
    Thanks to the speakers, sponsors, and participants for a great conference!

  • Problem in Connection between MapServer and Oracle Spatial

    Hi Everybody,
    First i thanks Dan Abugov for quick reply fr my previous query.
    I am working on the Oracle Spatial and MapServer
    I want to clear that MapServer is not Oracle MapViewer, this is Open Source UMN MapServer.
    When I pass the query(shown below), the empty image is displayed in the browser without any map
    http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/sdocountry/sdocountry.map&layers=country&mode=map
    I created .map file (shown below) with the Oracle Spatial Connection.
    MAP
    DEBUG ON
    STATUS ON
    SIZE 800 600
    UNITS dd
    IMAGECOLOR 255 255 255
    PROJECTION
    "proj=latlong"
    "ellps=WGS84"
    END
    EXTENT -180 -45 180 45
    LAYER
    DEBUG ON
    PROJECTION
    "proj=latlong"
    "ellps=WGS84"
    END
    NAME "CountryMap"
    TYPE POLYGON
    CONNECTIONTYPE oraclespatial
    CONNECTION "world/land@orcl"
    DATA "shape FROM country USING SRID 8307"
    CLASS
    NAME "Country_Class"
    STYLE
    COLOR 250 250 0
    OUTLINECOLOR 32 32 32
    END
    END
    END
    END
    And Set the environment variable in the apache/conf/httpd.conf file as
    SetEnv ORACLE_BASE "d:/oracle/product/10.2.0"
    SetEnv ORACLE_HOME "d:/oracle/product/10.2.0/db_1"
    SetEnv ORACLE_SID "orcl"
    SetEnv TNS_ADMIN "d:/oracle/product/10.2.0/db_1/network/admin"
    This is the my whole Sample code and configuration, I dont know why the map image is not generating.
    I am not receving any error message.
    MapServer for windows (ms4w) binaries is downloaded from "maptools.org"
    System configuration
    Windows 2000 Advanced Server
    Oracle 10g with Oracle Spatial
    MapServer 4.6.1
    Apache/2.0.55 (Win32)
    I am waiting for the some solution, from you to over come this problem.
    Thanks & Regards,
    Prema Selvam
    GISbiz.

    Prema,
    If you haven't already, you may want to post this same question to one of the MapServer mail lists (http://mapserver.gis.umn.edu/community/mailinglists/) - most MapServer users/developers are very quick to respond as well.
    -Justin

  • How to display the data store in Oracle Spatial?

    Hello everyone,
    I am totally newbie in Oracle Spatial and to GIS in general. I have started playing around with Oracle Spatial and did an example which is to store a couple of polygons in Oracle and my question is: how to view/display the stored data (in my case the polygons) using Oracle?
    Thanks in advance

    Latvian83,
    thing is, most of the GIS data out there are in SHAPE format so does it make sense to convert [between formats]Depends.
    If you're a data producer that wants to ensure a single version of the truth across your company, then maintaining a central repository makes imminent good sense. The alternative would be people working on likely outdated snap-shots of data – stored on their PCs as well as duplicated on file-servers -- bumbling along creating derivatives and passing on the results as if they were valid... Anyhow, spatial analysts would also benefit from a single version of truth.
    Data consumers who just want the latest mashups may not want to be bothered with the translation in/out of a database.
    Then there’s a grey area with transformations: I've seem instances where it was more expedient to pull data into ArcMap for a massive transformation than performing a similar operation within Oracle.
    Regards,
    Noel
    (I'm sure you've already found it, but you can right-click on a legend entry on ArcMap's Table of Contents and find the Export to ShapeFile option on the context-menu.)

  • Oracle Spatial & Fusion MiddleWare MapViewer at Oracle OpenWorld

    If you happen to be attended OOW next week you will see a very large presence for our products. hands on labs, sessions, demos ...
    Look for us at Business Intelligence,Oracle Utilities, DigitalGlobe, Navteq, KPI Partners, and GE.
    Hope to meet some of you at the demo booth.
    thanks
    Steve
    Session ID      Session Title     Speaker(s)     Date/Time     Venue/Room      Presentation
    11 Record(s) Found
    S292934     IOUG Spatial SIG: Public Sector Geospatial Architecture built on the Oracle technology stack     Kevin Kelley, Cuyahoga County     Sunday 11/11/200710:00 AM - 11:30 AM     Moscone West2008 - L2                         
    S291477     Building Google-Like Map-Based Applications with Oracle Spatial 11g, Oracle MapViewer, and Oracle JDeveloper Application Development Framework Components     Jean Ihm, Oracle; Ji Yang, Oracle     Monday 11/12/200712:30 PM - 1:30 PM     HiltonContinental Ballroom 4                         
    S291480     Everything You Ever Wanted to Know About Oracle Spatial 11g and Oracle Fusion Middleware MapViewer     Steve Serra, Oracle; James Steiner, Oracle     Monday 11/12/200712:30 PM - 1:30 PM     Moscone South304                         
    S291479     Building Map-Based Business Intelligence Dashboards, Using Oracle Spatial 11g, Oracle Business Intelligence Enterprise Edition, and Oracle MapViewer     David Lapp, Oracle; Jayant Sharma, Oracle     Monday 11/12/20073:15 PM - 4:15 PM     HiltonContinental Ballroom 4                         
    S292299     Developing a Next-Generation Utility Network Management System with Oracle Database and Oracle Fusion Middleware      Robert Laudati, General Electric; James Steiner, Oracle     Monday 11/12/20074:45 PM - 5:45 PM     Westin SF Market StreetCity Room                         
    S293026     Oracle Utilities Work and Asset Management: Oracle Geospatial and Map Viewer--New Technology and a New Option      Rob Book, Oracle; Pat Caldwell, Oracle; Barry DeMartini, Oracle     Tuesday 11/13/20078:00 AM - 9:00 AM     Westin SF Market StreetFranciscan II                         
    S291563     Developing 3-D City Models with Oracle Spatial 11g and Google Earth      Ravi Kothuri, Oracle; Xavier Lopez, Oracle     Tuesday 11/13/20073:15 PM - 4:15 PM     HiltonContinental Parlor 9                         
    S291569     Building Secure Spatial Web Services, Using Oracle Spatial 11g and Oracle JDeveloper     Raja Chatterjee, Oracle; Jayant Sharma, Oracle     Tuesday 11/13/20074:45 PM - 5:45 PM     HiltonContinental Parlor 9                         
    S291628     Bridging the IT/OT Gap in Utilities, Using Oracle Technology and Spatial Capabilities      Ivan Albertini, Oracle; Tim Armitage, Oracle Corpration Australia Pty Ltd     Tuesday 11/13/20074:45 PM - 5:45 PM     Westin SF Market StreetStanford                         
    S291509     Oracle Spatial Best Practices and Tuning Tips for DBAs and Developers     Daniel Geringer, Oracle     Wednesday 11/14/200711:15 AM - 12:15 PM     Moscone South200 & 212                          
    S292598     Practical Application: GIS Mapping and Visualizations Integrated with Oracle Business Intelligence Enterprise Edition     Jerry Conrad, Oracle     Wednesday 11/14/200711:15 AM - 12:15 PM     Moscone West3022 - L3

    for more updates to schedule check out the main Spatial page.
    http://www.oracle.com/technology/products/spatial

Maybe you are looking for

  • No S-Video to TV output on PowerBook?

    I know this is a MacBook Pro forum, but I didn't get a reply over at the PowerBook forum. Hopefully there's someone with PowerBook knowledge in this forum. Yesterday I tried to hook up my sister's old 15" 1GHZ Ti Powerbook to her TV. The TV was black

  • Sample purchase order for import

    Hi, Can anyone explain how to handle the sample -import purchase order. Regards, Renuga.A

  • Genaral abap

    1)most commonly used command in Interactive Reporting? 2)Can you create a field without data element domain?   3)How can you change the style of Logo or type of Logo? 4)What the Object will be created when upload a Logo? 5)How did you upload Logo usi

  • What is the "search folders" tab for and how to set it up?

    Since my scratch disk is on my external HD and my project files will be on my system drive I am wondering what location I should set the search tabs folders at. If anyone knows what this a tab does exactly I would like to know. I am under the impress

  • How do I get the pc to upload calendar events to the cloudy?

    I cannot get calendar events posted on my windows 2007 outlook calendar but they are not showing up on the cloudy.  yes i refresh  the calendar and use the cloudy page  in Outlook calendar 2007.  It appears the refresh down loads but does not upload