2 Replies Latest reply: Jul 24, 2014 10:26 AM by jpaiva RSS

    Can't display georaster in map builder

    2682881

      Hello,

       

      I have a georaster table and I want to display it with mapviewer. Here are all the steps I did :

       

      • Create the georaster table
      • Create the raster data table
      • Create the georaster dml trigger
      • I import data with GDAL (netCDF->Georaster)
      • Georeference the georaster :

      DECLARE

      gr sdo_georaster;

      BEGIN

      SELECT IMAGE INTO gr FROM CITY_IMAGES WHERE IMAGE_ID = 15456 FOR UPDATE;

      sdo_geor.georeference(gr, 4326, 1, sdo_number_array(16, 0, -736.5), sdo_number_array(0, -16, 95.5));

      UPDATE CITY_IMAGES SET IMAGE = gr WHERE IMAGE_ID = 15456 ;

      COMMIT;

      END;

      • Generate the spatial extend :

      DECLARE

      gr sdo_georaster;

      BEGIN

      SELECT IMAGE INTO gr FROM CITY_IMAGES WHERE IMAGE_ID = 15456 FOR UPDATE;

      sdo_geor.georeference(gr, 4326, 1, sdo_number_array(16, 0, -736.5), sdo_number_array(0, -16, 95.5));

      UPDATE CITY_IMAGES SET IMAGE = gr WHERE IMAGE_ID = 15456 ;

      COMMIT;

      END;

      • Insert a line in USER_SDO_GEOM_METADATA :

      INSERT INTO user_sdo_geom_metadata

          (TABLE_NAME,

           COLUMN_NAME,

           DIMINFO,

           SRID)

      VALUES (

           'CITY_IMAGES',

           'image.spatialextent',

           SDO_DIM_ARRAY(

              SDO_DIM_ELEMENT('X', -6.0312500, 36.2812500, 0.00001),

              SDO_DIM_ELEMENT('Y', 30.2812500, 46.0312500, 0.00001)),

           4326

      );

      • Create a spatial index on the spatialextend :

      CREATE INDEX geor_idx ON CITY_IMAGES(image.spatialextent)

        INDEXTYPE IS MDSYS.SPATIAL_INDEX;

      • Add datasource
      • Create a georaster theme in Map Builder

       

      The problem :

      When I want to preview the georaster theme, nothing appears (there is only the blue background). Is that a coordinates problem ?

       

      Thanks for your help,

      best regards

        • 1. Re: Can't display georaster in map builder
          Jeffrey Xie

          before you setup mapviewer themes for display, please make sure you have a valid georaster:

           

          1. you don't need to create the georaster dml triggers any more if you are using 11gR1 or later. The triggers are created and maintained automatically when you create a georaster table.

          2. for the geometry metadata, the SDO_LB and SDO_UB values you entered could be too small. In general, you simply input any much larger boundary to cover all (old or upcoming) geometries completely in that table.

          3. run sdo_geor.validateGeoRaster to see if you georaster image is valid.

          4. run the GeoRasterViewer or MapBuilder (no need of a defined theme) to directly display the image to make sure the image looks ok.

           

          Then you can try to define the themes and use MapViewer for web apps.

          • 2. Re: Can't display georaster in map builder
            jpaiva

            For additional information while previewing in MapBuilder, set the log level to finest (Tools/Preferences).

            If you still are experiencing problems, post the log information and also your theme XML definition.