Oracle Spatial 8.1.7 r-tree indexes

I don't think this problem is specific to r-tree indexes vs. quad-tree.
Even though I specify a tablespace other than the SYSTEM tablespace in Oracle Spatial Index Advisor when creating r-tree indexes, the index is still created in the SYSTEM tablespace. I don't want my spatial indexes in the SYSTEM tablespace!
select tablespace_name from user_indexes where index_name = 'GPS_IDX';
TABLESPACE_NAME
SYSTEM
Here is the sql statement that Spatial Index Advisor constructed:
create index gis.gps_idx on gis.gps (geometry) indextype is mdsys.spatial_index parameters ('sdo_indx_dims=2');
I was not able to issue this sql from worksheet with the tablespace option added. Is there a way to do that?
In Spatial Index Advisor, if I don't select the geometry column, then the sql is constructed with the tablespace option added, but when I select the geometry column, it removes it from the sql.
Can anybody shed some light on how to do this?
thanks
Dave

Spatial creates an index entry in the system tablespace but realy creates the spatial index in the tablespace you gave it. To verify it execute the select:
select table_name,tablespace_name
from user_tables
where table_name like 'spatial_table%';
It will return your table_name plus the spatial index table created for it.
The table_name will look something like this:
spatial_table_SX_FL10$.
spatial_tables beeing your spatial table.
You can query the same for the indexes built on that previous table.
select index_name,tablespace_name
from user_indexes
where table_name = 'SPATIAL_TABLE_SX_FL10$';
The two index names would look like:
spatial_table_sx_fl10$B1
spatial_table_sx_fl10$B2
They should be created in the tablespace mentionned in your tablespace clause when creating the spatial index.
Hope this helps

