Академический Документы
Профессиональный Документы
Культура Документы
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
Ceil Ceiling
Degrees( x Double precision ) : returns the argument x, converted from radians to degrees Double precision Exp( x Double precision ) : Double precision Floor( x Double precision ) : Double precision Ln( x Double precision ) : Double precision Log( x Double precision ) : Double precision Log( b Double precision , x Double precision ) : Double precision returns the value of e (the base of natural logarithms) raised to the power of x the inverse of this function is Log() (using a single argument only) or Ln() returns the largest integer value not greater than x
Exp
Floor
Ln Log
returns the natural logarithm of x; that is, the base-e logarithm of x If x is less than or equal to 0, then NULL is returned
Log
returns the logarithm of x to the base b If x is less than or equal to 0, or if b is less than or equal to 1, then NULL is returned Log(b, x) is equivalent to Log(x) / Log(b)
Log2
Log2( x Double precision ) : Double precision Log10( x Double precision ) : Double precision PI( void ) : Double precision Pow( x Double precision , y Double precision ) : Double precision
returns the base-2 logarithm of x Log2(x) is equivalent to Log(x) / Log(2) returns the base-10 logarithm of x Log10(x) is equivalent to Log(x) / Log(10) returns the value of PI
Log10 PI
Pow Power
returns the value of x raised to the power of y Power( x Double precision , y Double precision ) : Double precision Radians( x Double precision ) : returns the argument x, converted from degrees to radians Double precision Round( x Double precision ) : Double precision returns the integer value nearest to x
Radians Round
1 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
returns the sign of the argument as -1, 0, or 1, depending on whether x is negative, zero, or positive. returns the sine of x, where x is given in radians returns the square root of a non-negative number x
Stddev_pop( x Double precision returns the population standard deviation of the input values ) : Double precision aggregate function Stddev_samp( x Double precision ) : Double precision Tan( x Double precision ) : Double precision returns the sample standard deviation of the input values aggregate function returns the tangent of x, where x is given in radians
Var_pop
returns the population variance of the input values (square of the population Var_pop( x Double precision ) : standard deviation) Double precision aggregate function returns the sample variance of the input values (square of the sample standard Var_samp( x Double precision ) deviation) : Double precision aggregate function
Var_samp
IsZipBlob
IsPdfBlob
IsGifBlob
IsPngBlob
IsTiffBlob
IsWaveletBlob
IsJpegBlob
IsExifBlob
IsExifGpsBlob
2 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
Integer TRUE if this BLOB object corresponds to a valid EXIF-GPS image Please note: any valid EXIF-GPS image is a valid EXIF and JPEG as well
GeomFromExifGpsBlob
BuildMbr
BuildCircleMbr
MbrMinX
MbrMinY
MbrMaxX
MbrMaxY
SQL functions for constructing a geometric object given its Well-known Text Representation
Function GeomFromText PointFromText Syntax GeomFromText( wkt String [ , SRID Integer] ) : Geometry PointFromText( wktPoint String [ , SRID Integer] ) : Point LineFromText( wktLineString String [ , SRID Integer] ) : Linestring X LineStringFromText( wktLineString String [ , SRID Integer] ) : Linestring PolyFromText( wktPolygon String [ , SRID Integer] ) : Polygon X PolygonFromText( wktPolygon String [ , SRID Integer] ) : Polygon MPointFromText( wktMultiPoint String [ , SRID Integer] ) : MultiPoint X MultiPointFromText( X X X construct a MultiPoint X X X construct a Polygon X X X construct a Linestring OpenGis SpatiaLite PROJ GEOS defined base included included X X X X X X X X Summary construct a geometric object given its Well-known text Representation construct a Point
LineFromText LineStringFromText
PolyFromText PolygonFromText
MPointFromText MultiPointFromText
3 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
MLineFromText MultiLineStringFromText
construct a MultiLinestring
MPolyFromText MultiPolygonFromText
construct a MultiPolygon
GeomCollFromText GeometryCollectionFromText
construct a GeometryCollection
SQL functions for constructing a geometric object given its Well-known Binary Representation
Function Syntax GeomFromWKB( wkbGeometry Binary [ , SRID Integer] ) : Geometry PointFromWKB( wkbPoint Binary [ , SRID Integer] ) : Point LineFromWKB( wkbLineString Binary [ , SRID Integer] ) : Linestring X LineStringFromText( wkbLineString Binary [ , SRID Integer] ) : Linestring PolyFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon X PolygonFromWKB( wkbPolygon Binary [ , SRID Integer] ) : Polygon MPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint X MultiPointFromWKB( wkbMultiPoint Binary [ , SRID Integer] ) : MultiPoint MLineFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring X MultiLineStringFromWKB( wkbMultiLineString Binary [ , SRID Integer] ) : MultiLinestring MPolyFromWKB( X X X construct a MultiLinestring X X X construct a MultiPoint X X X construct a Polygon X X X construct a Linestring OpenGis SpatiaLite PROJ GEOS defined base included included X X X X Summary construct a geometric object given its Well-known binary Representation construct a Point
GeomFromWKB
PointFromWKB
LineFromWKB LineStringFromWKB
PolyFromWKB PolygonFromWKB
MPointFromWKB MultiPointFromWKB
MLineFromWKB MultiLineStringFromWKB
4 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
MPolyFromWKB MultiPolygonFromWKB
construct a MultiPolygon
GeomCollFromWKB GeometryCollectionFromWKB
construct a GeometryCollection
SQL functions for obtaining the Well-known Text / Well-known Binary Representation of a geometric object
Function AsText AsBinary Syntax AsText( geom Geometry ) : String AsBinary( geom Geometry ) : Binary OpenGis SpatiaLite PROJ GEOS defined base included included X X X X X X X X Summary returns the Well-known Text representation returns the Well-known Binary representation
AsSVG
AsFGF
GeomFromFGF
Dimension
GeometryType
SRID
IsEmpty
5 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
corresponds to the empty set The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if this geometric object is simple, as defined in the Geometry Model The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if this geometric object does not contains any topological error
IsSimple
IsValid
Boundary
returns a geometric object that is the combinatorial boundary of g as defined in the Geometry Model returns the rectangle bounding g as a Polygon. The Polygon is defined by the corner points of the bounding box [(MINX, MINY),(MAXX, MINY), (MAXX, MAXY), (MINX, MAXY), (MINX, MINY)].
Envelope
GLength
IsClosed
The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; return TRUE if c is closed, i.e., if StartPoint(c) = EndPoint(c) The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. return TRUE if c is a ring, i.e., if c is closed and simple. A simple Curve does not pass through the same Point more than once.
IsRing
6 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
same Point more than once. Simplify( c Curve , tolerance Double precision ) : Curve return a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance return a geometric object representing a simplified version of c applying the Douglas-Peukert algorithm with given tolerance and respecting topology
Simplify
SimplifyPreserveTopology
NumInteriorRing NumInteriorRings
InteriorRingN
GeometryN
MbrEqual
7 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
MBRs The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if the intersection of g1 and g2 MBRs is the empty set The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if the only Points in common between g1 and g2 MBRs lie in the union of the boundaries of g1 and g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if g1 MBR is completely contained in g2 MBR The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if the intersection of g1 and g2 MBRs results in a value of the same dimension as g1 and g2 that is different from both g1 and g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; convenience predicate: TRUE if the intersection of g1 and g2 MBRs is not empty The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; convenience predicate: TRUE if g2 MBR is completely contained in g1 MBR
MbrDisjoint
MbrTouches
MbrWithin
MbrOverlaps
MbrIntersects
MbrContains
Equals
Disjoint
8 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
invocation on NULL arguments. TRUE if the intersection of g1 and g2 is the empty set The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if the only Points in common between g1 and g2 lie in the union of the boundaries of g1 and g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if g1 is completely contained in g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments. TRUE if the intersection of g1 and g2 results in a value of the same dimension as g1 and g2 that is different from both g1 and g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments.
Touches
Within
Overlaps
Crosses
TRUE if the intersection of g1 and g2 results in a value whose dimension is less than the maximum dimension of g1 and g2 and the intersection value includes Points interior to both g1 and g2, and the intersection value is not equal to either g1 or g2 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; convenience predicate: TRUE if the intersection of g1 and g2 is not empty The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; convenience predicate: TRUE if g2 is completely contained in g1 The return type is Integer, with a return value of 1 for TRUE, 0 for FALSE, and 1 for UNKNOWN corresponding to a function invocation on NULL arguments; returns TRUE if the spatial relationship specified by the patternMatrix holds
Intersects
Contains
Relate
9 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
Distance
Intersection
Difference
GUnion
return a geometric object that is the set union of geom1 and geom2
GUnion
return a geometric object that is the set union of input values aggregate function return a geometric object that is the closure of the set symmetric difference of geom1 and geom2 (logical XOR of space) return a geometric object defined by buffering a distance d around geom, where dist is in the distance units for the Spatial Reference of geom return a geometric object that is the convex hull of geom
SymDifference
Buffer
Buffer( geom Geometry , dist Double precision ) : Geometry ConvexHull( geom Geometry ) : Geometry
ConvexHull
Transform
Transform( geom Geometry , newSRID Integer ) : Geometry ShiftCoords( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry
ShiftCoords ShiftCoordinates
ShiftCoordinates( geom Geometry , shiftX Double precision , shiftY Double precision ) : Geometry ScaleCoords( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry
return a geometric object obtained by translating coordinates according to shiftX and shiftY values
return a geometric object obtained by scaling coordinates according to scaleX and scaleY values if only one scale factor is specified, then an isotropic scaling occurs [i.e. the same scale factor is applied to both axis] otherwise an anisotropic scaling occurs [i.e. each axis is scaled according to its own scale factor]
ScaleCoords ScaleCoordinates
X ScaleCoordinates( geom Geometry , scaleX Double precision [ , scaleY Double precision ] ) : Geometry RotateCoords( geom Geometry , angleInDegrees Double precision ) : Geometry
10 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
RotateCoords RotateCoordinates
precision ) : Geometry X RotateCoordinates( geom Geometry , angleInDegrees Double precision ) : Geometry ReflectCoords( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry X ReflectCoordinates( geom Geometry , xAxis Integer , yAxis Integer ) : Geometry SwapCoords( geom Geometry ) : Geometry X SwapCoordinates( geom Geometry ) : Geometry X X X X X X
return a geometric object obtained by reflecting coordinates according to xAxis and yAxis switches i.e. if xAxis is 0 (FALSE), then x-coordinates remains untouched; otherwise x-coordinates will be reflected
ReflectCoords ReflectCoordinates
SwapCoords SwapCoordinates
InitSpatialMetaData
AddGeometryColumn
11 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
Validates an existing ordinary column in order to possibly transform it in a real geometry column, thus updating the Spatial Metadata tables and creating any required trigger in order to enforce constraints the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Removes a geometry column from Spatial MetaData tables and drops any related trigger the column itself still continues to exist untouched as an ordinary, unconstrained column the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Builds an RTree Spatial Index on a geometry column, creating any required trigger required in order to enforce full data coherency between the main table and Spatial Index the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Builds an MbrCache on a geometry column, creating any required trigger required in order to enforce full data coherency between the main table and the MbrCache the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Disables an RTree Spatial Index or MbrCache, removing any related trigger X X X the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
RecoverGeometryColumn
RecoverGeometryColumn( table String , column String , srid Integer , geom_type String , dimension Integer ) : Integer
DiscardGeometryColumn
CreateSpatialIndex
CreateMbrCache
DisableSpatialIndex
CheckSpatialMetaData
AutoFDOStart
12 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
VirtualFDO tables have been created] This function will inspect the Spatial Metadata, then automatically destroying any VirtualFDO wrapper found the return type is Integer [how many VirtualFDO tables have been destroyed] Creates the geometry_columns and spatial_ref_sys metadata tables the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Please note: Spatial Metadata created using this function will have the FDO/OGR layout, and not the SpatiaLite's own Creates a new geometry column updating the FDO/OGR Spatial Metadata tables geom_type has to be one of the followings: 1 POINT 2 LINESTRING 3 POLYGON 4 MULTIPOINT 5 MULTILINESTRING 6 MULTIPOLYGON 7 GEOMETRYCOLLECTION dimension may be 2, 3 or 4, accordingly to OGR/FDO specs geometry_format has to be one of the followings: 'WBT' 'WKT' 'FGF' the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Validates an existing ordinary column in order to possibly transform it in a real geometry column, thus updating the FDO/OGR Spatial Metadata tables the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE Removes a geometry column from FDO/OGR Spatial MetaData tables the column itself still continues to exist untouched as an ordinary column the return type is Integer, with a return value of 1 for TRUE or 0 for FALSE
AutoFDOStop
InitFDOSpatialMetaData
AddFDOGeometryColumn
AddFDOGeometryColumn( table String , column String , srid Integer , geom_type Integer , dimension Integer, geometry_format String ) : Integer
RecoverFDOGeometryColumn( table String , column String , srid Integer , geom_type String RecoverFDOGeometryColumn , dimension Integer, geometry_format String ) : Integer
13 von 14
29.08.2011 12:38
http://www.gaia-gis.it/spatialite/spatialite-sql-2.3.1.html
FilterMbrWithin
precision , y1 Double precision , x2 Double precision , y2 Double precision ) FilterMbrContains( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision ) FilterMbrIntersects( x1 Double precision , y1 Double precision , x2 Double precision , y2 Double precision )
entity whose MBR falls within the rectangle identified by extreme points x1 y1 and x2 y2 Retrieves from an MbrCache any entity whose MBR contains the rectangle identified by extreme points x1 y1 and x2 y2 Retrieves from an MbrCache any entity whose MBR intersects the rectangle identified by extreme points x1 y1 and x2 y2 Creates an MBR identified by extreme points x1 y1 and x2 y2
FilterMbrContains
FilterMbrIntersects
BuildMbrFilter
This fuction is used internally by triggers related to MbrCache management, and is not intended for any other usage
14 von 14
29.08.2011 12:38