Download oracle.spatial.util




















If they are not disjoint, this function may return incorrect results. Number of units to be converted. For example, to convert 10 decimal degrees to radians, specify The unit of measure from which to convert the input value. For example, to convert decimal degrees to radians, specify Degree. The unit of measure into which to convert the input value. For example, to convert decimal degrees to radians, specify Radian. The value returned by this function might not be correct at an extremely high degree of precision because of the way internal mathematical operations are performed, especially if they involve small numbers or irrational numbers such as pi.

For example, converting 1 decimal degree into decimal minutes results in the value The surfaces are simple polygons without interiors. This function does not check the validity of the returned simple solid geometry. Must be uppercase. Interval value to be used for the geometry densification. Should be a positive number. Zero or a negative number causes the input geometry to be returned. The default is For a geodetic geometry, the default is meters.

This function densifies the input geometry by adding more points so that no line segment is longer than the given interval. This function is useful when a geodetic long line is to be shown on a planar map by showing the curvature of the great circle interpolation. When displaying geodetic geometries on a flat or planar map, the function helps you see the geodesic path between vertices along a line string or polygon, instead of connecting those vertices with straight lines.

The densification is performed along the geodesic path. The following example densifies an input geometry. Descriptive comments are added in the output. Drops any transient "scratch" tables and views in the current schema that were created during the creation of a point cloud or TIN. Object ID string representing a hexadecimal number.

Use the string given in the error message that indicated that scratch tables need to be dropped. Length in meters of the semi-major axis of the ellipse to be used to create the returned geometry. Length in meters of the semi-minor axis of the ellipse to be used to create the returned geometry.

Number of degrees of the azimuth clockwise rotation of the major axis from north of the ellipse to be used to create the returned geometry. Must be from 0 to The returned geometry is rotated by the specified number of degrees.

This function is useful for creating an ellipse-like polygon around a specified center point when a true ellipse cannot be used an ellipse is not valid for geodetic data with Oracle Spatial and Graph. If none of the rings in the input geometry are specified in optimized form optimized rectangles , the function returns the input geometry. This function can be useful if you use any applications that do not work with optimized rectangles, or if you prefer to use simple polygons instead of optimized rectangles.

The following example uses an input geometry whose exterior and interior polygon rings are optimized rectangles and in this case, squares : the exterior ring is 8x8, and the interior ring is 2x2. It returns a geometry whose exterior and interior rings are specified as simple polygons.

Returns the two-dimensional geometry that represents a specified element and optionally a ring of the input two-dimensional geometry.

Number of the element in the geometry: 1 for the first element, 2 for the second element, and so on. Number of the subelement ring within element : 1 for the first subelement, 2 for the second subelement, and so on. This parameter is valid only for specifying a subelement of a polygon with one or more holes or of a point cluster:. For a polygon with holes, its first subelement is its exterior ring, its second subelement is its first interior ring, its third subelement is its second interior ring, and so on.

For example, in the polygon with a hole shown in Polygon with a Hole , the exterior ring is subelement 1 and the interior ring the hole is subelement 2. For a point cluster, its first subelement is the first point in the point cluster, its second subelement is the second point in the point cluster, and so on.

This function applies to two-dimensional geometries only. This function is useful for extracting a specific element or subelement from a complex geometry. For a polygon with one or more holes, the returned geometry representing an extracted interior ring is reoriented so that its vertices are presented in counterclockwise order as opposed to the clockwise order within an interior ring.

Type 0 elements are described in Type 0 Zero Element. This function is not intended for use with geometries that have any null ordinate values. Any null ordinate values in the returned geometry are replaced by 0 zero. An exception is raised if element or ring is an invalid number for geometry.

The following example inserts a polygon with a hole using the same INSERT statement as in Example in Polygon with a Hole , and extracts the geometry representing the hole the second subelement.

Notice that in the geometry returned by the EXTRACT function, the vertices are in counterclockwise order, as opposed to the clockwise order in the hole second subelement in the input geometry. Returns all elements and subelements of the input two-dimensional geometry, as an array of one or more geometries. A flag indicating whether to "flatten" rings into individual geometries for geometries that contain an exterior ring and one or more interior rings:.

