Changes between Version 17 and Version 18 of FDORfc16


Ignore:
Timestamp:
Mar 24, 2008, 10:34:43 PM (16 years ago)
Author:
jbirch
Comment:

Minor schema changes, discussed in IRC.

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc16

    v17 v18  
    88||RFC Template Version||(1.0)||
    99||Submission Date||2008-03-18||
    10 ||Last Modified||Traian Stanev 2008-03-19||
     10||Last Modified||Jason Birch 2008-03-24||
    1111||Author||Traian Stanev||
    1212||RFC Status||draft||
     
    3131== What makes a valid spatial SQLite database? ==
    3232
    33 The goal of this provider is to allow access to SQLite databases in as open and standard way as possible.
    34 Here is the minimum set of characteristics the provider will expect in SQLite database:
     33The goal of this simple specification is to allow access to SQLite databases in as open and standard way as possible.  This document does ''not'' conform to the OGC Simple Features for SQL implementation specification ([http://www.opengeospatial.org/standards/sfs 06-104r3]), but it does leverage the specification where practical.
    3534
    36  * geometry_columns table, as per SF spec, Part 2, SQL Option, section 6.2.1;
    37  * spatial_ref_sys table as per SF spec;
    38  * g_geometry_format column in geometry_columns table, set to one of WKB. FGF or WKT. If not present, WKB will be assumed as geometry format.
     35Here is the minimum set of characteristics expected in SQLite database:
    3936
     37 * well-defined subset of the geometry_columns table (as per SF spec, section 7.1.3.2, 7.1.3.3); see below for specific column requirements,
     38 * spatial_ref_sys table (as per SF spec, section 7.1.2.2, 7.1.2.3)
     39 * geometry_format column extending the geometry_columns table, set to one of WKB, WKT, WKB12, WKT12 or FGF. If not present, WKB will be assumed.
     40 * one or more tables to store the geometry and associated features.  Although in general [http://www.sqlite.org/datatype3.html type does not matter in SQLite], BLOB type is recommended at least for WKB and FGF formats as it does not perform character translation on the data.
     41
     42Note that this implementation does ''not'' currently include support for the enhanced multi-dimensional WKB and WKT formats that are defined in the OGC Simple Feature Access specification [http://www.opengeospatial.org/standards/sfa 06-103r3].  The tags WKB12 and WKT12 are reserved for future use in support of this enhanced format.  FGF refers to the [http://fdo.osgeo.org/files/fdo/docs/FDG_FDODevGuide/files/WSfacf1429558a55de8821c21057fbebc2b-789.htm FDO Binary Geometry Format].
     43
     44== geometry_columns Subset ==
     45
     46SQLite databases require the following fields in their geometry_columns table.  Other fields are permitted, but will not affect data access.  For detailed explanations of all of the standard fields (everything but geometry_format), see the SFSQL [http://www.opengeospatial.org/standards/sfs 06-104r3] document, section 7.1.3.3.
     47
     48|| Column Name || Type || Notes ||
     49|| f_table_name || VARCHAR || name of a feature table with a geometry column. ||
     50|| f_geometry_column || VARCHAR || name of a geometry column in the feature table ||
     51|| geometry_type || INTEGER || integer value representing the form of geometry (1=POINT, 2=LINESTRING, etc).  See Table 4 on Page 29-31 of the SFSQL [http://www.opengeospatial.org/standards/sfs 06-104r3] spec for a full list. ||
     52|| coord_dimension || INTEGER || dimensionality of the geometric features: 2, 3 or 4 ||
     53|| srid || INTEGER || foreign key into the spatial_ref_sys table ||
     54|| geometry_format || VARCHAR || One of "WKB", "WKT", "WKB12", "WKT12", "FGF" ||
     55
     56The suggested definition is:
     57
     58{{{
     59CREATE TABLE geometry_columns (
     60            f_table_name VARCHAR,
     61            f_geometry_column VARCHAR,
     62            geometry_type INTEGER,
     63            coord_dimension INTEGER,
     64            srid INTEGER,
     65            geometry_format VARCHAR )
     66}}}
    4067
    4168== Proposed FDO Provider ==
     
    4471
    4572 * Data stored and consumed in native SQLite format, and therefore accessible to other SQLite-based applications;
    46  * Geometry will be serialized as BLOBs in FDO geometry format (FGF), WKB , or WKT 1.2 format. The type of geometry encoding will be specified in the geometry_columns table (see below) in a column named g_geometry_format. In addition, the provider may support point geometry with coordinates stored in non-geometric columns, via a connection string setting.
    47  * A non-persistent, spatial index usable for BBOX queries built on the fly and valid for the duration of the FDO connection;
     73 * Geometry will be serialized in FDO geometry format (FGF), WKB, or WKT and stored in a BLOB column.  The type of geometry encoding will be specified in the geometry_columns table in a column named geometry_format. In addition, the provider may support point geometry with coordinates stored in non-geometric columns, via a connection string setting.
     74 * A non-persistent spatial index usable for BBOX queries, built on the fly and valid for the duration of the FDO connection;
    4875 * Execution of arbitrary SQL commands;
    49  * Metadata about feature geometry and coordinate systems will be stored in OGC geometry_columns and spatial_ref_sys tables, according to Section 6.2.1 of the OGC Simple Feature spec, Part 2;
     76 * Metadata about feature geometry and coordinate systems will be stored in OGC geometry_columns and spatial_ref_sys tables;
    5077 * A tentative list of supported FDO commands : !DescribeSchema, Select, !SelectAggregates, Insert, Update, Delete, !GetSpatialContexts, arbitrary SQL, !ApplySchema, !CreateDataStore;
    5178
     
    5986 * Any other exotic feature you can think of.
    6087
    61 
    62 == geometry_columns ==
    63 
    64 || Column Name || Type || Notes ||
    65 || f_table_catalog || VARCHAR || blank ||
    66 || f_table_schema || VARCHAR || blank ||
    67 || f_table_name || VARCHAR || name of a feature table with a geometry column ||
    68 || f_geometry_column || VARCHAR || name of a geometry column in the feature table ||
    69 || f_geometry_format || VARCHAR || One of "WKT", "WKB", "FGF", ... (should we differentiate between 1.0 and 1.2 geometries?) ||
    70 || coord_dimension || INTEGER || 2, 3 or 4 ||
    71 || srid || INTEGER || shared key with spatial_ref_sys table ||
    72 || type || VARCHAR || geometry class name, one of GEOMETRY, GEOMETRYCOLLECTION, POINT, MULTIPOINT, POLYGON, MULTIPOLYGON, LINESTRING, or MULTILINESTRING ||
    73 
    74 The above definition is related to the SFSQL specification from OGC and closely matches the PostGIS definition (with the addition of the f_geometry_format field).  The suggested definition is:
    75 
    76 {{{
    77 CREATE TABLE geometry_columns (
    78             f_table_catalog VARCHAR,
    79             f_table_schema VARCHAR,
    80             f_table_name VARCHAR,
    81             f_geometry_column VARCHAR,
    82             f_geometry_format VARCHAR,
    83             type VARCHAR,
    84             coord_dimension INTEGER,
    85             srid INTEGER )
    86 }}}
    87 
    8888== Implications ==
    8989
    90 This is a new provider, so there will be no issues with backwards compatibility. We need to coordinate with the GDAL/OGR project
    91 to make sure the metadata and geometry formats are usable by both FDO and OGR.
     90This is a new provider, so there will be no issues with backwards compatibility. We need to coordinate with the GDAL/OGR project (and any other data access libraries that express an interest) to make sure the metadata and geometry formats are usable cross-platform.
    9291
    9392== Test Plan ==
     
    104103 * [http://fdo.osgeo.org/files/fdo/docs/FDG_FDODevGuide/files/WSfacf1429558a55de8821c21057fbebc2b-789.htm FGF Binary Specification]
    105104 * [http://www.opengeospatial.org/standards/sfs OGC Simple Features for SQL] (see 06-104r3)
     105 * [http://www.opengeospatial.org/standards/sfa OGC Simple Feature Access] (see 06-103r3)
    106106