Help for Oracle Spatial

Hi
Can anybody give me the code sample for a search condition like "6 miles around miami"
Thanx in Advance
Harry

Hello Harry,
try it like this:
prerequisites: table 'my_geotable' consists of column: 'item_geom_column'
and is spatial indexed.
select items from my_geotable mg
where sdo_relate( mg.item_geom_column,
mdsys.sdo_geometry(2003, 0, null, mdsys.sdo_elem_info_array ( 1,1003,1),
mdsys.sdo_ordinate_array( xp1, yp1, xp2, yp2, xp3,yp3, xp4,yp4, xp5,yp5, xp1,yp1)),
'MASK=INSIDE querytype=WINDOW') = 'TRUE';
-- Polygon xp1,yp1 - xpn,ypn covers area of 6 miles arround miamy
or:
select items from my_geotable mg
where sdo_within_distance( mg.item_geom_column,
mdsys.sdo_geometry(2003, 0, null, mdsys.sdo_elem_info_array ( 1,1003,1),
mdsys.sdo_ordinate_array( xp1, yp1, xp2, yp2, xp3,yp3, xp4,yp4, xp5,yp5, xp1,yp1)),
'DISTANCE=6 querytype=WINDOW') = 'TRUE';
-- Polygon xc1,yc1 - xcn,ycn covers area of miamy city.
! the unit of the geometrical measuement is used from the unit of the geometry
! unit of geodetic comparision is not displayed by this example but geodetic koordinates
such as 15E43/36N30 will resut to be measured on shortest-spherical distance in meters.
So you have to convert your koordinate-system to fit to each other.
CU
Stefan