A geometry will still be returned for each element of the input geometry. For example, if a polygon contains an outer ring and an inner ring, a value of 0 returns a single geometry containing both rings, and a value of 1 returns two geometries, each containing a ring as a geometry.

This parameter is ignored for geometries that do not contain an exterior ring and one or more interior rings. This function enables you to extract all elements and subelements from a geometry, regardless of how many elements and subelements the geometry has. For a polygon with one or more holes, with the default value for the flatten parameter, the returned geometry representing an extracted interior ring is reoriented so that its vertices are presented in counterclockwise order as opposed to the clockwise order within an interior ring.

However, if the flatten parameter value is 0, no reorientation is performed. Returns the three-dimensional geometry that represents a specified subset of the input three-dimensional geometry.

A comma-delimited string of numbers that identify the subset geometry to be returned. Each number identifies the relative position of a geometry item within the input geometry. The items and their positions within the label string are:. A value of 0 zero means that the item does not apply, and you can omit trailing items that do not apply. For example, '0,2,1,4,1' means that point number does not apply, and it specifies the second edge of the first ring of the fourth polygon of the first composite surface.

This function applies to three-dimensional geometries only. This function uses the getElementByLabel method of the oracle. The following example extracts, from a specified three-dimensional geometry, the subset geometry consisting of the following: edge 2 of ring 1 of polygon 4 of composite surface 1 of the input geometry.

Returns the three-dimensional extrusion solid geometry from an input two-dimensional polygon or multipolygon geometry. Two-dimensional polygon geometry from which to return the extrusion geometry. This geometry forms the "base" of the returned geometry. Ground heights as a set of Z height values at the base of the solid. The numbers in this array should be the Z height values at the base of each vertex in the input geometry. Height values for the extrusion geometry. The numbers in this array should be the Z height values at the "top" of each corresponding point in the grdheight array.

For example, if the ground height at the base of the first vertex is 0 and the height at that vertex is 10, the solid at that point along the base extends 10 units high. Three-dimensional coordinate system SRID to be assigned to the returned geometry. If the input geometry is a polygon with multiple inner rings, this function internally combines these inner rings to make them one inner ring, producing a new geometry that approximately represents the original appearance; the function then performs the extrusion process on this new geometry, and returns the result.

The following example returns the three-dimensional solid geometry representing an extrusion from a two-dimensional polygon geometry. The following example returns the three-dimensional composite solid geometry representing an extrusion from a two-dimensional polygon geometry with inner rings. Converts a geography markup language GML 3. Otherwise, do not specify this parameter. See the Usage Notes for more information.

Some EPSG geodetic coordinate systems have the axis order reversed in their definition. The following example shows conversion to and from GML version 3.

The following example shows conversion to and from GML version 2. A geometry in JSON format can also be converted. The input geometry must be in JSON format. The following example shows conversion to and from JSON format. The following example shows conversion to and from KML format. One or more names from the table with the geographic name hierarchy.

Use commas to separate multiple name values. Determines whether Oracle Text fuzzy matching will be used in finding matches for the name value or values. However, see the Usage Notes for further explanation and examples.

To use this function, you must understand the concepts in Location Data Enrichment , which also describes the necessary setup actions. For the fuzzy parameter, if the value is 0 the default , the values in name must match in spelling the values in the data set for the location, although for a location the data set may permit many variations in spelling and case.

If the value is 1, minor errors in name values like spelling mistakes will also be considered as matching the location. For example:. The following example searches for information about San Francisco. It does not use fuzzy matching. The following example uses fuzzy matching fuzzy value of 1 , and therefore will find matches for San Francisco, California, despite the misspelling of the city name in the name parameter San f Fr ac isco.

Returns a two-dimensional geometry that reflects the footprint of the input three-dimensional geometry. The following example returns the 2D footprint of a 3D geometry. Do not use this type in column definitions or in functions that you create. Get Last Vertex functions. The result shows that the first vertex is at 12,13 and the last vertex is at 20, The output is reformatted for readability. As long as the tolerance value is valid, it does not affect the operation and output of the function, as explained in the Usage Notes.

