metadata-4.0
Not logged in

Metadata and statistic infos supported in version 4.0.0

back

The "vector_layers" Metadata view

This new VIEW supports a synoptic snapshot of all "vector layers" available in the database file, irrespectively from their physical storage type.
i.e. all Spatial Tables, Spatial Views and registered Virtual Shapes (aka external Shapefiles) are now nicely accessible altogether using a plain view.
The following example explains how all this practically works.

layer_type table_name geometry_column geometry_type coord_dimension srid spatial_index_enabled
SpatialTablecomuniGeometry 6223032 1
SpatialTableprovinceGeometry 6223032 1
SpatialTableregioniGeometry 6223032 0
SpatialTableregioni_elemGeometry 3223032 1
SpatialViewprov_regGeometry 6223032 1
SpatialViewcom_provGeometry 6223032 1
VirtualShapecom2011Geometry 6223032 0
VirtualShapeprov2011Geometry 6223032 0
VirtualShapereg2011Geometry 6223032 0

This View is based on the following tables: geometry_columns, views_geometry_columns and virts_geometry_columns.


The "geometry_columns_time" Metadata table

This new table keeps trace of the most recent changes affecting each Spatial Table; every INSERT, UPDATE or DELETE operation will now immediately touch the corresponding timestamp value (encoded accordingly to ISO-8601 spcifications).
The conventional timestamp value 0000-01-01T00:00:00.000Z simply intends "this event never occurred".

a very short technical note about the underlying implementation

On v.4.0.0 each Spatial Table is now supported by three more Triggers, each one of them intercepting the corresponding event and keeping care to correctly update the appropriate timestamp value.

The following example explains how all this practically works.
time-triggers
f_table_name f_geometry_column last_insert last_update last_delete
comuniGeometry2012-08-09T17:45:32.312Z 0000-01-01T00:00:00.000Z0000-01-01T00:00:00.000Z
provinceGeometry2012-08-09T17:45:49.429Z 0000-01-01T00:00:00.000Z0000-01-01T00:00:00.000Z
regioniGeometry2012-08-09T17:46:12.684Z 0000-01-01T00:00:00.000Z0000-01-01T00:00:00.000Z
regioni_elemGeometry2012-08-09T17:49:24.843Z 0000-01-01T00:00:00.000Z0000-01-01T00:00:00.000Z


The "vector_layers_statistics" Metadata view

This new VIEW supports a synoptic snapshot of statistic infos for all "vector layers", irrespectively from their physical storage type.
i.e. all Spatial Tables, Spatial Views and registered Virtual Shapes (aka external Shapefiles) are now nicely accessible altogether using a plain view.
The following example explains how all this practically works.

layer_type table_name geometry_column last_verified row_count extent_min_x extent_min_y extent_max_x extent_max_y
SpatialTablecomuniGeometry 2012-08-09T18:36:03.231Z8094 313360.999831 3933878.175118 1312106.500031 5220492.095518
SpatialTableprovinceGeometry 2012-08-09T18:36:03.812Z110 313360.999831 3933878.175118 1312106.500031 5220491.200018
SpatialTableregioniGeometry 2012-08-09T18:36:03.032Z20 313360.999831 3933878.175118 1312106.500031 5220491.200018
SpatialTableregioni_elemGeometry 2012-08-09T18:36:03.351Z551 313360.999831 3933878.175118 1312106.500031 5220491.200018
SpatialViewcom_provGeometry 2012-08-09T18:36:03.687Z8094 313360.999831 3933878.175118 1312106.500031 5220492.095518
SpatialViewprov_regGeometry 2012-08-09T18:36:03.881Z110 313360.999831 3933878.175118 1312106.500031 5220491.200018
VirtualShapecom2011Geometry 2012-08-09T18:36:04.834Z8094 313360.999831 3933878.175118 1312106.500031 5220492.095518
VirtualShapeprov2011Geometry 2012-08-09T18:36:05.125Z110 313360.999831 3933878.175118 1312106.500031 5220491.200018
VirtualShapereg2011Geometry 2012-08-09T18:36:05.448Z20 313360.999831 3933878.175118 1312106.500031 5220491.200018

Please note: the last_verified timestamp allows to check if the collected statistic infos are still valid or not, by performing a simple comparison of the corresponding timestamp values stored in geometry_columns_time.

This View is based on the following tables: geometry_columns_statistics, views_geometry_columns_statistics and virts_geometry_columns_statistics.


The "vector_layers_field_infos" Metadata view

This new VIEW supports a synoptic snapshot of statistic infos for all fields (aka columns) belonging to any "vector layer".
i.e. all Spatial Tables, Spatial Views and registered Virtual Shapes (aka external Shapefiles) are now nicely accessible altogether using a plain view.
The following example explains how all this practically works.

layer_type table_name geometry_column ordinal column_name null_values integer_values double_values text_values blob_values max_size integer_min integer_max double_min double_max
VirtualShapereg2011Geometry 0PKUID0 2000 0NULL1 8094NULLNULL
VirtualShapereg2011Geometry 1Geometry0 000 201481253 NULLNULLNULLNULL
VirtualShapereg2011Geometry 2COD_REG0 2000 0NULL1 20NULLNULL
VirtualShapereg2011Geometry 3NOME_REG0 0020 028 NULLNULLNULLNULL
VirtualShapereg2011Geometry 4SHAPE_Leng0 0200 0NULLNULLNULL 325841.7966132113774.900030
VirtualShapereg2011Geometry 5SHAPE_Area0 0200 0NULLNULLNULL 3260902257.970000 25832379739.500000

Please note: SQLite doesn't supports a strong concept of column datatype. It could be sometimes useful, but surely is not exactly what many popular GIS applications will expect. On SQLite every single cell value can arbitrary be of anyone of the supported datatypes, irrespectively from the specific column declaration: The intended scope of this View is to support GIS clients in determining the exact datatype actually corresponding to each single column: and in the case of TEXT and BLOB to identify the maximum required size.

This View is based on the following tables: geometry_columns_field_infos, views_geometry_columns_field_infos and virts_geometry_columns_field_infos.



The "vector_layers_auth" Metadata view

This new VIEW supports a synoptic snapshot of all "vector layers" available in the database file, irrespectively from their physical storage type.
i.e. all Spatial Tables, Spatial Views and registered Virtual Shapes (aka external Shapefiles) are now nicely accessible altogether using a plain view.
The following example explains how all this practically works.

layer_type table_name geometry_column read_only hidden
SpatialTablecomuniGeometry 00
SpatialTableprovinceGeometry 00
SpatialTableregioniGeometry 00
SpatialTableregioni_elemGeometry 00
SpatialViewcom_provGeometry 00
SpatialViewprov_regGeometry 10
VirtualShapecom2011Geometry 10
VirtualShapeprov2011Geometry 10
VirtualShapereg2011Geometry 10

Please note: now that Updatable Views are supported, not all Views must be assumed to be read-only.
The hidden value could be useful for some smart GIS client, in order to ignore at all some layers (e.g. the ones intended to be effectively accessed via some specific View).

This View is based on the following tables: geometry_columns_auth, views_geometry_columns_auth and virts_geometry_columns_auth.


back