Similar Messages

  • Where is the documentation for Oracle Spatial Relational Model?

    Hi,
    I'm working with Oracle Spatial for my schema model. In the documentation "Oracle Spatial User's Guide and Reference" there is a note about what this is in OTN but i don't find it!!
    Can anybody help me, where I find the "Oracle Spatial Relational Model Guide and Reference"?

    Thanks! But just i have read this information. And in the documentation for spatial 9.0.1 there is one document only, and in this document there is a Note that reference to nonexistent document with title "Oracle Spatial Relational Model Guide and Reference" this is the document that i'm searching.
    Thank you for your help!

  • Online Help for Oracle HRMS Self Service System

    I am looking into developing context-sensitive online help for an Oracle HRMS Self Service application. There is currently no online help for the application; all help is provided in printed and online docs, so users are having trouble navigating to the info they need. Help is needed! My initial questions are:
    Would I need to create OHJ or OHW?
    Could I use RoboHelp to develop the content?
    Is there a reference document you can point me to?
    Thanks
    Belinda

    Hi Belinda,
    You would create Oracle Help, and then deploy it using OHJ or OHW.
    The format of the help is the same. There is nothing specific that needs to be done for one or the other. If your system i s a Web application, you would use OHW and otherwise, you would use OHJ.
    You can read more about Oracle Help on OTN at http://www.oracle.com/technology/tech/java/help/index.html.
    (Read the FAQ for more information about the choice between OHJ and OHW.)
    Personally, I would not recommend RoboHelp to create Oracle Help. RoboHelp has a lot of nice features, but the Oracle Help output feature is fairly buggy, especially if you are creating a large helpset, or a helpset that has subhelpsets.
    At Oracle, a lot of help development is done using DreamWeaver and an in-house build tool, called the Oracle Help Build Tool. This is available for free. Send me a mail ([email protected]) if you want a copy.
    Regards,
    Pete

  • I need help on Oracle Spatial

    Hello;
    I4m about to develop an application using your Spatial cartridge, but i4m not sure if it4s the best way to do it. Well, this application must store images caracteristics, but in more than 3 dimensions, i haven4t found any information about this, in the documents I found in your web site. I4d be very pleased if you could give me some information about if this cartridge is the best way to develop my application and how could Ido it.
    Thanks very much for your time, Cmc
    null

    Hi what connection types do you mean please.I am new to oracle 10g and oracle spatial.I can find my way round 10g but not spatial.in this case please what options would you suggest.Thanks

  • Spatial license for oracle.spatial.util classes ?

    Who knows if a spatial license is needed in order to use the oracle.spatial.util.* classes?

    You can use ST_GEOMETRY as part of Locator.
    But you might be better off using sdo_util.from_wktgeometry() function.
    Or these two constructor functions of SDO_GEOMETRY:
    METHOD
    FINAL CONSTRUCTOR FUNCTION SDO_GEOMETRY RETURNS SELF AS RESULT
    Argument Name Type In/Out Default?
    WKT CLOB IN
    SRID NUMBER IN DEFAULT
    METHOD
    FINAL CONSTRUCTOR FUNCTION SDO_GEOMETRY RETURNS SELF AS RESULT
    Argument Name Type In/Out Default?
    WKT VARCHAR2 IN
    SRID NUMBER IN DEFAULT
    siva

  • Missing all images in help for Oracle BC Browser

    It is no images in Oracle Business Component Browser help topic.

    Hello,
    I noticed the same thing.
    In my case (when I noticed this) it was in the Property Inspector (for an Table Form Object)
    Simply press F1 -> a help windows opens but all pics in there are empty boxes.
    Andre

  • Request help for oracle installation

    We are planning to install Oracle 11g on Windows 2003 Enterprise having 2 nodes clusters.
    We would like to have info: on the installation steps
    Thanks

    787060 wrote:
    We are planning to install Oracle 11g on Windows 2003 Enterprise having 2 nodes clusters.
    We would like to have info: on the installation steps
    Thanks11gR1 or 11gR2? which version you want to install?
    refer oracle installation guides, its better and helpful to avoid unnecessary headaches.
    REFER:
    http://tahiti.oracle.com/
    And find clusterware installation guide for 11gR2 or 11gR1.
    Hope, this will helps you.

  • HELP for Oracle DBServer installation on SUSE 8.0

    Hello!
    I try to install 8.1.7 version on SUSE 8.0, but I get runtime error when I run runInstaller (something like segmentation failure). I think problem is in kernel parameters (SEM.. etc). I try to set them following in installation instruction but I don't know what goes wrong.
    Please, could anybody tell me or send me scripts for this parameter setting or any instruction!
    Thanks everybody!

    I've had simular problems with installing oracle on suse.
    try www.suse.com/oracle there you have a download to resolve the kernal problems.

  • Need help for Oracle forms 10.1.2

    Hi , I have installed oracle form 10g application in one of my linux box ( 64 bit) , After bringing up the servers , the system-linux box is getting rebooted automatically . Please help as the Everytime the servers are going down along with the machine.

    My shop uses that version of Forms. 64 bit Linux gave us so much trouble we installed 32 bit Linux on the 64 bit hardware.
    Correct me if I'm wrong, but I don't think there's a 32 bit version of the oracle software so 64 bit Linux does not give you anything.
    Best Regards
    mseberg

  • Documentation for Oracle 10g spatial

    Hi,
    Is there any documentation avilable for oracle spatial 10g ?
    Any link would be helpfull.
    Regards
    Vikesh

    http://otn.oracle.com/pls/db10g/portal.portal_demo3?selected=3#index-SPA
    http://download-west.oracle.com/docs/cd/B13789_01/appdev.101/b10826/toc.htm

  • Loading shapefiles into Oracle Spatial

    Fellow Oracle Spatiallers!
    Currently we edit Oracle Spatial data by checking data out into a shapefile,
    making our changes off-line, and reloading the shapefile back into Oracle.
    Instead of using the Oracle Spatial supplied tool, we decided to purchase
    a utility called the "Spatial Loader" from a company called Geometry Pty Ltd
    (http://www.geometryit.com). There are a number of reasons why we decided to
    go that way which might become evident from the command line parameters of
    this utility:
    Usage: Shp2Spt [Arguments] [Options]
    OR
    Usage: Java com.geometryit.spatialloader.oracle.AdvancedJavaSpatialTranslator [Arguments] [Options]
    [Arguments] must specify these values:
    -o create
    type of operation to perform
    create creates a new table, must not exist already
    recreate creates a new table, may exist already
    init drops existing table, creates a new one
    append appends data onto existing table
    -f <shape_file>
    the shape file or project to translate
    -l <table,column>
    target table and column for the geometry data
    -D <database>
    target database name
    -u <username>
    username for RDBMS
    -p <password>
    password for RDBMS
    [Options] values are not necessarily required:
    -s <server_name>
    name of server with database
    -port <port_number>
    the port to connect to on the server
    -ufi <column_name>
    specify the name of the UFI field (unique ID)
    -seq <sequence_name>
    specify the sequence to use for the spatial data unique IDs
    -a none
    attributes mode
    none no attributes will be transferred
    all all attribtues will be transfered as found
    file= file containing lines of the form:
    <shape_attribute><space/tab><rdbms_column>
    where
    <shape_attribute> selects the column to be output
    <rdbms_column> name of the column in RDBMS
    -srid <id>
    specify the Spatial Reference ID for the spatial data
    (this must be set to use Spatial Reference Transformations)
    -i [<level>] or -i rtree
    create an index for the generated table
    the <level> parameter is an optional integer
    representing the depth of the quadtree created
    if rtree is specified, the index created will be
    an rtree
    -c <commit_interval>
    number of rows to commit after
    -t <tolerance>
    tolerance value for metadata
    -r none
    used to determine number of decimal places to round vertices to
    if you use the tolerance-parameter option, specify the -t parameter before -r
    -igc
    ignore geometry collections
    -sgc
    split geometry collections
    -sgd f
    split geometry direction [forward | reverse]
    -update-metadata <true/false>
    update the Oracle Spatial Metadata table after loading data
    -validate <true/false>
    perform Oracle Spatial validation after loading data
    -v
    verbose mode on
    -h or -?
    display this help message
    The main things I like about this tool are:
    1. One step (no conversion to sqlloader form followed by a call to the sqlloader).
    2. The ability to round the coordinates of the shapes in the shapefile by applying
    the XY tolerance values held in the SDO_GEOM_METADATA table.
    This is quite important because our editing package - due to double/single precision
    issues - can actually move coordinates but those movements are sub the precision of
    the actual data. By rounding to the nominate precision we can detect situations where
    no actual change to the shape (and its attributes) was made and thus not create superfluous
    revisions within the database.
    3. It will correctly re-wind the coordinates of the outer/inner shells of polygons. This is
    important as ESRI shapefiles are agnostic on the winding order: an outer shell coordinates
    can be listed in either clockwise or anti-clockwise order.
    4. You can specify the primary key (UFI) column (numeric) and an Oracle Sequence number such
    that each new shape loaded can have its UFI assigned from that sequence.
    Because of this flexibility, and the excellent support (it is a purchasable product) from the
    developers, I can heartily recommend this loader to fellow Spatiallers. It is worth every
    penny I spent on it. Try the free version on their website and if, like me, you like it,
    purchase it!
    regards
    Simon

    Hi Shuan,
    As part of the zip file created for the next training course to be posted for Oracle Spatial on OTN (within the next few weeks) there is a free (unsupported, undocumented) version of a shape to sdo converter. This should work, but it is unsupported. It will create a layer that then needs to be migrated into 8.1.6 format.
    If you need it quite soon send email to [email protected] and I can get it to you.
    Hope this helps,
    dan

  • 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

  • Oracle Spatial 10g R2 Java API

    Hi All,
    I have a JAVA tool said to be written for Oracle Spatial 10g R2 Java API which uses for example the class oracle.spatial.georaster.JGeoRaster. I have to port it to 11g R2. The tool is definitely written for an earlier version, because compilation fails on for example JGeoRaster.getProperties() method which is not present in the new API. For this new API I have a fine Javadoc documentation here:
    http://download-llnw.oracle.com/docs/html/E11829_01/
    I have searched for a similar one for 10g R2 but found only like
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14373/toc.htm
    which misses the oracle.spatial.georaster package. Is there such a package and if so, where can I find docs for it?
    thank you in advance, best regards: Balázs Bámer

    Hi Balázs,
    the GeoRaster Java API was first released with 11gR2. Your first link points to that, or this link:
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e11829/toc.htm
    your second link points to 10g Oracle Spatial Java API, which doesn't include any GeoRaster related API. your tool might have been developed based on the old INTERNAL georaster jar file, which is not supposed to be used by your java program. But if you do want the api doc, you can run javadoc or jdeveloper to find out the api from the old sdogr.jar file.
    jeffrey

  • Basic query in Oracle Spatial

    I'm trying to learn Oracle Spatial working with 11g R2 and with 3D georeferenced data (specifically data describing buildings in a city).
    But I'm having trouble getting a basic query to work on my dataset (it works for the book example), and I'm trying to do it exactly the way it's done in the Spatial Developer's Guide for 11g.
    To learn how spatial queries work, I set up the cola_markets tables used in the book, made the appropriate manual entry in the user_sdo_geom_metadata view and created the index. Having done that, I can run the following simple query (as well as the others in the manual) on the book tables:
    SELECT SDO_GEOM.SDO_DISTANCE(c_b.shape, c_d.shape, 0.005)
    FROM cola_markets c_b, cola_markets c_d
    WHERE c_b.name = 'cola_b' AND c_d.name = 'cola_d';
    but when I try to do the same thing on my own tables (created from citygml data), I get an error. There is the difference that the data is 3D, and the index was created without any PARAMETERS ( ... ), hence is just 2D. But still I don't get why the following query doesn't work:
    SELECT SDO_GEOM.SDO_DISTANCE(c_w.envelope, c_b.envelope, 0.0005)
    FROM cityobject c_w,
         cityobject c_b
    WHERE c_w.id = 50025
         AND c_b.id = 50018;
    The id's for the buildings are valid, and I used the same tolerance used by the software that set up the database.
    Here's the error I get in SQL developer:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.Exception: 54535
    ORA-06512: at "MDSYS.SDO_3GL", line 637
    ORA-06512: at "MDSYS.SDO_GEOM", line 1973
    ORA-06512: at "MDSYS.SDO_GEOM", line 1990
    29532. 00000 - "Java call terminated by uncaught Java exception: %s"
    *Cause: A Java exception or error was signaled and could not be
         resolved by the Java code.
    *Action: Modify Java code, if this behavior is not intended.
    So, thinking it might have something to do with the fact that it's a Java interface, I also tried running it from SQL/PL command line and get essentially the same thing:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    java.lang.Exception: 54535
    ORA-06512: at "MDSYS.SDO_3GL", line 637
    ORA-06512: at "MDSYS.SDO_GEOM", line 1973
    ORA-06512: at "MDSYS.SDO_GEOM", line 1990
    Any ideas why this isn't working?
    (P.S.: I couldn't find a specific board for Oracle Spatial, hence put this question here--if there's a better place for this question, then, admins, of course, feel free to move the thread to the appropriate spot)

    Hi,
    The SPATIAL forum is here : {forum:id=76}

  • Oracle Spatial Training

    I am looking for Oracle spatial training anywhere in the US. Has any one ever taken this training woth Oracle before? What was your experience? Is there anyone other than Oracle that offers this training?
    null

    I have been investigating this for our group. Training for Oracle Spatial is not offered through Oracle University, what is offered is a consulting service known as "Spatial Quick Start". If you contact Justin Winter ([email protected]) he can send you the information. Good Luck...

Maybe you are looking for

  • HTTP RECEIVER QUERY

    hello everyone, I have to develop a synchronous scenario, SOAP Sender to HTTP Receiver. Soap sender will be passing suppose 2 fields Name and Employeeid and the Http receiver will be replying back the  response with entire employee details (name, id,

  • In Process Inspection for Repetitive Manufacturing

    Hi All, I'm trying to perform in-process inspection for repetitive manufacturing. I have a semi finished material which has the inspection type 13 activated in the material master. Rate routing for it has also been created. Characteristics have been

  • L505-S6946 HDD PARTITIONS @ WINDOWS VISTA

    Hi everyone i need some help or plz correct me if im wrong. Im using a L505-S6946 Satellite Toshiba, it came with vista home with only 1 partition, with the manage computer and shrink option (in the Disk Managment), i split in 2 partitions, but my pr

  • Backup error on DB13

    Hi,     When iam taking backup through Transaction code : DB13 on maxdb database,iam getting error as below. Name and Server     : LBI - lgsbi DBMRFC Function     : DBM_EXECUTE Command             : medium_put "comp_bkp" "/extra_64/LBI_BKP" FILE DATA

  • Message Rules Problem

    I have 2 IMAP accounts, one from the university where I work, and another for personal use with lots of storage space. While I have plenty of quota on both accounts, I want to be able to make a backup copy of my University emails as they come in to m