Virtual Tables for Images and Surfaces

Every image and surface in a Manifold project has a virtual table associated with it. Unlike the tables associated with drawings, a virtual table is not listed in the project pane. It is a "virtual" table in that it does not explicitly appear in the project but nonetheless the fields in it may be used. An image's or surface's virtual table may be used within queries by using the name of the image or surface.

 

Each pixel in an image or surface corresponds to a record in that image's or surface's virtual table. The virtual table includes the following columns, which are directly analogous to the built-in intrinsic fields of a drawing's table. These fields are the same that are used when an image or surface is copied and then pasted as a table.

 

Center Latitude (I)

Latitude of the center of this pixel in degrees latitude.

Center Longitude (I)

Longitude of the center of this pixel in degrees longitude.

Center Easting (I)

X coordinate of the center of this pixel in the coordinate system of the image or surface adjusted with the values of the local offset and local scale parameters.

Center Northing (I)

Y coordinate of the center of this pixel in the coordinate system of the image or surface adjusted with the values of the local offset and local scale parameters.

Center X (I)

X coordinate of the center of this pixel in the coordinate system of the image or surface.

Center Y (I)

Y coordinate of the center of this pixel in the coordinate system of the image or surface.

Color (I)

RGB color value expressed as a decimal number (the decimal equivalent to a hexadecimal color value in the form #rrggbb. Read-only for surfaces. Writeable for images.

Red (I)

Red channel value from 0 to 255. Read-only for surfaces. Writeable for images.

Green (I)

Green channel value from 0 to 255. Read-only for surfaces. Writeable for images.

Blue (I)

Blue channel value from 0 to 255. Read-only for surfaces. Writeable for images.

Alpha (I)

Alpha channel value from 0 to 255. Read-only for surfaces. Writeable for images.

Invisible (I)

Boolean: pixel is invisible or visible. Writeable for surfaces. Writeable for images.

Selection (I)

Boolean: currently selected or not. Writeable for surfaces. Writeable for images.

Selection Mask (I)

A byte giving the saved selections mask. Writeable for surfaces. Writeable for images.

Height (I)

For surfaces only: the height of a pixel using whatever data type is used by the surface. Writeable for surfaces.

Easting (I)

X coordinate of the lower left corner of this pixel in the coordinate system of the image or surface adjusted with the values of the local offset and local scale parameters.

Latitude (I)

Latitude of the lower left corner of this pixel in degrees latitude.

Longitude (I)

Longitude of the lower left corner of this pixel in degrees longitude.

Northing (I)

Y coordinate of the lower left corner of this pixel in the coordinate system of the image or surface adjusted with the values of the local offset and local scale parameters.

X (I)

X coordinate of the lower left corner of this pixel in the coordinate system of the image or surface.

Y (I)

Y coordinate of the lower left corner of this pixel in the coordinate system of the image or surface.

X Offset (I)

X position in pixel coordinates from the upper left corner.

Y Offset (I)

Y position in pixel coordinates from the upper left corner, with the Y axis pointing down.

 

Writeable fields are only writeable if the queried component is writeable. If the queried component is read-only (for example, if it resides in a read-only .map file or is shared but not checked out from an Enterprise Edition server), then all columns in its virtual table also will be read-only.

 

The following relationships may help to understand the relationship between different intrinsic columns:

 

§      X Offset (I) equals X (I)

§      Y Offset (I) equals Y (I) counted from the top down

§      Center X (I) equals X (I) + 0.5

§      Center Y (I) equals Y (I) + 0.5

 

Note: Because the maximum number of records in a Manifold table is 4 gigabytes, images and surfaces that have more than 4 gigabytes of pixels (slightly more than 65500 x 65500) are currently not supported with virtual tables. Their virtual tables do not exist and they cannot be used in queries.

 

There are three main uses of virtual tables associated with images or surfaces:

 

§      Storage of Images in Tables - We can use a query to select all columns for all pixels in an image's virtual table and then export that query as a table into an .mdb file or to some other database storage. This is a way of storing images within tables in virtually any database.

 

§      Linked Images, Surfaces or Drawings - Virtual tables allow us to use the power of spatial SQL to utilize all or part of an image or surface in a query. Other components can then be linked from that query. This allows us to create linked images or surfaces from the query. If the query creates point, line or area objects we can even create linked drawings from the query by linking a drawing to the query.

 

§      Editing - Because some columns in virtual tables are writeable (using an update query or a script), virtual tables can be used to edit an image or a surface. The Red (I), Blue (I), Green (I), Alpha (I), Color (I), Selection Mask (I), Selection (I), Invisible (I), and Height (I) columns in virtual tables are writable. Writing to Red (I), Blue (I), Green (I) or Color (I) columns in a virtual table for a palette image can only use colors in the palette for that image. Attempting to write some other color will result in writing a color from the palette that is the nearest match to the attempted color.

 

§      Analysis - Virtual tables allow us to analyze images and surfaces with sophisticated SQL statements. For example, virtual tables make it easy to determine the number of pixels occurring within a given height or intensity range, or to create a table of all heights in a surface along with their relative frequencies.

 

For detailed examples of queries that use virtual tables, see the Queries and Images or Surfaces topic.

 

Other Manifold Technologies for Image Storage in Tables

 

The topic above discusses image storage in tables either as virtual tables or as the storage of columns in tables that are taken from virtual tables. In addition, Manifold provides two other means of storing images within external databases:

 

§      Enterprise Edition - Using Manifold Enterprise Edition we can share images into a Manifold enterprise server. In that case, the DBMS hosting the Enterprise server is simply being used as a big file cabinet and to facilitate collaborative use of such shared image components.

§      Oracle Spatial - Manifold Enterprise Edition can save images into Oracle Spatial databases using Oracle's GeoRaster technology. This is a very fast technology that scales well for images that are many gigabytes or even terabytes in size. It also allows us to share such images with any other software that is Oracle GeoRaster compatible. See the Oracle Spatial Facilities topic.

 

See Also

 

Linked Drawings

Geometry in Tables

Spatial Extensions

Linked Images

Linked Surfaces

Queries and Images or Surfaces

Raster Extensions