Extrude 3D polygons in Oracle spatial

Dear all,

I have two sets of the footprint of City data imported into the Oracle Spatial already. One is a polygon with x 2D layer and there, and the other is a layer of polygons 3D with z values (x and are identical to the first).

Now, I am trying to extrude 3D for composite 3D polygon based on the value of z. I can extrude the 2D polygons with success with specifying the heights of soil (for example sdo_ordinate_array (0)) and topheights (say, sdo_ordinate_array (20.0)).

However, how extrude the specified polygon 3D taking the z value of each vertex as the heights of floor at a higher height is a problem for me. Since I am very new to use PL/SQL, besides, I'm not sure if it's possible to do.

Here are examples of data extracted the data from the sample:
Select sample.geom.sdo_ordinates in the sample sample2d_polygon
NUMBER (715202.739577727,733492.909091357,715206.759608945,733492.412077086,715208.666575034,733506.889047512,715204.72752625,733507.364066093,715202.739577727,733492.909091357)

Select sample.geom.sdo_ordinates in the sample sample3d_polygon
NUMBER(715202.739577727,733492.909091357,12.4890003204346,715206.759608945,733492.412077086,12.4890003204346,715208.666575034,733506.889047512,12.4540004730225,715204.72752625,733507.364066093,12.4320001602173,715202.739577727,733492.909091357,12.4890003204346)

Can someone help me with this
Select sdo_util.extrude (sample.geom, sdo_ordinate_array(), sdo_ordinate_array (20.0), 'true', 0.05) sample2d_polygon sample, where the first sdo_ordinate_array is the corresponding z value of the Summit?

Any suggestion is expected and appreciated.




Sincerely
Jun

Hi Jun, -.
I hope that the following code solves your problem.
Please make sure also your geometries are valid by using sdo_geom.validate_geometry_with_context or
sdo_geom.validate_layer_with_context for 3D geometries.
Please let us know if you have any questions.
Best
Baris

drop table myGeoms;
drop table extruded_myGeoms;

create table myGeoms(i number, geom sdo_geometry);
insert into myGeoms(i, geom) values(1,
MDSYS.SDO_GEOMETRY(3003, null,null,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
MDSYS.sdo_ordinate_array(
715202.739577727,733492.909091357,12.4890003204346,
715206.759608945,733492.412077086,12.4890003204346,
715208.666575034,733506.889047512,12.4540004730225,
715204.72752625, 733507.364066093,12.4320001602173,
715202.739577727,733492.909091357,12.4890003204346
)));
insert into myGeoms(i, geom) values(2,
MDSYS.SDO_GEOMETRY(3003, null,null,
MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,1),
MDSYS.sdo_ordinate_array(
715202.739577727,733492.909091357,14.4890003204346,
715206.759608945,733492.412077086,14.4890003204346,
715208.666575034,733506.889047512,14.4540004730225,
715204.72752625, 733507.364066093,14.4320001602173,
715202.739577727,733492.909091357,14.4890003204346
)));

insert into myGeoms(i, geom) values(3,
mdsys.sdo_geometry(3003, null, null,
mdsys.sdo_elem_info_array(1,1003,1),
mdsys.sdo_ordinate_array(1,1,10,  0,1,10, 0,0,10, 1,0,10, 1,1,10))
);

create table extruded_myGeoms(id number, geom sdo_geometry);

-- This program assumes that each geometry in myGeoms table
-- has only 1 ring per polygon ie, 1003 etype element.