This function is useful for returning a polyline approximation of the input geometry for further processing by subprograms that cannot directly process NURBS curve geometries. The function is called internally by several Oracle Spatial and Graph functions, and it can also be called directly by users. If the input geometry does not contain at least one NURBS curve element, the function returns the input geometry.

A tolerance value is required as input because of Oracle Spatial and Graph's internal usage of the function. However, for direct calls to the function by users, the specified tolerance value does not affect the returned polyline, which can have up to approximately points.

The end points of the returned line string geometry are the first and last control points, because a NURBS curve is clamped at its end points. Do not use these types in column definitions or functions that you create. This function can be useful in finding a vertex that is causing a geometry to be invalid.

This function only returns the point coordinates and does not return the orientation vectors when the input is an oriented point geometry. See the last example in Examples section. The following example returns both, the coordinates and the orientation vector, as two vertices for an oriented point geometry.

This example uses the point geometry created in Example This procedure is part of the support for using the Oracle transportable tablespace feature with tablespaces that contain any spatial indexes. Use this procedure only either A the import operation of pre-Release Each user that has a spatial index in the tablespace must call the procedure. For pre-Release For detailed information about transportable tablespaces and transporting tablespaces to other databases, see Oracle Database Administrator's Guide.

The following example for an import of pre-Release Varying length array of an object type, ordered by dimension, and has one entry for each dimension. It also creates the spatial index. Coordinate Systems Spatial Reference Systems for detailed information about support for coordinate systems. Returns a point that is guaranteed to be an interior point not on the boundary or edge on the surface of a polygon geometry object. Polygon geometry object. This function returns a point geometry object representing a point that is guaranteed to be an interior point on the surface, but not on the boundary or edge, of geom.

The returned point can be any interior point on the surface; however, if you call the function multiple times with the same geom and tol parameter values, the returned point will be the same. Point geometry object from which to compute the distance at the specified bearing, to locate the desired point. Number of radians, measured clockwise from North. Either convention on ranges will work. Must be less than one-half the circumference of the Earth. The input point geometry must be based on a geodetic coordinate system.

If it is based on a non-geodetic coordinate system, this function returns a null value. The following example returns the point kilometers at a bearing of 1 radian from the point with the longitude and latitude coordinates , The order of the vertices of each resulting line-type element is the same as in the associated polygon-type element, and the start and end points of each line-type segment are the same point.

This function checks for the following problems that can make a geometry invalid, and fixes the problems in the returned geometry:.

If the input geometry has any other problem that makes it invalid, the function raises an exception. If the input geometry is valid, the function returns a geometry that is identical to the input geometry. For information about using this function as part of the recommended procedure for loading and validating spatial data, see Recommendations for Loading and Validating Spatial Data.

In this case, the geometry is valid, so the input geometry is returned. When two consecutive vertices in a geometry are the same or within the tolerance value associated with the geometry, Spatial and Graph considers the geometry to be invalid. This function also closes polygons so that the first vertex of the ring is the same as the last vertex of the ring. Line string geometry whose vertices are to be reversed in the output geometry. The following example returns a line string geometry that reverses the vertices of the input geometry.

Threshold value to be used for the geometry simplification. Zero causes the input geometry to be returned. If the input geometry is geodetic, the value is the number of meters; if the input geometry is non-geodetic, the value is the number of units associated with the data.

As the threshold value is decreased, the returned geometry is likely to be closer to the input geometry; as the threshold value is increased, fewer points are likely to be in the returned geometry. Must not be greater than threshold ; and for better performance, should not be the same as threshold.

If you do not specify a value, the default value is 0. For some line geometries, when the line is simplified, it might end up with self-crossing loops in the middle.

While this is a valid geometry for lines , in some cases it is not desirable to have these loops in the result of the simplify operation. A value of 0 the default does not remove such loops; a value of 1 or any other nonzero positive number removes any such loops and always returns simple line segments. This function also converts arcs to line stings, eliminates duplicate vertices, and corrects many overlapping edge polygon problems.

