Creating Predefined Image Themes

2-24 Oracle Fusion Middleware Users Guide for Oracle MapViewer theme, as explained in Section 2.3.2 and Section 3.2.9 , but note the following additional considerations with dynamic image themes: ■ You must provide the original image resolution information when defining an image theme. ■ MapViewer by default automatically scales the image data when generating a map with an image theme, so that it fits the current query window. To disable this automatic scaling, specify imagescaling=false in the map request. For any image theme definition, MapViewer supports only GIF, JPEG, PNG, and TIFF image formats. To enable MapViewer to visualize data in any other image format, you must implement a custom image renderer using the oracle.sdovis.CustomImageRenderer interface in Java, and then register your implementation class in the mapViewerConfig.xml file to tell MapViewer which custom image renderer to use for image data in a specific format. For detailed information about implementing and registering a custom image renderer, see Appendix C . For an example of a map request specifying an image theme, including an explanation of how MapViewer processes the request, see Example 3–6 in Section 3.1.6 .

2.3.3.1 Creating Predefined Image Themes

To create a predefined image theme, you must store the definition of the image theme in the database by inserting a row into the USER_SDO_THEMES view described in Section 2.9.2 . Example 2–12 stores the definition of an image theme. Example 2–12 Creating a Predefined Image Theme INSERT INTO user_sdo_themes VALUES IMAGE_LEVEL_2, Orthophotos at pyramid level 2, IMAGES, IMAGE_MBR, ?xml version=1.0 standalone=yes? styling_rules theme_type=image image_column=image image_format=JPEG image_resolution=2 image_unit=M rule features style=C.RED plevel=2 features rule styling_rules ; Example 2–12 creates an image theme named IMAGE_LEVEL_2. The base table where all image data and associated MBRs are stored is named IMAGES, and the minimum bounding rectangles MBRs for the images are stored in the column named IMAGE_ MBR. In the STYLING_RULES column of the USER_SDO_THEMES view, an XML document with one styling_rules element is inserted. The styling_rules element for an image theme has the following attributes: ■ theme_type must be image in order for this theme to be recognized as an image theme. ■ image_column specifies the column in the base table or view that stores the actual image data. ■ image_format is a string identifying the format of the image data. If you specify GIF or JPEG, MapViewer can always render the image data. If you specify any other value, such as ECW, you must have implemented a custom image renderer MapViewer Concepts 2-25 and registered it to MapViewer in order for the image to be rendered properly. For information about implementing a custom image renderer, see Appendix C . ■ image_resolution is an optional attribute that identifies the original image resolution number of image_unit units for each pixel. ■ image_unit is an optional attribute, except it is required if you specify the image_resolution attribute. The image_unit attribute specifies the unit of the resolution, such as M for meter. The value for this attribute must be one of the values in the SDO_UNIT column of the MDSYS.SDO_DIST_UNITS table. In Example 2–12 , the image resolution is 2 meters per pixel. The DTD for the styling_rules element is presented in Section A.7 .

2.3.4 GeoRaster Themes