set serveroutput on;
declare
type cursor_type is REF CURSOR;
query_crs cursor_type ;
-- For each extruded geometry (result), this array has the ground heights
ords_bottom_z_array sdo_number_array  := null;
-- For each extruded geometry (result), this array has the top heights which is set to 20 for each element.
-- Both arrays must have the same number of elements.
ords_top_z_array sdo_number_array  := null;
ords2d mdsys.sdo_ordinate_array  := null;
result sdo_geometry;
g1 sdo_geometry;
g2d sdo_geometry;
stmt  varchar2(100);
id1 number;
cnt integer;
k integer;
l integer;
the_dim        number;
gtype_2d       number;
begin
 stmt := ' select i, geom from myGeoms ';
 OPEN query_crs FOR stmt;
 LOOP
  BEGIN
   FETCH query_crs into id1, g1;
   EXIT when query_crs%NOTFOUND ;
   ords2d := mdsys.sdo_ordinate_array();
   ords_bottom_z_array := SDO_NUMBER_ARRAY();
   ords_top_z_array := SDO_NUMBER_ARRAY();
   k:=ords_bottom_z_array.count;
   l:=ords2d.count;
   FOR cnt in 1..g1.sdo_ordinates.count LOOP
     if (mod(cnt, 3) = 0) then
       -- Get z values of polygon
       ords_bottom_z_array.extend(1);
       ords_top_z_array.extend(1);
       k:=k+1;
       ords_bottom_z_array(k) := g1.sdo_ordinates(cnt);
       ords_top_z_array(k) := 20.0; -- Constant
     else
       -- To have 2D geometry for input to sdo_util.extrude
       ords2d.extend(1);
       l := l+1;
       ords2d(l) := g1.sdo_ordinates(cnt);
     end if;
   end loop;
   the_dim := floor(g1.sdo_gtype / 1000);
   gtype_2d := (the_dim-1)*1000 + mod(g1.sdo_gtype, 10);
   g2d:= sdo_geometry(gtype_2d, null,  null,
           mdsys.sdo_elem_info_array(1,1003,1),
           ords2d);
   result:= sdo_util.extrude(g2d, ords_bottom_z_array, ords_top_z_array, 'FALSE', 0.05);
   -- insert the extruded geometry (result) into new table
   insert into extruded_myGeoms(id, geom) values(id1, result);
   dbms_output.put_line('id = '||id1);
  END;
 END LOOP;
end;
/

Tags: Database