However, note that if two perfectly aligned geometries are simplified independently, the geometries might not be aligned after simplification. This function is useful when you want a geometry with less fine resolution than the original geometry. For example, if the display resolution cannot show the hundreds or thousands of turns in the course of a river or in a political boundary, better performance might result if the geometry were simplified to show only the major turns. If you use this function with geometries that have more than two dimensions, only the first two dimensions are used in processing the query, and only the first two dimensions in the returned geometry are to be considered valid and meaningful.

This function uses the Douglas-Peucker algorithm, which is explained in several cartography textbooks and reference documents. In some explanations, the term tolerance is used instead of threshold ; however, this is different from the Oracle Spatial and Graph meaning of tolerance.

The returned geometry can be a polygon, line, or point, depending on the geometry definition and the threshold value. The following considerations apply:.

A polygon can simplify to a line or a point and a line can simplify to a point, if the threshold value associated with the geometry is sufficiently large. For example, a thin rectangle will simplify to a line if the distance between the two parallel long sides is less than the threshold value, and a line will simplify to a point if the distance between the start and end points is less than the threshold value. In a polygon with a hole, if the exterior ring or the interior ring the hole simplifies to a line or a point, the interior ring disappears from is not included in the resulting geometry.

Topological characteristics of the input geometry might not be maintained after simplification. For a collection geometry, the number of elements might increase, to prevent overlapping of individual elements. In all cases, this function will not return an invalid geometry. The following example simplifies a line string geometry that reflects the vertices of the road shown in Figure in Example of LRS Functions , although the geometry in this example is not an LRS geometry.

With the threshold value as 6, the resulting line string has only three points: the start and end points, and 12, 4, Figure shows the result of this example. In Figure , the thick solid black line is the resulting geometry, and the thin solid light line between the start and end points is the input geometry. Simplifies the input geometry, based on a threshold value, using the Visvalingham-Whyatt algorithm.

Threshold value to be used for the geometry simplification, expressed as a percentage value between 0 and As the value is decreased, the returned geometry is likely to be closer to the input geometry; as the value is increased, fewer points are likely to be in the returned geometry.

Name of the 3D theme. This function returns the name of the block table for the theme, if the theme has an associated block table. If there is no associated block table, the function returns a null value. This function returns 0 zero if the theme does not have multiple LODs or link to a theme with multiple LODs; otherwise, it returns 1. This function converts the input geometry to a GML version 3.

Polygons must be defined using the conventions for Oracle9 i and later releases of Spatial and Graph. Oracle Multimedia is installed and configured with Oracle Database 11 g , although you can install Oracle Multimedia manually if necessary, as documented in Oracle Multimedia User's Guide.

During the installation of Oracle Multimedia, Locator is installed. In general, Locator includes the data types, operators, and indexing capabilities of Oracle Spatial, along with a limited set of the subprograms functions and procedures of Spatial.

The Locator features include the following:. Spatial operators described in Chapter 19 that use the spatial index for performing spatial queries. Most geometry functions and spatial aggregate functions as explained in Table B Classes in the oracle. For reference and usage information about features supported by Locator, see the chapter or section listed in Table B Implicit coordinate system transformations for operator calls where a window needs to be converted to the coordinate system of the queried layer.

Table partitioning support for spatial indexes including splitting, merging, and exchanging partitions and their indexes. Section 5. Section 6. Oracle Database Advanced Replication. Table B-2 lists Spatial features that are not supported for Locator, with the chapter in this guide or the separate manual that describes the feature. Chapter 7 concepts and usage and Chapter 25 reference. Three-dimensional geometry support: the use of 3D spatial indexing, 3D operators, and subprograms on 3D data is not supported for Locator.

OpenLS support, including support for geocoding, mapping, business directory Yellow Pages , and driving directions routing services.

See also:. Chapter 15 concepts and usage , and Chapter 34 and Chapter 33 reference. Chapter 16 concepts and usage and Chapter 22 reference. Section 1. Classes in packages other than the oracle. Although Locator is available on both the Standard and Enterprise Editions of Oracle Database 11 g , some Locator features require database features that are not available or are limited on the Standard Edition.

Some of those Locator features and their availability are listed in Table B Supported with Enterprise Edition only.



0コメント

  • 1000 / 1000