764_23_Gudelli_OracleSpatial by RuITNjK

VIEWS: 3 PAGES: 24

									Oracle Location based services
    Spatial and Oracle Locator



                            Srinivas Gudelli
                                    CIS 764
                                   Fall 2008
Overview

   What is Oracle Spatial and Oracle Locator?
   Spatial information systems (Ex: GIS)
   GIS vs. Oracle Spatial?
   History and architecture
   Data loading-examples
   Advantages
   Summary
   Questions
What is Oracle Spatial and Oracle Locator?

   Oracle Spatial and Oracle Locator, is a feature in
    Oracle database that stores location applications.

   Oracle locator-Standard and Enterprise Editions that
    provides core location functionality.

   Oracle Spatial is an option for Oracle Enterprise
    Edition that provides advanced spatial features to
    support high-end GIS and Location Based System
    solutions.
Oracle Locator do                   Oracle Spatial do
                                 =Locator + ...
    All geometric objects
                                  Geometric Transformations
    – Points, lines, polygons
                                  Spatial Aggregations
    – 2D, 3D, 4D
                                  Network Modeling
    Indexing (quadtrees and
                                  Topology
     r-trees)
                                  Raster
    Spatial queries
                                  Geocoder
    Proximity queries
                                  Spatial Data Mining
    Distances
                                  3D Types (LIDAR, TINS)
    Projections
                                  Web Services (WFS, CSW,
                                   OpenLS)
Spatial information systems (Ex. GIS)
   Geographic Information Systems (GIS) integrates
    hardware, software, and data for capturing,
    managing, analyzing, and displaying all forms of
    geographically referenced information.

   Evolution mainly from government, then started
    development from commercial software vendors.

   Enterprise GIS offers tools to share and view the
    spatial data through internet.
Geographic Information Systems




   Stores attributes, raster images, vector data
   Have capability to provide business logics such as
    relationships, domain values, networks, subtypes
GIS vs. Oracle Spatial
   GIS is stand-alone system.
   Incompatible for e-business applications
   Dual Architecture




                                    Continued….
GIS vs. Oracle Spatial
   Fully integrated, Single Architecture.
   Location analysis without GIS
   Useful for corporate and business applications
GIS vs. Oracle Spatial




 Oracle spatial emphasizing the Information Systems by combining the
 Location information with attribute information
                                                     Continued….
Oracle Spatial
Architecture



 Data type
Spatial database
Storing Spatial data in a Database




   Three types of geometry: Points, Lines, and
    Polygons
Spatial data storage in Oracle
   Use SDO_GEOMETRY for vector
   Use SDO_GEORASTER for raster images

Structure of SDO_GEOMETRY
SDO_GTYPE                    NUMBER
SDO_SRID                     NUMBER          Details…. next slides
SDO_POINT                 SDO_POINT_TYPE
SDO_ELEM_INFO          SDO_ELEM_INFO_ARRAY
SDO_ORDINATES          SDO_ORDINATE_ARRAY

    • Example
    SQL> CREATE TABLE states (
    state VARCHAR2(30),
    totpop NUMBER(9),
    geom SDO_GEOMETRY);
SDO_GTYPE
   Defines the geometry type
   Follow DOOT rule
SDO_SRID
   SRID = Spatial Reference system ID
   More than 1000 different systems
   A common value: 8307
       – "Longitude/Latitude WGS84"
       – Used by GPS
       – Navteq and TeleAtlas data are WGS84-encoded
   All geometries must have the same SRID
   Different layers can have different SRID
   Automatic conversion when querying
SDO_POINT and SDO_ODRINATES
Example-Point
                                                  SQL> CREATE TABLE
                                                  geometry_examples
          Creating a Table                        (
                                                  name VARCHAR2(100),
                                                  description VARCHAR2(100),
1.    SQL> INSERT INTO geometry_examples values   geom SDO_GEOMETRY
2.    (                                           );
3.    ‘POINT’
4.    ‘'2-dimensional Point at coordinates’
5.    SDO_GEOMETRY
6.    (
7.    2001,
8.    8307,
9.    SDO_POINT_TYPE
10.   (                                           Loading Point Data
      -79,
11.
12.   37,
                                                  values
13.   NULL
14.   ),                                          -79, 37 (2D)
15.   NULL,
16.   NULL                                        2001-DOOT
17.   )
18.   );
Example 2- Polygon
SQL> INSERT INTO geometry_examples VALUES
(
'POLYGON',
'2-D polygon connecting A(Xa, Ya), B(Xb, Yb), C(Xc, Yc), D(Xd, Yd)',
SDO_GEOMETRY
(
2003,                 -- SDO_GTYPE: D00T. Set to 2003 as it is a 2-dimensional polygon
32774,                                        -- SDO_SRID
NULL,                                         -- SDO_POINT_TYPE is null
SDO_ELEM_INFO_ARRAY                           -- SDO_ELEM_INFO attribute
(
1,                                            -- Offset is 1
1003,                             -- Element-type is 1003 for an outer POLYGON element
1                                 -- Interpretation is 1 if boundary is connected by straight
lines.
),
SDO_ORDINATE_ARRAY                                          -- SDO_ORDINATES attribute
(
1,1,                                                        -- Xa, Ya values
2,-1,                                                       -- Xb, Yb values
3,1,                                                         -- Xc, Yc values
2,2,                                                         -- Xd, Yd values
1,1                               -- Xa, Ya values : Repeat first vertex to close the ring
)
)
);
Other spatial functions-Oracle Spatial
   Spatial query from SQL
   Inbuilt geo-coding services available for know
    address
   All types of spatial operations can be performed
    using SQL such as joining, counting and relate.
   Metadata loading option.
   Network analysis such routing, directions
   Visualization in Map viewer
   Spatial analysis such as buffering, nearest neighbor,
    within distance, and contains.
Benefits
Summary

   Useful tool to add spatial features into
    existing database
   No extra programming skills necessary
   No need to purchase GIS software's
   Single database
   No cost feature for Oracle Application Server
    to view the maps
   Supports all types of geometry such as
    raster, lines, polygons
References

   Pro Oracle Spatial Book




   Fred Louiis, Sollutiion Archiitect and Ohiio Valllley.
    Oracle Platform GIS & Location-Based Services.Oracle
   http://www.oracle.com/technology/products/spatial/index.
    html

								
To top