Similar Questions

  • GML polygon holes and Oracle Spatial polygon those - different standards?

    Hi people,

    I'm working through some reflected in Oracle Spatial via 3 GML geometries validation issues. A small number of polygons is coming with 13349 errors. Looking closer I see all involve situations where there is a hole to touch the outer ring at a single point. GML is representative this hole in the outer ring. Here's an example simplified with bad ascii art (be nice if the forum was a way to post pictures):
     A----------B
     |..........|
     E----F.....|
     |\   |.....|
     |.\  |.....|
     |..\ |.....|
     |....G.....|
     |..........|
     D----------C
    A valid Oracle Spatial polygon would be an outer ring of A.B, C, D, E, A and the inner ring of E, F, G, E.
    However, the GML arrived like a ring outside of A, B, C, D, E, G, F, E, A, who once loaded into Oracle Spatial up 13349 error. SDO_UTIL. FROM_GML311GEOMETRY does not resolve this error but goes right through.

    I spent some time on the documentation of GML, and it does not seem that the standard GML polygon expressly rules on the matter. This document,
    http://www.gdmc.nl/publications/2004/Invalid_Valid_Clean_Polygons.PDF
    seems to confirm this assertion. When we talk about ISO 19107, which forms the basis of the subject polygon GML, the author says in addition, "it is not directly obvious if the outer limit is allowed to touch itself or if it is allowed to touch the inner limits and if so, under what conditions it could."
    Is - it sounds good to you all?
    Note that the WKT specification does not actually say that these holes must be the same stored in Oracle Spatial. Therefore, one question GML.

    So assuming the GML specification allows the storage of polygons with holes of the two types, it seems we until his side Oracle Spatial things to correct the situation, when we meet it? I would suggest that perhaps SDO_UTIL. FROM_GML311GEOMETRY should detect and solve this problem as a matter of course, but I know the issue of rotation ring WKT (SDO_UTIL.) FROM_WKTGEOMETRY seems to ignore the ring rotation Oracle Spatial position is that these incoming error correction is the individual user to address problem. Anyone have any ideas on the issue?

    Note This SDO_UTIL. RECTIFY_GEOMETRY does not seem to solve the problem. I need to write a wrapper to walk the vertices of the ring and sniff for summits in double and then redeploy a hole when the situation is. Am I missing something?

    Thank you and happy Friday,

    Paul

    Paul,

    Frankly, we didn't expect the GML definition differs from that of the simple feature specification that complies
    with the Spatial model. If we had never expected this problem.

    Anyway, the sdo_util.rectify_geometry () should solve the problem depending on your version of database.
    Otherwise, try self-union with the call to sdo_geom.sdo_union () and it should fix the geometry to make a polygon
    with an exterior and an inner ring.

    Siva

  • Find the minimum distance between two SDO_GEOMETRY in Oracle Spatial?

    annular ring edit.png

    A circle (SDO_GEOMETRY)
    B - polygon (SDO_GEOMETRY)

    CASE:
    B contains A (or)
    The Interior of B.

    How to find the minimum distance between A and B in Oracle Spatial

    Hello guuid nameless person.

    What is

    my_answer := MDSYS.SDO_GEOM.SDO_DISTANCE(
       my_circle_geometry
      ,MDSYS.SDO_UTIL.POLYGONTOLINE(my_outer_polygon)
      ,my_tolerance
    );
    

    Now, you may need to pay attention to the holes in your polygon, would you the distance and an inner ring if it was closer to you?

    If the measure is only to outer rings, so something like

    my_answer := MDSYS.SDO_GEOM.SDO_DISTANCE(
       my_circle_geometry
      ,MDSYS.SDO_UTIL.POLYGONTOLINE(
          MDSYS.SDO_UTIL.EXTRACT(my_outer_polygon,1,1)
       )
      ,my_tolerance
    );
    

    And then also beware of the multipolygons as the foregoing only measured against the first polygon in the MultiPolygon.  You need to loop through the polygons of tests just the outer ring in this case.

    See you soon,.

    Paul

  • Oracle spatial any function interact

    Hi all

    I have a question about oracle spatial. I have a line (a path) and a type sdo_geometry polygon, and I used "all interact" function to find if the line intersects the polygon. Now I need to find how the trajectory crosses the polygon. For example, the path has 100 points and he in the polygon to 20th and out to the 70th point. Is it possible to find these points?

    Thank you

    Aswin

    Hi Aswin,

    Use SDO_GEOM. SDO_INTERSECTION. This will give you a line, and if your area is a simple box the line will have two points: the points of intersection of the line of origin with the boundary of the polygon. Of course, if your polygons have holes the result will be more than two points.

    HTH,

    Stefan

  • Electrodes for Oracle spatial 11.2.0.4.0

    What patches are needed for Oracle spatial 11.2.0.4.0?

    I don't know what kind of response you expect an open question...

    Simply apply the last power supply and go from there.

    Bryan

  • Oracle spatial in ArcSDE

    I am new to oracle spatial and GIS in general. I have a customer who requires diapers space oracle to create in the environment of ESRI ArcSDE.

    anyone can guide me please?

    Hello

    When you create a new class of functionality using ArcCatalog (ESRI ArcGIS Desktop software), you can set the configuration to "SDO_GEOMETRY. This new layer will be saved with ArcSDE system tables and stored in an oracle spatial format.

    of course, you must have activated in your Oracle Spatial database.

    you will find many technical articles on the web on this topic.

    Kind regards

  • Cannot find or load the class main oracle.spatial.util.SampleShapefileToJGeomFeature?

    Hello

    Am getting error below when ESRI shapefile running in the oracle database table.,.

    C:\ > java - cp G:\app\product\11.2.0\dbhome_1\jdbc\lib\ojdbc14.jar; G:\app\product\

    11.2.0\dbhome_1\md\jlib\sdoutl-1.0.jar;\g:\app\product\11.2.0\dbhome_1\md\jlib\s

    doapi - 1.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature localhost h Pei

    Forms - sn of 1521 orcl u MDSYS selva d t f F:\saptial\Africa.shp - r 8307 - g ge

    ometry

    Error: Could not find or load the class main oracle.spatial.util.SampleShapefileToJGeomFeature

    Uses the java version

    C:\ > java-version

    Java version "1.7.0_51".

    Java (TM) SE Runtime Environment (build 1.7.0_51 - b13)

    The Client Java VM (build 24.51 - b03, mixed mode, sharing)

    And also tried in MapBuilder sound fine work., but I need to import java utility assistance help me too this.,.

    I tried below in this way and solved problem.,.

    Until I downloaded

    sdoutl - 11.2.0.jar and sdoapi - 11.2.0.jar used to import a shp file...

    C:\>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1

    C:\Users\SELVA>CD downloads

    C:\Users\SELVA\Downloads>CD statplanet_zambia

    Card C:\Users\SELVA\Downloads\StatPlanet_Zambia>CD

    located in a particular way and my oracle home

    C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>set ORACLE_HOME=G:\app\product\11.2.0\dbhome_1

    C:\Users\SELVA\Downloads\StatPlanet_Zambia\map>java - classpath %ORACLE_HOME%\jdb

    c\lib\ojdbc5.jar;%O RACLE_HOME%\md\jlib\sdoutl-11.2.0.jar;%O RACLE_HOME%\md\jlib\sdoapi-11.2.0.jar oracle.spatial.util.SampleShapefileToJGeomFeature h localhost Pei 1521 - orcl u MDSYS selva t Zambia SF map geometry 8307 d - g - r

    Host: localhost

    Port: 1521

    SID: orcl

    db_username: MDSYS

    DB_PASSWORD: selva

    db_tablename: Zambia

    shapefile_name: map

    SRID: 8307

    db_geometry_column: geometry

    Connection using Oracle10g...

    localhost, 1521, orcl, MDSYS, selva, Zambia, map, null, 8307

    Old table of fall...

    java.sql.SQLException: ORA-00942: table or view does not exist

    Creating a new table...

    9 response (s) converted.

    Fact.

    Thank you

    Selva

  • Is there a function in Oracle Spatial 11 g moving/translation of geometry?

    Hello everyone,

    I am new to Oracle Spatial. I wanted to know if there is any function to move/translate a geometry in Oracle Spatial 11 g? PostGIS is a function named ST_Translate to achieve the same.

    Kind regards

    Shiva Shankar

    Hello

    There's a SDO_UTIL. Function AFFINETRANSFORMS in Package SDO_UTIL (utility)

    Note, that Simon Greener & Siva Ravada have published an excellent book ("application and Oracle Spatial extension") which contains (in Chapter 7) examples of easy to use this packages:

    http://www.packtpub.com/applying-and-extending-Oracle-Spatial/book

    Luke

  • ORACLE spatial 11g and GRS 80

    Hello
    I'm working on a project that will require projected and geographical coordinates for different in product files. I have no problem, define, store, extract or corresponding point coordinates. My columns for these coordinates with the SRID 8307 are defined in user_sdo_geom_metadata table as follows:
    INSERT INTO
    USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES
    ('INVENTORYGEOMETRY', 'INVGEO', MDSYS. SDO_DIM_ARRAY (MDSYS. SDO_DIM_ELEMENT ('Longitude',-180, 180,.05), MDSYS. SDO_DIM_ELEMENT('Latitude',-90, 90,.05)), 8307);

    the index:
    creating index 'MYDB '. "' INVGEO_IDX ' on 'MYDB '. "INVENTORYGEOMETRY"("INVGEO") indextype is MDSYS. SPATIAL_INDEX;

    However, I'm confused as to how I'm going to have a column that has both geographic and coordinated projected. Am I allowed to set longer SDO_DIM_ELEMENT (s) FRO the SDO_DIM_ARRAY with min/max different values. For example, I'd be able to always use an SRID of 8307 times WGS 84 and data GRS80 (ellipsoid), something like the following:
    INSERT INTO
    USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
    VALUES
    ('INVENTORYGEOMETRY', 'INVGEO', MDSYS. SDO_DIM_ARRAY (MDSYS. SDO_DIM_ELEMENT ('Longitude',-180, 180,.05), MDSYS. SDO_DIM_ELEMENT ("' North latitude-90, 90,.05").
    (MDSYS. SDO_DIM_ELEMENT('FIXEDGRID_.5Resolution', 0, 26916,.5)), 8307);

    Is that possible or do I have to create a new column in the database?

    In addition, I don't know the relationship between the SDO_ELLIPSOIDS and SDO_GEOMETRY tables. You you please explain it to me?

    Thank you for any help you can give. I'm confused as to how I'm going to make this work for both geographic and projected coordinates, or if I'll be able to make it work.

    Thank you
    Erica

    Erica,

    You have geodetic and projected data in a single column of a table BUT you cannot index in space because the index does not work on the two projections.

    You have, says Bryan, create two columns:

    create table INVENTORYGEOMETRY (
      fid integer,
      INVGEO sdo_geometry, /* For the geodetic data */
      INVPROJ sdo_geometry /* for the projected data */
    );
    

    If you do this, you must create two user_sdo_geom_metadata entries. As you have already done and one for projected data:

    INSERT INTO
     USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
     VALUES ('INVENTORYGEOMETRY','INVPROJ',
     MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',0,1000, .05),MDSYS.SDO_DIM_ELEMENT('Y',0,1000, .05)),XXXXX);
    

    Where you replace 0,1000 ranges with your actual data range and XXXXX by your actual SRID projected (for example, 28355 as in the example below).

    Now, assuming that this table Gets the INVGEO column populated first (by some external dynamic flow) you could synchronize the column projected via a trigger as follows:

    create trigger inventorygeometry_proj_bi
    before insert
    on inventorygeometry
    FOR EACH ROW
    begin
       if (:new.invgeo is not null) then
         :new.invproj := mdsys.sdo_cs.transform(:new.invgeo,28355);
       end if;
    end;
    /
    

    Finally...

    In addition, I don't know the relationship between the SDO_ELLIPSOIDS and SDO_GEOMETRY tables. You you please explain it to me?

    The SDO_ELLIPSOIDS table is part of the implementation of the projections in the package Oracle Spatial. When you use a SRID in a SDO_GEOMETRY, Oracle uses the SRID to interrogate the underlying tables (which SDO_ELLIPSOIDS is only one member) to get the properties of the projection for example the definition of the ellipsoid being a.

    I hope this helps at all.

    Don't forget to assign the points you like if our responses are considered correct or useful.

    concerning
    Simon

  • Oracle Spatial

    I and new to Oracle Spatial.
    If I download Oracle database 11.2
    Does include Oracle Spatial? Can I install spatial data?

    Welcome to YOU

    Each version of the database allows the storage of spatial data with a minimum feature set space under license as the Oracle index

    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e11830/sdo_locator.htm#i632018.

    The Oracle Spatial license covers the full use of the functionality.

    In order to start learning here are some good starting points:

    Pro space book of Oracle 11 g

    http://www.Amazon.com/Oracle-Spatial-database-experts-voice/DP/1590598997

    and documentation of the user:

    http://www.Oracle.com/pls/db112/portal.portal_db?selected=7&frame=#oracle_spatial_and_location_information

    specifically Spatial Developer's Guide:

    http://download.Oracle.com/docs/CD/E11882_01/AppDev.112/e11830/TOC.htm

    Concerning

    Luke

  • How can I find out if a feature is included in Oracle Spatial or Locator?

    Hello

    Is there a document that lists what space packages are licensed Locator and which are allowed as space?

    Tamas

    Its all listed in Appendix B of the Oracle Spatial Developer's Guide. It varies a little from one version to the other, so you will need to check the guide for the version of database, sure you are.

    John

  • How to find the ANGLE b/w two edges in Oracle Spatial

    How to find the ANGLE b/w two edges on Oracle Spatial. I have two edge connected on the same node. I wanted to know the angle betwwn them. Can someone help me?

    Ok. My first example is an approximation. Further you get North or South of the Ecuador, gets the more vague.
    This one should do the trick with some degree of precision.

    declare
      PI constant number := 3.14159265358979;
      g1 sdo_geometry;
      g2 sdo_geometry;
      g3 sdo_geometry;
    
      angle1 number;
      angle2 number;
    
      FUNCTION POINT(P_LAT  IN number
                    ,P_LONG IN number)
        RETURN MDSYS.SDO_GEOMETRY IS
      BEGIN
        -- we load both the ordinate array and the point type because some spatial functions show inconsistent behavior
        -- it is not important for this example, just something to be aware of
        return(mdsys.sdo_geometry(2001,8307 -- WGS84
                                 ,mdsys.sdo_point_type(p_long,p_lat,null)
                                                      ,mdsys.sdo_elem_info_array(1,2,1)
                                                      ,mdsys.sdo_ordinate_array(p_long,p_lat)));
      END;
    
    begin
    
      -- For the example, project in WGS84
      -- g1,g2,g3 could also come straight out of the database as sdo_geometry
      g1 := point(50, 7);          -- Point A
      g2 := point(51, 7);          -- Point B
      g3 := point(50,10);          -- Point C
    
      angle1 := atan2(g2.sdo_point.x - g1.sdo_point.x,
                      g2.sdo_point.y - g1.sdo_point.y);
      angle2 := atan2(g3.sdo_point.x - g1.sdo_point.x,
                      g3.sdo_point.y - g1.sdo_point.y);
    
      -- depending on rotation and where we are on the planet, adjustments may be needed
      if angle1 < 0      then angle1 := angle1 + 2 * PI; end if;
      if angle2 < 0      then angle2 := angle2 + 2 * PI; end if;
      if angle2 < angle1 then angle2 := angle2 + 2 * PI; end if;
    
      dbms_output.put_line('Angle between the lines A-B and A-C: '||
                           round(sdo_util.convert_unit(angle2-angle1,'Radian','Degree'),1));
    end;
    
    Angle between the lines A-B and A-C: 90
    
  • Seeded data for Oracle Spatial 10 g

    I have a fundamental question about Oracle spatial. Oracle Spatial data seeded as US maps? For example, a store if I update the latitude and longitude, this information allows to know location and the city of the location.
    If Oracle Spatial has no data seeded, what options are available to implement the same in Oracle spatail.

    A quick response will be appreciated.

    Thank you

    Hello
    Space Oracle does not provide the content of the map. Some providers of content such as Navteq provides the specific format of map/routing/gecoding Oracle.
    If you want to discover the location (lat, lon) of an address, you can use Oracle geocode (sdo_gcdr.geocode).
    If you have a location (lat, lon) and you want to know the address information, use the geocoder Oracle (sdo_gcdr.reverse_geocode).

    Please see Chapter 14 SDO_GCDR package (geocoding) http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14255/toc.htm (Developer's guide space 10 gr 2)

    Jack

  • PostGis data .xls to load into Oracle spatial.

    Hi all


    Data extracted on postGis data in a .csv

    Load data into Oracle Spatial 10 G R/2, this conversion to SDO_GEOMTERY compatible!


    Object LOCATION
    POINT (151.176476484116 - 33.8052644650542)
    B POINT (151.206652660049 - 33.8739804536964)
    C POINT (151.119743998673 - 33.7843109035407)
    D POINT (151.199837258644 - 33.8860405175587)
    E POINT(151.174838115067-33.8106921744621)
    F POINT (151.295093932928 - 33.7306503576515)
    G POINT (151.670928051977 - 30.4974655838254)
    H POINT (151.092489089026 - 33.6829842680288)
    I POINT (151.09253200437 - 33.6836270576402)


    How to load this .xls in oracle and transform the place in sdo_geometry

    Hello
    You can use sql loader or an external table to import your data.
    As your location data are in WKT format, it will be easier to use a temp. table (tmp_obj_loc).
    It might be easier to add ',' as delimiters between each column in your data.

    The following example uses sqlldr (the temporary table can be created as an external table):

    -- create a temp. table to hold your location info.
    drop table tmp_obj_loc ;
    
    create table tmp_obj_loc (
    obj varchar(20),
    loc varchar2(200)
    );
    
    -- sqlldr example
    -- use a control file if needed
    -- this creates the temp table
    
    options (skip = 1)
    load data
    infile *
    into table tmp_obj_loc
    fields terminated by ','
    (obj ,
     loc
    )
    BEGINDATA
    Object LOCATION
    A, POINT(151.176476484116 -33.8052644650542)
    B, POINT(151.206652660049 -33.8739804536964)
    C, POINT(151.119743998673 -33.7843109035407)
    D, POINT(151.199837258644 -33.8860405175587)
    E, POINT(151.174838115067 -33.8106921744621)
    F, POINT(151.295093932928 -33.7306503576515)
    G, POINT(151.670928051977 -30.4974655838254)
    H, POINT(151.092489089026 -33.6829842680288)
    I, POINT(151.09253200437 -33.6836270576402)
    
    -- create your location table with sdo_geometry from the temp table
    -- 8307 is the SRID, replace if needed
    
    drop table object_location;
    
    create table object_location
    as select obj object, sdo_geometry(loc,8307) location
    from tmp_obj_loc;
    
    desc object_location ;
    select count(*) from object_location;
    

    Jack

  • Package oracle.spatial does not exist in NetBeans

    Hi all,

    I installed Oracle 11 g R2. I installed Netbeans 6.8. Everything on Red Hat Enterprise 5.
    I am doing a project in Netbeans using the oracle.spatial package. So I imported this package if:

    Oracle.spatial import. *;

    But netbeans says that this package does not exist.


    Listening port is active.
    Database is in place.
    NetBeans is already connected to Oracle with driver oracle.jdbc.OracleDriver.
    I put the classpath in the project: I added the ojdbc6.jar of jar file in the project libraries.

    What do you think of this problem?


    Thanks in advance for the help.

    I don't know much about Java. But I am sure that there should be a utility that can help you locate the jar file where oracle spatial package exists. You can add this JARto your classpath or something.

Maybe you are looking for