Similar Messages

  • ERROR BUILDING SPATIAL R-TREE INDEX

    I tried building an R-tree index on a spatial table containing latitude/longitude points. There are only 9000 records in the table.
    I get the following error:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-13200: internal error [Unsupported Type] in spatial indexing.
    ORA-06512: at "MDSYS.SDO_INDEX_METHOD_9I", line 7
    ORA-06512: at line 1
    Can anyone help?

    MY ORACLE version number is 9.0.1.0.0
    My table name is GEOM_FIX, the column that I tried to index is FIX_NAME VARCHAR2, where FIX_NAME is a unique identifier.
    My spatial index create script is:
    CREATE INDEX NDX_GEOM_FIX ON GEOM_FIX (FIX_NAME)
    INDEXTYPE IS MDSYS.SPATIAL_INDEX

  • Oracle spatial Indexing

    Hi Guru's
    I am newby to Oracle spatial. Working as Database Admin.
    I want information about spatial indexing like creation, maintenence ..etc.
    It would be a great help if you can refer any relevant documents, articles or presentations.
    Thanks in advance
    Cheers
    Antony

    Welcome Antony
    First place to start is the user documentation:
    http://download.oracle.com/docs/html/B14255_01/toc.htm
    start reading on the indexing here:
    http://download.oracle.com/docs/html/B14255_01/sdo_intro.htm#sthref98
    As an alternative/added value the Pro Oracle Spatial book is also a very good reference.
    http://www.oracle.com/technology/products/spatial/htdocs/pro_oracle_spatial.html
    there is also a second version for 11g.
    For the maintenance, certainly from a DBA point of view, it is worthwhile looking at Radius Check. The lightweight free version offers an easy overview on the geometry tables, their metadata and their spatial indexes.
    The professional version also gives Checks for invalid geometries with fixing capabilities.
    On the Oracle Spatial Download page (http://www.oracle.com/technology/products/spatial/htdocs/spatial_partners_downloads.html), you can find the link second at the top to the webpage of Radius Check (http://www.1spatial.com/products/radius_check/index.php).
    Good Luck
    Luc
    Edited by: lucvanlinden on Nov 14, 2008 8:45 AM

  • 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

  • Simon Greener's Morton Key Clustering in Oracle Spatial

    Hi folks,
    Apologies for the rambling.  With mattyschell heading for greener open source big apple pastures I am looking for new folks to bounce ideas and code off.  I was thinking this week about the discussion last autumn over spatial clustering.
    https://community.oracle.com/thread/3617887
    During the course of the thread we all kind of pooh-poohed spatial clustering as not much of solution, myself being one of the primary poohers.  Yet the concept certainly remains as something to consider regardless of our opinions.  The yellow book, the Greener/Ravada book, Simon's recent treatise (http://download.oracle.com/otndocs/products/spatial/pdf/biwa_2015/biwa2015_uc_comparativeperformance_greener.pdf), they all put forward clustering such that at the very least we should consider it a technique we should be able as professionals to do - a tool in the toolbox whether or not it always is the right answer.  I am mildly (very mildly) curious to see if Kothuri, Godfrind and Beinat will recycle their section on spatial clustering with the locked-down MD.HHENCODE into their 12c revision out this summer.  If they don't then what is the replacement for this technique?  If they do then we return to all of our griping about this ancient routine that Simon implies may date back to the CHS and their hhcode indexes - at least its not written in Java! 
    Anyhow, so I've been in the midst this month of refreshing some of the datasets I manage and considering clustering the larger tables whilst I am at it.  Do I really expect to see huge performance gains?   Well... not really.  But it does seem like something that should be easy to accomplish, certainly something that "doesn't hurt" and shows that I am on top of things (e.g. "checks the box").  But returning to the discussion from last fall, just what is the best way to do this in Oracle Spatial?
    So if we agree to ignore poor old MD.HHENCODE, then what?  Hilbert curves look nifty but no one seems to be stepping up with the code for them.  And this reroutes us back around to Simon and his Morton key code.
    http://www.spatialdbadvisor.com/oracle_spatial_tips_tricks/138/spatial-sorting-of-data-via-morton-key
    So who all is using Simon's code currently?  If you read that discussion from last fall there does not seem to be anyone doing so and we never heard back from Cat Person on either what he decided to do or what his name is.
    I thought I could take a stab at streamlining Simon's process somewhat to make things easier for myself to roll this onto many tables.  I put together the following small package
    https://github.com/pauldzy/DZ_SDO_CLUSTER/tree/master/Packages
    In particular I wanted to bundle up the side issues of how to convert your lines and polygons into points, automate things somewhat and provide a little verification function to see what results look like.  So again nothing that Simon does not already walk through on his webpage, just make it bit easier to bang out on your tables without writing a separate long SQL process for each one.
    So for example to use Simon's Morton key logic, you need to know the extent envelope of the data (in order to define a proper grid).  So if its a large table, you'd want to stash the envelope info in the metadata.  You can do this with the update_metadata_envelope procedure or just suffer through the sdo_aggr_mbr each time if you don't want to go that route (I have one table of small watershed polygons that takes about 9 hours to run sdo_aggr_mbr upon).  So just run things at the sql prompt
    SELECT
    DZ_SDO_CLUSTER.MORTON_UPDATE(
        p_table_name => 'CATCHMENT_NP21'
       ,p_column_name => 'SHAPE'
       ,p_grid_size => 1000
    FROM dual;
    This will return the update clause populated with the values to use with the morton_key wrapper function, e.g. "morton_key(SHAPE,160.247133275879,-17.673722530871,.0956820001136141,.0352063207508021)".  So then just paste that into an update statement
    UPDATE foo
    SET my_morton_key = dz_sdo_cluster.morton_key(
        SHAPE
       ,160.247133275879
       ,-17.673722530871
       ,.0956820001136141
       ,.0352063207508021
    Then rebuild your table sorting on the morton_key.  I just use the TOAD rebuild table tool and manually add the order by clause to the rebuild script.  I let TOAD do all the work of moving the indexes, constraints and grants to the new table.  I imagine there are other ways to do this.
    The final function is meant to be popped into Oracle mapviewer or something similar to show your family and friends the results.
    SELECT
    dz_sdo_cluster.morton_visualize(
        'NHDPLUS'
       ,'NHDFLOWLINE_NP21_ACU'
       ,'SHAPE'
       ,'OBJECTID'
       ,'100'
       ,10000
       ,'MORTON_KEY'
    FROM dual;
    Look Mom, there it is!
    So anyhow this is first stab at things and interested in feedback or suggestions for improvement.  Did I get the logic correct?  Don't spare my feelings if I botched something.  Note that like Simon I passed on the matter of just how to determine the proper grid size.  I've been using 1000 for the continental US + Hawaii/PR/VI and sitting here this morning I think that probably is too large.  Of course it depends on the size of the geometries and thus the density of the resulting points.  With water features this can vary a lot from place to place, so perhaps 1000 is okay.  What would the algorithm be to determine a decent grid size?  It occurs to me I could tell you the average feature count per morton key value, okay well its about 10.  That seems small to me.  So I could see another function in this package that returns some kind of summary on the results of the keying to tell you if your grid size estimate was reasonable.
    Cheers and Happy Saturday,
    Paul

    I've done some spatial clustering testing this week.
    Firstly, to reiterate the purpose of spatial clustering as I see it:  spatial clustering can be of benefit in situations where frequent window based spatial queries are made.  In particular it can be very useful in web mapping scenarios where a map server is requesting data using SDO_FILTER or SDO_ANYINTERACT and there is a need to return the data as quickly as possible.  If the data required to satisfy the query can be squeezed into as few blocks as possible, then the IO overhead is clearly reduced.
    As Bryan mentioned above, once the data is in the buffer cache, then the advantage of spatial clustering is reduced.  However it is not always possible to get/keep enough of the data in the buffer cache, so I believe spatial clustering still has merits, particularly if it can be implemented alongside spatial partitioning.
    I ran the tests using an 11.2.0.4 database on my laptop.  I have a hard disk rather than SSD, so the effects of excessive IO are exaggerated.  The database is configured with the default 8kb block size.
    Initially, I created a table PARCELS:
    create table parcels (
    id            integer,
    created_date  date,
    x            number,
    y            number,
    val1          varchar2(20),
    val2          varchar2(100),
    val3          varchar2(200),
    geometry      mdsys.sdo_geometry,
    hilbert_key  number);
    I inserted 2.8 million polygons into this table.  The CREATED_DATE is the actual date the polygons were captured.  I populated val1, val2 and val3 with string values to pad the rows out to simulate some business data sitting alongside the sdo_geometry.
    I set X,Y to the first ordinate of the polygon and then set hilbert_key = sdo_pc_pkg.hilbert_xy2d(power(2,31), x, y).
    I then created 4 tables to base the tests upon:
    PARCELS_RANDOM:  Ordered by dbms_random.random - an absolute worst case scenario.  Unrealistic, but worthwhile as a benchmark.
    PARCELS_BASE_DATE:  Ordered by CREATED_DATE.  This is probably pretty close to how the original source data is structured on disk.
    PARCELS_RTREE:  Ordered by RTree.  Achieved by inserting based on an SDO_FILTER query
    PARCELS_HILBERT:  Ordered by the hilbert_key attribute
    As a first test, I counted the number of blocks required to satisfy an SDO_FILTER query.  E.g.
    select count(distinct(dbms_rowid.rowid_block_number(rowid)))
    from parcels_rtree
    where sdo_filter(geometry,
                    sdo_geometry(2003, 2157, null, sdo_elem_info_array(1, 1003, 3),
                                    sdo_ordinate_array(644232,773809, 651523,780200))) = 'TRUE';
    I'm assuming dbms_rowid.rowid_block_number(rowid) is suitable for this.
    I ran this on each table and repeated it over three windows.
    Results:
    So straight off we can see that the random ordering gave pretty horrific results as the data required to satisfy the query is spread over a large number of blocks.  The natural date based clustering was far better. RTree and Hilbert based clustering reduced this by a further 50% with Hilbert just nosing out RTree.
    Since web mapping is the use case I am most likely to target, I then setup a test case as follows:
    Setup layers in GeoServer for each of the tables
    Used a script to generate 1,000 random squares over the extent of the data, ranging from 200m to 500m in width and height.
    Used JMeter to make a WMS request for a png of the each of the 1,000 windows.  JMeter was run sequentially with just one thread, so it waited for each request to complete before starting the next.  I ran these tests 3 times to balance out the results, flushing the buffer cache before each run.
    Results:
    Again the random ordering performed woefully bad - somewhat exacerbated by the quality of the disk on my laptop.  The natural date based clustering performed far better.  RTree and hilbert based clustering further reduced the time by more than half.
    In summary, the results suggest that spatial clustering is worth the effort if:
    the data is not already reasonably well clustered
    you've got a decent quantity of data
    you're expecting a lot of window based queries which need to be returned as quickly as possible
    you don’t expect to be able to fit all the data in the buffer cache
    When it comes to deciding between RTree and Hilbert (or Morton/z-order or any other space filling curve method).... I found that the RTree method can be a bit slow on large datasets, although this may not matter as a one off task.  Plus it requires a spatial index on the source table to start off with.  The key based methods are based on an xy, so for lines and polygons there is an intermediate step to extract an xy.  I would tend to recommend this approach if you also partition the data based on a subset of the cluster key.
    Scripts are available here: https://github.com/john-otoole/oracle_spatial_cluster_test
    John

  • Discuss the componet of Oracle "Oracle Spatial "

    Hi,Everyone!
    I'm studing the spatial index with the oracle spatial,cause the oracle have two index methods: R-tree and Quadtree.The index I have completed!
    Now,I have some problem whit performance test.I didn't kown how complete the performance test(such as:need some space when it index,time with query.)

    Hi,Everyone!
    I'm studing the spatial index with the oracle spatial,cause the oracle have two index methods: R-tree and Quadtree.The index I have completed!
    Now,I have some problem whit performance test.I didn't kown how complete the performance test(such as:need some space when it index,time with query.)

  • Very slow queries when using oracle spatial

    Hi,
    I am new to oracle, please help with me the problem that I am facing.
    I am storing spatial regions inside the data base. The data is in very simple in form. That is each region is a small rectangle. The boundaries of rectangle touch each other but they do not overlap. Basically I am filling the 2D space with rectangles.
    I use the SDO_FILTER query to find regions inside the data base that intersect with a line. The data base contains a single table. With one column of type SDO_GEOMETRY. And the table has around 25000 tuples.
    The problem is that when the result of the query is large (70% of the tuples) that means there are many regions in the cache that intersect the line, the amount of time it takes is a lot more(6 times) than if I do the same without using the R Tree.
    I can do it without using the R Tree because all my objects are rectangles. I store the the left bottom and the top right corner of the rectangle in the data base. And then use a simple range query.
    Is this behaviour expected? should I use an R Tree index structure, or something else. I know that when the result is very large the R Tree search will have to search many sub trees to retrieve the data points. But should the performance be worse than a sequential scan?
    Or will indexes only work for cases where the selectivity of the query is high?
    Please reply I need help,
    Thank you,
    Nishant

    Hi,
    I am using the version of spatial that we get with Oracle9i Release 2 (9.2.0.1) or it could be
    Oracle 9i release 2 (9.2.0.2).
    I don't know how to check that.
    Here I provide the create script, create index statement and a few sample data items that I insert into the data base.
    Create Script:
    create table out5d(
    ID                          NUMBER(9),
    PID NUMBER(9),
    X                          NUMBER,
    Y NUMBER,
    L NUMBER,
    PL NUMBER,
    shape                          MDSYS.SDO_GEOMETRY,
    HEIGHT                         NUMBER,
    N                          NUMBER(9),
    d0 NUMBER,
    d1 NUMBER,
    d2 NUMBER,
    d3 NUMBER,
    d4                         NUMBER,
    D0_MAX NUMBER,
    D1_MAX NUMBER,
    D2_MAX NUMBER,
    D3_MAX NUMBER,
    D4_MAX NUMBER,
    D0_MIN NUMBER,
    D1_MIN NUMBER,
    D2_MIN NUMBER,
    D3_MIN NUMBER,
    D4_MIN NUMBER);
    alter table out5d
    add constraint keyConstraint
    primary key (ID);
    Create Index:
    INSERT INTO USER_SDO_GEOM_METADATA VALUES ('out5d' , 'shape' , MDSYS.SDO_DIM_ARRAY( MDSYS.SDO_DIM_ELEMENT('X', 0, 1, 0.0000001), MDSYS.SDO_DIM_ELEMENT('Y', 0, 1, 0.0000001) ), NULL);
    CREATE INDEX out5d_rtree ON out5d(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    I changed the fan out to 50. Because I read in the spatial user guide that in case you are expecting a big output result you should increase the fan out to 50 or 60.
    Also here is a sample data items that I inserted into the tables.
    insert into out5d Values (25129,17556,0.804932,0.804993,0,NULL,NULL,NULL,1,0.298039,0.5,0.243137,0.222222,0.266667,0.298039,0.5,0.243137,0.222222,0.266667,0.298039,0.5,0.243137,0.222222,0.266667);
    insert into out5d Values (25130,17556,0.804993,0.805054,0,NULL,NULL,NULL,1,0.290196,0.494681,0.235294,0.222222,0.266667,0.290196,0.494681,0.235294,0.222222,0.266667,0.290196,0.494681,0.235294,0.222222,0.266667);
    insert into out5d Values (25131,19920,0.371094,0.371155,0,NULL,NULL,NULL,1,0.337255,0.734043,0.262745,0.239316,0.357576,0.337255,0.734043,0.262745,0.239316,0.357576,0.337255,0.734043,0.262745,0.239316,0.357576);
    insert into out5d Values (25132,19920,0.371155,0.371216,0,NULL,NULL,NULL,1,0.345098,0.723404,0.270588,0.239316,0.357576,0.345098,0.723404,0.270588,0.239316,0.357576,0.345098,0.723404,0.270588,0.239316,0.357576);
    insert into out5d Values (25133,19920,0.371216,0.371277,0,NULL,NULL,NULL,1,0.352941,0.734043,0.262745,0.247863,0.363636,0.352941,0.734043,0.262745,0.247863,0.363636,0.352941,0.734043,0.262745,0.247863,0.363636);
    insert into out5d Values (25134,19920,0.371277,0.371338,0,NULL,NULL,NULL,1,0.345098,0.728723,0.262745,0.247863,0.363636,0.345098,0.728723,0.262745,0.247863,0.363636,0.345098,0.728723,0.262745,0.247863,0.363636);
    insert into out5d Values (25135,17615,0.298706,0.298767,0,NULL,NULL,NULL,1,0.231373,1,0.262745,0.589744,0.606061,0.231373,1,0.262745,0.589744,0.606061,0.231373,1,0.262745,0.589744,0.606061);
    insert into out5d Values (25136,17615,0.298767,0.298828,0,NULL,NULL,NULL,1,0.223529,1,0.270588,0.589744,0.606061,0.223529,1,0.270588,0.589744,0.606061,0.223529,1,0.270588,0.589744,0.606061);
    insert into out5d Values (25137,17615,0.298828,0.298889,0,NULL,NULL,NULL,1,0.231373,1,0.262745,0.598291,0.618182,0.231373,1,0.262745,0.598291,0.618182,0.231373,1,0.262745,0.598291,0.618182);
    insert into out5d Values (25138,17615,0.298889,0.29895,0,NULL,NULL,NULL,1,0.231373,1,0.270588,0.589744,0.612121,0.231373,1,0.270588,0.589744,0.612121,0.231373,1,0.270588,0.589744,0.612121);
    insert into out5d Values (25139,19918,0.518127,0.518188,0,NULL,NULL,NULL,1,0.584314,1,0.152941,0.282051,0.412121,0.584314,1,0.152941,0.282051,0.412121,0.584314,1,0.152941,0.282051,0.412121);
    insert into out5d Values (25140,19918,0.518188,0.51825,0,NULL,NULL,NULL,1,0.572549,1,0.160784,0.282051,0.418182,0.572549,1,0.160784,0.282051,0.418182,0.572549,1,0.160784,0.282051,0.418182);
    insert into out5d Values (25141,19918,0.51825,0.518311,0,NULL,NULL,NULL,1,0.572549,0.994681,0.152941,0.282051,0.412121,0.572549,0.994681,0.152941,0.282051,0.412121,0.572549,0.994681,0.152941,0.282051,0.412121);
    insert into out5d Values (25142,19918,0.518311,0.518372,0,NULL,NULL,NULL,1,0.576471,1,0.160784,0.282051,0.412121,0.576471,1,0.160784,0.282051,0.412121,0.576471,1,0.160784,0.282051,0.412121);
    insert into out5d Values (25143,23411,0.193237,0.193298,0,NULL,NULL,NULL,1,0.211765,1,0.145098,0.196581,0.218182,0.211765,1,0.145098,0.196581,0.218182,0.211765,1,0.145098,0.196581,0.218182);
    insert into out5d Values (25144,23411,0.193298,0.193359,0,NULL,NULL,NULL,1,0.219608,1,0.145098,0.196581,0.212121,0.219608,1,0.145098,0.196581,0.212121,0.219608,1,0.145098,0.196581,0.212121);
    insert into out5d Values (25145,23411,0.193359,0.19342,0,NULL,NULL,NULL,1,0.219608,1,0.145098,0.196581,0.206061,0.219608,1,0.145098,0.196581,0.206061,0.219608,1,0.145098,0.196581,0.206061);
    insert into out5d Values (25146,23411,0.19342,0.193481,0,NULL,NULL,NULL,1,0.219608,0.994681,0.152941,0.188034,0.218182,0.219608,0.994681,0.152941,0.188034,0.218182,0.219608,0.994681,0.152941,0.188034,0.218182);
    insert into out5d Values (25147,23411,0.193481,0.193542,0,NULL,NULL,NULL,1,0.219608,1,0.152941,0.188034,0.212121,0.219608,1,0.152941,0.188034,0.212121,0.219608,1,0.152941,0.188034,0.212121);
    insert into out5d Values (25148,10867,0.326904,0.326965,0,NULL,NULL,NULL,1,0.156863,1,0.290196,0.589744,0.612121,0.156863,1,0.290196,0.589744,0.612121,0.156863,1,0.290196,0.589744,0.612121);
    insert into out5d Values (25149,10867,0.326965,0.327026,0,NULL,NULL,NULL,1,0.152941,1,0.298039,0.581197,0.606061,0.152941,1,0.298039,0.581197,0.606061,0.152941,1,0.298039,0.581197,0.606061);
    insert into out5d Values (25150,10867,0.327026,0.327087,0,NULL,NULL,NULL,1,0.152941,1,0.290196,0.598291,0.618182,0.152941,1,0.290196,0.598291,0.618182,0.152941,1,0.290196,0.598291,0.618182);
    insert into out5d Values (25151,10867,0.327087,0.327148,0,NULL,NULL,NULL,1,0.156863,1,0.305882,0.589744,0.612121,0.156863,1,0.305882,0.589744,0.612121,0.156863,1,0.305882,0.589744,0.612121);
    insert into out5d Values (25152,10867,0.327148,0.327209,0,NULL,NULL,NULL,1,0.156863,1,0.298039,0.589744,0.612121,0.156863,1,0.298039,0.589744,0.612121,0.156863,1,0.298039,0.589744,0.612121);

  • R-tree indexing: really 3d now?

    Dear all,
    after studying the Spatial Reference guide for 11g I am left wondering what the story is with the R-tree index. Does it really consider all three dimensions now? And all you have to do is set the sdo_indx_dims to 3. Does anyone know another reference about this index apart from the spatial reference guide?
    Thanks,
    B.

    Check this link for a similar discussion
    Re: SDO_RELATE with 3D geometry
    The second edition of Pro Oracle Spatial has a good bit of detail on 11g 3d:
    http://www.amazon.co.uk/Oracle-Spatial-Database-Experts-Voice/dp/1590598997/ref=sr_1_1?ie=UTF8&s=books&qid=1225907677&sr=8-1

  • Representing Smallworld network in Oracle Spatial

    I'm trying to determine the network capabilities of Oracle Spatial. We are discussing whether it has equivalent capbilities as the Smallworld data model.
    Is there currently a translator that can convert Smallworld data into Oracle Spatial, without loss of functionality.
    Can anyone give me any info on this?
    Thanks

    Oracle Spatial NDM is a means to persist graphs and perform graphical analysis like shortest path, minimum spanning tree etc.
    It isn't an application or domain specific solution.
    You would use NDM to build applications such as vehicle routing, trace out in an electrical network etc.
    The NDM white paper on OTN describes this in further detail.
    www.oracle.com/technology/products/spatial/index.html
    Oracle Database 10g. Building GIS Applications Using the Oracle Spatial Network Data Model—Technical White Paper (PDF)
    Send me email if you'd like follow on discussions.
    Jayant Sharma
    (firstname.lastname at oracle)

  • R-tree index creation error

    I'm getting the following error when trying to create an r-tree index:
    create index new_gps_idx on gis.new_gps (geometry) indextype is mdsys.spatial_index PARAMETERS('TABLESPACE=INDX')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-06512: at line 1
    I get the error regardless of which tablespace I specify.
    I can however create fixed quad-tree indexes with the following command, in the same tablespace:
    create index new_gps_idx on gis.new_gps (geometry) indextype is mdsys.spatial_index PARAMETERS('SDO_LEVEL=4');
    The error is defined as:
    ORA-29855 error occurred in the execution of ODCIINDEXCREATE routine
    Cause: Failed to successfully execute the ODCIIndexCreate routine.
    Action: Check to see if the routine has been coded correctly.
    I have created one r-tree index on a large spatial table, 5633 geometries, in the INDX tablespace. I am not able to create another one.
    The INDX tablespace is only 2% used and its size is 200MB.
    Any help would be greatly appreciated.
    Dave
    null

    Hi David,
    Can you try applying the patch (if you haven't already)? Unfortunately I can't rememeber the details of what the symptoms were, and although the patch kit describes a fix there is no corresponding bug in Oracle's bug database. If I remember correctly there was a bug in the values the r-tree code was using for intermediate (temporary) tables created during r-tree index creation.
    Sorry I can't pin this down for you.
    dan

  • R-Tree Indexing

    Hi.
    Is it possible to direct in which tablespace the R-tree index table will go.
    I know that you have a tablespace parameter in creating a quadtree index but I can't find one when creating the R-tree index.
    I'm using Oracle 8.1.7
    Johan

    An index entry is created in the SYSTEM tablespace but the spatial indices are created in the tablespace you specify. To verify it execute the following:
    select table_name,tablespace_name
    from user_tables
    where table_name like 'spatial_table%';
    It will return your table_name plus the spatial index table created for it.
    The table_name will look something like this:
    spatial_table_SX_FL10$ for fixed quad tree and spatial_table_RT$ for rtree.
    You can query the same for the indexes built on that previous table.
    select index_name,tablespace_name
    from user_indexes
    where table_name = 'SPATIAL_TABLE_SX_FL10$';
    The two index names would look like:
    spatial_table_sx_fl10$B1
    spatial_table_sx_fl10$B2
    They should be created in the tablespace specified in the tablespace parameter when creating the spatial index.
    Does that help any?
    Dave
    null

  • Oracle Spatial Conceptual Diagram

    Hii All..
    Do you guys have any document OR where can I get a document that
    shows conceptual design/diagram for Spatial.
    I want to know how all the table related to each other (Basically, I need the
    ER diagram.
    Thanks!
    Hope somebody can help me on this.
    Best Regards,
    Desmond.

    Hi Desmond,
    Within ORACLE-Spatial two Methodes of storing Data is described. First the Relational Method.
    Every GEOCLASS you are modelling will be represented by 4 tables:
    <CLASSNAME> = main Attributes (referenced by a GID-Pointer) for a single Object
    <CLASSNAME>SDOGEOM = Koordinate-List-Element referencing by SDOGID for Single Object and SDO_SEQ for ranking of elements within geometrie.
    <CLASSNAME>_SDODIM = declaration of dimensions (axis) with lower- and upper boundry, tolerance and name (2 dimensions => 2 Entities within that table)
    <CLASSNAME>_SDOLAYER = Hirarchical indexing-Master-Table ( Quad-Tree ) for every dimension
    <CLASSNAME>_SDOINDEX = Quad-Tree-Tiling and referencing of elements (Area-Index)
    The first two tables of this modell are carriing the data, the rest is for administrative use and indexing.
    Second the Object relational modell:
    Every Object (i.e. a Building) is described within 1 Entity in a table. So the Object is described by a reference-Number,
    all declarative Attributes (behaviors) and finaly the Object-Type SDO_GEOM.
    <CLASSNAME>.ID = reference-Row
    <CLASSNAME>.att1 = first attribute (i.e. ownership of a Building)
    <CLASSNAME>.geom = mdsys.sdo_geometry = entire description of the geometry
    Where sdo_geometry has serveral subtypes:
    SQL> desc mdsys.sdo_geometry
    Name Null? Typ
    SDO_GTYPE NUMBER
    SDO_SRID NUMBER
    SDO_POINT SDO_POINT_TYPE
    SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY
    SDO_ORDINATES SDO_ORDINATE_ARRAY
    SQL> desc mdsys.sdo_point_type
    Name Null? Typ
    X NUMBER
    Y NUMBER
    Z NUMBER
    SQL> desc mdsys.sdo_elem_info_array
    mdsys.sdo_elem_info_array VARRAY(1048576) OF NUMBER
    SQL> desc mdsys.SDO_ORDINATE_ARRAY
    mdsys.SDO_ORDINATE_ARRAY VARRAY(1048576) OF NUMBER
    Thus selecting of koordinates is a bit difficult. But can be done upon knowing how to do.
    i.e. SQL*PLUS:
    col koordinate format a24 word_wrap
    select b.geom.sdo_ordinates koordinate from building b where att1='Government';
    Koordinate
    xxxxxxxxx yyyyyyyyyy
    xxxxxxxxx yyyyyyyyyy
    and so on.
    CU
    Stefan

  • 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

  • Bitmap index Vs B-Tree index

    Hi All,
    Could some one please let me know how Bitmap indexes are useful compared to B-Tree indexes on low-cardinality columns ?.
    Thanks,
    -Kumar.

    >>
    As Re: why oracle db 9i optimizer can't choose to use the bitmap index? there are a number of issues with bitmap indexes. Your best bet is to read these three articles by Jonathan Lewis.
    It does pay us to understand how the optimizer works with bitmap indexes. I posted some Re: Cost-based optimizer behavior to show how indexes on even very low valued columns can be useful in certain circumstances.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Help define the requirements for an Oracle Spatial management tool

    Hi,
    We are developing a tool that, we hope, will be indispensable for all Oracle Spatial and Locator dbas/users. We've released version 1.0, but we need your help to define the requirements for the next version.
    What features would you like to have in a management tool for your spatial databases?
    The features we've got so far:
    1. Viewing of vector data in a map + attributes
    2. Loading from shapefiles
    3. Exporting to shapefiles
    4. Validating metadata, indexes and spatial data.
    We are adding editing of vectors in the next version - basic stuff for add, update and delete.
    But there must be a lot more. What do you find difficult to do in Oracle Spatial/Locator? What would you like in a tool such as this?
    Any feedback either to myself or the forum is much appreciated.
    cheers,
    Andrew
    [email protected]
    PS If you like to have a look at what we have done so far, go to http://www.geometryit.com/products/spatialConsole.php

    Andrew knows what I have asked for but for others to think about and to start
    the ball rolling, here's what they are:
    1. Ability to enter own SQL commands but with PARAMETERS for attributes
    and shapes as in the following examples:
    SELECT ...
    FROM my_spatial_table a
    WHERE a.ATTRIBUTE = :attr
    AND MDSYS.SDO_RELATE(a.shape,:polygon,'mask=anyinteract') = 'TRUE'
    When executed the attribute value is asked for via a input box (data type?)
    and the user is asked to define the SDO_GEOMETRY for the :polgygon parameter via mouse clicks on the screen.
    Similarly, this would work for INSERT, UPDATE and DELETE...
    INSERT INTO my_spatial_table (shape) values(:polygon)
    The data type of an attribute parameter could be determined in two ways:
    a) By querying the Oracle catalog;
    b) By using a "PARAMETERS" command before the query as follows
    PARAMETERS name type [(size)] [, name type [(size)] ...]
    The PARAMETERS declaration has these parts:
    name     The name of the parameter.
    type     The type of the parameter.
    size     The size of the parameter in characters or bytes.
    2. When executing an SQL SELECT statement I would like the tool
    to suggest the HINTS that are needed to improve performance.
    3. Following on from 2, I would like to Tick an option that would return the
    EXPLAIN PLAN that the query optimizer used when executing my query.
    4. The tool has to support ALL Oracle's spatial vector data types.
    5. It would be nice to be able to work with GeoRasters. Since Spatial Console
    imports/exports shapefiles why not the same for rasters. However, the problem
    with supporting foreign data formats is WHERE DO YOU STOP!!!!!
    6. You could allow for the styling of the Spatial Console to be stored in the MapViewer catalogs or use the MapViewer catalogs when styling an Sdo_Geometry if it exists (I note that your tool extracts the SDO_METADATA
    why not the MapViewer metadata as well)?
    regards
    S.

Maybe you are looking for

  • How to get data from PDF form?

    PDF forms can send data in url like GET or POST method. Is it possible to get data from url, like in PHP http://sever/file.php?item1=value1&item2=value2&item3=value3 In APEX url have specific construction and I don't know how to get value of items (1

  • Hyperlinks in Panel Not Visible

    I've been working in Indesign CS6 for a couple of months. I have version 8.0 and am running OS 10.7.4. Yesterday, I noticed that my hyperlinks panel was empty although I had created over 100 hyperlinks in that particular file. The hyperlinks were sti

  • The RFC Destination ALESERVER is not available

    Hi , I am getting the error message " The RFC Destination ALESERVER is not available "  in my CRM Web UI screen.But when I login with another User ID , this error message is not showing. RFC connections are maintained  in transaction SM59 and BD97.bu

  • [SOLVED] Boot failure after system update

    Been running nicely for a few months, but after a  -Syu update yesterday morning, the boot process fails immediately after the bit about "Processing Udev events", which memory tells me is the point in the boot process where the screen resolution chan

  • How to configure movement 701 & 702 into  J2IUN?

    Hello Experts.. We have configured all other movement types in CIN which are related/ show effect in J2IUN. We are also doing movement type 701/ 702 & Z01 ( in t code ZUDQ) Since  this is also related to physical quanitity updataion, 1) is it advisab