3.10.2.4.2 Creating a Target Dataset

There are two ways to create a target dataset:
  • By Spatial Studio: Refer to the Create New Target Dataset option in the earlier section. Note that you must specify the key column name for the target dataset as the key values are stored in the key column names for the corresponding geometries (custom map regions).
  • By manual process: Perform the following steps to create a dataset manually:
  1. Connect to an Oracle database schema using SQL Developer or any other tools.
  2. Create a spatial table as shown:
    CREATE TABLE affected_regions (region_id NUMBER PRIMARY KEY, geom SDO_GEOMETRY);
  3. Insert the spatial table into USER_SDO_GEOM_METADATA view. For example:
    INSERT INTO USER_SDO_GEOM_METADATA VALUES (
    'affected_regions', -- TABLE_NAME
    'geom', -- COLUMN_NAME
    SDO_DIM_ARRAY -- DIMINFO attribute for storing dimension bounds, 0.5 m as tolerance
    (SDO_DIM_ELEMENT ('LONGITUDE', -180, 180, 0.5 ),
     SDO_DIM_ELEMENT ( 'LATITUDE', -90, 90, 0.5 )), 
    4326 -- SRID value for specifying a geodetic coordinate system
    );
    COMMIT;
  4. Create a spatial index on the SDO_GEOMETRY column.
    CREATE INDEX affected_regions_sidx ON affected_regions(geom) INDEXTYPE IS MDSYS.SPATIAL_INDEX_V2;
  5. Create a dataset in Spatial Studio from the database schema used in the preceding steps.
    The required target dataset is created. You may use this data layer on to which you can apply the newly created custom map regions.