Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This example creates a function that returns an SDO Geometry derived from two relational columns
of longitude and latitude data. You must specify DETERMINISTIC for functions used in indexes.
This coordinate system is probably the most widely used coordinate system, and the one used for GPS
devices.
Cartesian Coordinates
Cartesian coordinates are coordinates that measure the position of a point from a defined origin along
axes which are perpendicular in the represented two-dimensional or three-dimensional space.
Geodetic Coordinates
Geodetic coordinates, sometimes called geographic coordinates, are angular coordinates (longitude
and latitude), closely related to spherical polar coordinates, and are defined relative to a particular
earth geodetic datum.
Projected Coordinates
Projected coordinates are planar Cartesian coordinates that result from performing a mathematical
mapping from a point on the earth's surface to a plane. There are many such mathematical mappings,
each used for a particular purpose.
Geodetic Datum
A geodetic datum is a means of representing the figure of the earth, usually as an oblate ellipsoid of
revolution, which approximates the surface of the earth locally or globally, and is the reference for the
system of geodetic coordinates.
Non projected
Projected
The picture on the left shows a map of the United States on a flat Cartesian plane. The picture on the
right shows map of United States projected to a Universal Transfer Mercator (UTM) taking into
account the spherical shape of the earth
• Defined by the
– SEMI_MAJOR_AXIS
– INVERSE_FLATTENING
• MDSYS.SDO_ELLIPSOIDS lists the supported
ellipsoids
• A WKT:
– Defines the CS in Spatial
– Is in the WKTEXT column in the CS_SRS table
• Spatial uses a WKT which conforms to the OGC standard
• The grammer for the WKT is given in the user guide
• This grammer should be used for adding user defined
CSs
Geodetic CS
Projected CS
'PROJCS["Wyoming 4901, Eastern Zone (1983, meters)",
GEOGCS [ "GRS 80", DATUM ["GRS 80", SPHEROID ["GRS
80", 6378137.000000, 298.257222]], PRIMEM [ "Greenwich",
0.000000 ], UNIT ["Decimal Degree",
0.01745329251994330]], PROJECTION ["Transverse
Mercator"], PARAMETER ["Scale_Factor", 0.999938],
PARAMETER ["Central_Meridian", -105.166667],
PARAMETER ["Latitude_Of_Origin", 40.500000],
PARAMETER ["False_Easting", 200000.000000], UNIT
["Meter", 1.000000000000]]'
('UTM Zone 44, Northern Hemisphere (WGS 84)', 82378, 82378, 'Oracle',
'PROJCS["UTM Zone 44 Northern Hemisphere (WGS 84)", GEOGCS [ "WGS 84",
DATUM ["WGS 84 ", SPHEROID ["WGS 84", 6378137.000000, 298.257224]],
PRIMEM [ "Greenwich", 0.000000 ], UNIT ["Decimal Degree", 0.01745329251994330]],
PROJECTION ["Transverse Mercator"], PARAMETER ["Scale_Factor", 0.999600],
PARAMETER ["Central_Meridian", 81.000000], PARAMETER ["False_Easting", 500000.000000],
UNIT ["Meter", 1.000000000000]]');
Linear Referencing
Linear referencing is a natural and convenient means to associate attributes or events to locations or
portions of a linear feature. It has been widely used in transportation applications (such as for
highways, railroads, and transit routes) and utilities applications (such as for gas and oil pipelines).
The major advantage of linear referencing is its capability of locating attributes and events along a
linear feature with only one parameter (usually known as a measure) instead of two (such as
latitude/longitude or x/y in Cartesian space). Sections of a linear feature can be referenced and created
dynamically by indicating the start and end locations along the feature without explicitly storing them.
Linear Referencing System (LRS) Application Programming Interface (API)
The linear referencing system (LRS) application programming interface (API) in Oracle9i Spatial
provides server-side LRS capabilities at the cartographic level. The linear measure information is
directly integrated into the Oracle Spatial geometry structure. The LRS API provides support for
dynamic segmentation, and it serves as a groundwork for third-party or middle-tier application
development virtually for any linear referencing methods and models in any coordinate systems.
(50,15,53.8)
(5,10,0) (30,10,27)
(45,10,44)
(15,5,11.2) (40,5,38)
Geometric segments are basic LRS elements in Oracle Spatial. They are Oracle line string geometries.
An Oracle line string is an ordered, non-branching, and continuous geometry. A geometric segment
must contain at least start and end measures for its start and end points. Measures of points of interest
(such as highway exits) on the geometric segments can also be assigned. These measures are either
assigned by users or derived from existing geometric segments. The slide shows a geometric segment
with four line segments and one arc. Points on the geometric segment are represented by triplets (x, y,
m), where x and y describe the location and m denotes the measure.
• Shape points
– Points along the line string that have measures
– Can correspond to geometry points
• Direction of the segment is defined by the order in which
the shape points are listed
(55,20,60)
(50,15,?)
(5,10,0) (30,10,27)
(45,10,?)
(15,5,?) (40,5,?)
Shape points are points that are specified when an LRS segment is constructed, and that are assigned
measure information. In Oracle9i Spatial, a line segment is represented by its start and end points, and
an arc is represented by three points: start, middle, and end points of the arc. You must specify these
points as shape points, but you can also specify other points as shape points if you need measure
information stored for these points. For example, an exit in the middle of a straight part of the
highway.
Thus, shape points can serve one or both of the following purposes:
• Indicate the direction of the segment (for example, a turn or curve)
• Identify a point of interest for which measure information is to be stored.
Shape points might not directly relate to mileposts or reference posts in LRS; they are used as internal
reference points. The measure information of shape points is automatically populated when the LRS
segment is defined. The direction of a geometric segment is indicated from the start point of the
geometric segment to the end point. Measures of points on a geometric segment always increase along
the direction of the geometric segment.
End point
t)
offse
-
Measure Offset ft» ( fset)
«le o f
+
Start ht» (
point «rig
Linear Measure
The measure of a point along a geometric segment is the linear distance (in the measure dimension)
measured from the start point of the geometric segment. The measure information does not necessarily
have to be of the same scale as their Euclidean distance. However, the linear mapping relationship
between measure and distance is always preserved.
Some LRS functions use offset instead of measure to represent measured distance along linear
features. Although some other linear referencing systems might use offset to mean what LRS refers to
as measure, offset has a different meaning in LRS from measure.
Offset
The offset of a point along a geometric segment is the perpendicular distance between the point and
the geometric segment. Offsets are positive if points are on the right side along the segment direction
and are negative if they are on the left side. Points are on a geometric segment if their offsets to the
segment are zero.
End point
t)
offse
Measure Offset ft» ( - fset)
«le (+ o
f
Start ht»
point «rig
The projection of a point along a geometric segment is the point on the geometric segment with the
minimum distance to the point. The measure information of the resulting point is also returned in the
point geometry.
Linear features are any spatial objects that can be treated as a logical set of linear segments. Examples
of linear features are highways in transportation applications and pipelines in utility industry
applications.
INSERT
INSERT INTO
INTO user_sdo_geom_metadata
user_sdo_geom_metadata VALUES
VALUES ((
'ROADS',
'ROADS',
'GEOMETRY',
'GEOMETRY',
MDSYS.SDO_DIM_ARRAY
MDSYS.SDO_DIM_ARRAY ((
MDSYS.SDO_DIM_ELEMENT
MDSYS.SDO_DIM_ELEMENT
('Long',
('Long', -180,
-180, 180,
180, .005),
.005),
MDSYS.SDO_DIM_ELEMENT
MDSYS.SDO_DIM_ELEMENT
('Lat',
('Lat', -90,
-90, 90,
90, .005),
.005),
MDSYS.SDO_DIM_ELEMENT
MDSYS.SDO_DIM_ELEMENT
('Measure',
('Measure', 0,1000,
0,1000, 0)
0) ),
),
NULL
NULL );
);
The LRS data model incorporates measure information into its geometry representation at the point
level. The measure information is directly integrated into the Oracle Spatial model. To accomplish
this, an additional measure dimension must be added to the Oracle Spatial metadata.
LRS affects the Spatial metadata and data (the geometries). The example in the slide shows how a
measure dimension can be added to 2-dimensional geometries in the Spatial metadata. The measure
dimension is assumed to be the last element of the SDO_DIM_ARRAY in a spatial object definition
STATE_LRS_DIM
STATE_LRS_DIM
-------------
-------------
00
The intent of this query is to return multiple geometries that represent the union of counties that have
any interaction with I93 grouped by state. There is one aggregated geometry for each state.
I93
• SDO_MBR • SDO_AGGR_MBR
• SDO_UNION • SDO_AGGR_UNION
• SDO_CENTROID • SDO_AGGR_CENTROID
• SDO_CONVEXHULL • SDO_AGGR_CONVEXHULL
Extensible Indexing supports partitioning of domain indexes in Oracle9i. In this lesson, we describe how
using these new features of Oracle9i. Oracle9i Spatial supports partitioned spatial indexes, and parallel
processing of spatial indexes.
These new features are expected to enhance the performance of the following operations on spatial indexes:
• Index creation
• Join operations
• Large window queries that access a substantial portion of the indexes.
• Concurrent queries that access different partitions
Oracle9i supports creation and maintenance of domain-based indexes using the extensible indexing
framework. Oracle9i Spatial supports a new datatype called SDO_GEOMETRY which models up to 4-
dimensional geometries that occur in geographic and cad/cam applications. To index such geometries,
Oracle9i Spatial defines a new type of domain index called the SPATIAL_INDEX. This INDEXTYPE
behaves as one of two well-known spatial indexes: a quadtree, or an R-Tree. All of these indexes are
created based on the parameters specified by the user during index creation.
Of the two variants, a quadtree indexes only 2-dimensional spatial geometries whereas an R-Tree can index
more than 2-dimensional data.
Performance and tuning features are planned for Oracle9i Spatial, but will not be delivered in the Beta
kit.