GeoMedia originally used its own mechanism to store raster image information in an Oracle Object Model database. Like text, information about the image was stored in a BLOB column. However this technique as inefficient and did not allow the use of spatial filters. Beginning with the release of GeoMedia 5.0, raster images are now stored as polygon features with some additional information that stores the display matrix and the filename. The actual raster image is not stored in the database; only the image header information and the filename are stored along with the MBR of the image. An example is shown below:
SDO_GEOMETRY (2003, NULL, NULL, SDO_ELEM_INFO_ARRAY (1, 0, 6002, 22, 2003, 1), SDO_ORDINATE_ARRAY (112.3,15452.2,15781.3,5124.3, 112.3,15452.2,15781.3,5124.3,112.3,15452.2,15781.3, 112.3,15452.2,15781.3,5124.3,112.3,15452.2, 27,1242134123,134123411,13412341234,13241234123, 1000,1000,1000,10000,10000,10000,10000,1000,1000,1000))
In this example, the ELEM_INFO_ARRAY triplet (1,0,6002) contains a user defined ETYPE of 0 with an INTERPRETATION of 6002. This tells GeoMedia that the values it is reading correspond to a raster image. The second triplet (22,2003,1) represents the polygonal outline of the raster image. Only the OFFSET value, 22, may vary. The first 16 values in the ORDINATE_ARRAY store the display matrix for the raster image. The 18th value stores the length of the filename. The integers following the length are the actual file name decomposed into 4 byte integers. The number of integers used will depend on the length of the filename. This is followed by the 5 coordinate pairs that make up the polygonal outline of the raster image. By treating the raster image outline as a polygon feature, GeoMedia can make full use of Oracle’s spatial filtering capability. Since the raster image is treated a polygon, entries are required in the USER_SDO_GEOM_METADATA as well as in the GDOSYS metadata. Either a Quad Tree or an R-Tree spatial index is also required.