Modifying GeoRaptor Layer Properties

Principal Layer Properties Dialog

This dialog box is used to define the properties of a data layer in the map view. The dialog is accessed by right-clicking on a layer.


Details

The top section of the dialog displays the details for the currently selected layer. The current DB Connection is shown in a drop down list. To change the connection for the layer, select an alternative connection from the drop down list. If a new connection is opened while the Layer Properties dialog is open, then use the Refresh button to update the list. The capability to change the connection for a layer is useful in scenarios where you may have data with the same structure in both a test and production environment. Configure the layers initially for one environment and then you have the capability to switch between the various connections to access the data in different environment.

Edit the Name to change the name of the layer as it appears in the map view layer tree control.

The Geometry Column cannot be edited as it is the name inherited from the sdo_geometry column in the query that created this layer.

Tolerance/Precision

Tolerance is used to associate a level of precision with spatial data. Tolerance reflects the distance that two points can be apart and still be considered the same (for example, to accommodate rounding errors).

The un-editable tolerance is the sdo_tolerance drawn from the X/Long ordinate in the SDO_GEOM_METADATA entry. For non-geodetic data it can be assumed to also describe the decimal precision of an individual ordinate (not quite, but close enough). GeoRaptor often rounds ordinates (especially when constructing WKT, GML, exporting/importing, Copy To Clipboard etc.) and so uses the precision value. The reason the precision field is editable is for two reasons:

  • A planar ordinate precision may be different from an sdo_tolerance describing “distance that two points can be apart”. Thus is allows the user to modify the precision to suit the need.
  • For geodetic data an sdo_tolerance can only be described to a maximum of 0.005 (say 1cm). This equates to a decimal precision of 2. Clearly this is the wrong value to use when rounding long/lat ordinates. Thus, for long/lat one would want the ordinates to be rounded to something more like 6,7,8 or 9. Set according to the precision of your coordinates.

SRID Type is used to inform measurement activities. This is automatically discovered when view object created but a Discover button is provided for manual checking.

GeoRaptor displays an icon in the map view layer tree control that reflects the Geometry Type. The value is automatically set by checking the geometry type of the first non-null geometry in the data source. The value can be changed by selecting from the list.

There is an option to Recalculate MBR at next redraw. This is useful in cases where a large MBR is applied in the USER_SDO_GEOM_METADATA, but the data for the layer is only contained within a small area. It can also be used to “bookmark” a specific visual area of the layer.


Properties

The bottom section of the dialog has a series of tab, each providing a set of properties for the layer.

SQL

When first loading into the map, GeoRaptor generates a SQL statement which it uses to query and display the data. This SQL is displayed in the SQL tab as follows:

SQL Properties

(This tab will not appear if a dynamic query (graphic theme) executed in a SQL Worksheet is the source of the data.)

The SQL that is generated is as follows:

WITH cteGeom AS (
  SELECT ? AS geom FROM DUAL
)
SELECT "ID","LABEL","RADIUS","RGB","IRGB",t.GEOM as GEOM 
  FROM cteGeom a,
       GEORAPTOR.PROJCIRCLE2D t 
 WHERE SDO_FILTER(t.GEOM,a.GEOM,?) = 'TRUE'

The first bind variable ? is the search geometry GeoRaptor generates for each pan and zoom initiated on the map. The geometry is normally an “optimized rectangle”. If the layer has been dragged to a different view (SRID), GeoRaptor projects (SDO_CS.TRANFORM) the search window to the SRID of the base layer (here PROJCIRCLE2D).

The second bind variable is a parameter for the SDO_FILTER primary operator that GeoRaptor generates. Normally it is ‘querytype=WINDOW’ but could include pixel filtering (see later).

The SQL can be modified within certain strict parameters.

  • The two bind variables must always exist;
  • The cteGeom Common Table Expression must not be modified;
  • The number of attributes can be modified (add/delete/rename) as long as the column is not used for styling or labeling;
  • The standard geometry column’s name must not be changed as it is a fundamental property of the underlying Java object.
  • The SDO_FILTER clause must not be edited in any way.
  • Additional predicates are allowed either before or after the SDO_FILTER in the final query. If a user modifies the predicates they are responsible for ensuring the query runs correctly and quickly.

To identify a feature on the map, the base SQL is reused as follows:

WITH searchDistance As (
  SELECT MDSYS.SDO_GEOM.SDO_DISTANCE(?/*search pt1*/,?/*DistancePoint*/,?/*tol*/,?/*unit*/) AS dist 
    FROM DUAL 
)
SELECT /*+ORDERED INDEX(b PROJCIRCLE2D_GEOM)*/a.*
  FROM (
        WITH cteGeom AS (
          SELECT ? AS geom FROM DUAL
        )
        SELECT "ID","LABEL","RADIUS","RGB","IRGB",t.GEOM as GEOM 
          FROM cteGeom a,
               GEORAPTOR.PROJCIRCLE2D t 
         WHERE SDO_FILTER(t.GEOM,a.GEOM,?) = 'TRUE'
       ) a,
       GEORAPTOR.PROJCIRCLE2D b,
       searchDistance s 
 WHERE SDO_NN(b.GEOM,?,?,1) = 'TRUE' 
   AND SDO_NN_DISTANCE(1) < s.dist 
   AND b.ID = a.ID
  ORDER BY sdo_nn_distance(1)

(The complexity is due to the design decision to filter against what is mapped not just what is in the table.)

If the underlying table (PROJCIRCLE2D) has a single column integer primary key or unique constraint, the predicate “AND b.ID = a.ID” (ID is colunm name) is added; if no single integer key is defined, the predicate is not added which may lead to duplicate records being created. This primary key/unique restriction is common to most/all GIS applications.) (Exposing the identify SQL for end user modification may occur in a later release.)

The Fetch size can be specified in the text box below the SQL text area. This is the maximum number of features per client/server exchange. So, if you have point data you might want to increase the fetch size to 300; if small polygons or lines, perhaps 200; large polygons 100. 150 seems to be about right as a universal setting.

By checking the Pixel Filtering option, the min_resolution parameter is added to the SDO_FILTER query eg SDO_FILTER(x,x, ‘querytype=WINDOW, min_resolution=10’). The min_resolution keyword includes only geometries for which at least one side of the geometry’s MBR is equal to or greater than the specified value. For example, min_resolution=10 includes only geometries for which the width or the height (or both) of the geometry’s MBR is at least 10. The Pixel Filtering option can be used to exclude geometries that are too small to be of interest.


Point

The Point tab contains the options that determine how points are displayed on the map.

Size

  • Fixed: Enter a number between 4 and 72, or use the slider, to indicate the pixel size of how points will be rendered on the map.
  • Column: If a numeric column in the table/view contains values between 4 and 72, then it can be used to drive the pixel size of the points.

Colour

  • Fixed: Use the colour chooser to select a colour for the point.
  • Random: Allow GeoRaptor to randomly colour each point.
  • Column: If a column in the table/view contains a colour value that matches the GeoRaptor Colour criteria (see bottom of page), then it can be used to drive the colour of the points.

Marker: Select from one of the predefined list of marker styles to be applied to each point.


Stroke

The Stroke tab contains the options that determine how lines and polygon outlines are displayed on the map.

Size and Style

  • Width: Enter a number between 1 and 16, or use the slider, to indicate the pixel width of how lines will be rendered on the map.
  • Style: Select a line style from the list. Options are: Solid, Dash, Dot, Dashdot, Dashdotdot, Solid rounded.

Colour

  • Solid: Use the colour chooser to select a colour for the line.
  • Random: Allow GeoRaptor to randomly colour each line.
  • Column: If a column in the table/view contains a colour value that matches the GeoRaptor Colour criteria (see bottom of page), then it can be used to drive the colour of the lines.

Vertices

  • Start: Select from one of the predefined list of marker styles to be applied to the first vertex of the line.
  • All: Select from one of the predefined list of marker styles to be applied to each vertex of the line apart from the first. Note that the colour/size of the marker is defined in the Point tab

Arrows

Select whether arrows are to be shown on the line:

  • None: Don’t show arrows at all.
  • Start: Show an arrow at the start of each segment.
  • Middle: Show an arrow at the middle of each segment.
  • End: Show an arrow at the end of each segment.
  • End Only: Show an arrow at the end of the whole line.

Press the Apply button to see the changes on the map without having to close the Layer Properties dialog.


Fill

The Fill tab contains the options that determine how polygons are filled on the map.

Colour

  • None: The polygon interior is not filled with a colour.
  • Random: Allow GeoRaptor to randomly colour the fill for each polygon.
  • Constant: Use the colour chooser to select a polygon fill colour.
  • Column: If a column in the table/view contains a colour value that matches the GeoRaptor Colour criteria (see bottom of page), then it can be used to drive the polygon fill colours.

Use the Transparency slider to choose a value between 0 (Solid) and 100 (Clear).

Press the Apply button to see the changes on the map without having to close the Layer Properties dialog.


Selection

The Selection tab contains the options that determine how features are styled when they are selected on the map.

These options are:

  • Point Size: Enter a number between 4 and 72, or use the slider, to indicate the pixel size of how points will be rendered on the map.
  • Line Width: Enter a number between 1 and 16, or use the slider, to indicate the pixel width of how lines will be rendered on the map.
  • Colour: Use the colour chooser to select a colour that will be applied to selected features.
  • Use the Transparency slider to choose a value between 0 (Solid) and 100 (Clear) that will be applied to selected polygons.
  • Line Style: Select a line style from the list. Options are: Solid, Dash, Dot, Dashdot, Dashdotdot, Solid rounded.

Check the Use Selection Colouring option if you want to apply the Selection colouring style to all features on the map.

Press the Apply button to see the changes on the map without having to close the Layer Properties dialog.


Labelling

The Labelling tab contains the options that determine how features are labelled on the map.

Vertices

Each Vertex of a linestring/polygon can be labelled with the following elements:

  • None: Don’t label the vertices – this is the default
  • <Id>: The vertex Id
  • (X,Y[,Z[,M]]): The X,Y ordinate values and the Z and M if they exist
  • <Id> (X,Y[,Z[,M]]): The vertex Id followed on the same line by X,Y ordinate values and the Z and M if they exist
  • <Id>
    (X,Y[,Z[,M]]):
    The vertex Id followed on the next line by X,Y ordinate values and the Z and M if they exist
  • Cumulative Length: The cumulative length of the line/polygon boundary
  • (Z): The Z ordinate
  • (M): The M value

Check the Orient Label option to rotate the labels to the feature being drawn. 


Layer Properties – Vertex labelling with Measure

Each Segment of a linestring/polygon can be labelled with the following elements:

  • None: Don’t label the segments – this is the default
  • Segment_Length: The length of the individual segment
  • Cumulative_Length: Cumulative length of the line/polygon boundary
  • Bearing: The bearing value (approximate for geodetic/geographic data)
  • Bearing and DistanceThe bearing and distance value (approximate for geodetic/geographic data)


Click the buttons to set the Position / Offset and Text Style of the Vertex and Segment labelling options.

Optionally, enter a value for Scale Lo: and Hi: to control the scale at which labels are displayed. The low scale value must be 0 or greater. The high scale value can be anything greater than 0. If the high scale value is left blank then only the low scale will be applied.

Geometry Label

Select a Column from the table/view that will be used for the geometry label values. Many column data types are supported in addition to CHAR and VARCHAR2.

The Label Position to be used when drawing labels can be set by clicking the Change button.

Positioning is set via the Top Left (TL), Top Centre (TC), Top Right (TR), Centre Left (CL), Centre Centre (CC), Centre Right (CR), Bottom Left (BL), Bottom Centre (BC), Bottom Right (BR) positioning. Offset values between 0 and 10 can be selected.

The Text Style to be used when drawing labels can be set by clicking the Change button.

  • Various fonts and sizes are supported
  • Text can have additional Bold, Italic, Underlined and Strike-through styling
  • Change foreground colour (variable transparency) of text
  • Setting background colour (variable transparency) creates coloured “swatch” or rectangle underneath the text when drawing

Select from the Label Point drop down list to indicate where the label should be displayed.

  • FIRST_VERTEX:The label is displayed at the first vertex of the feature
  • MIDDLE_VERTEX: The label is displayed at the middle vertex of the feature
  • END_VERTEX: The label is displayed at the end vertex of the feature
  • JTS_CENTROID: GeoRaptor displays the label at a location generated by a call to centroid function of the Java Topology Suite.
  • SDO_POINT: For line, polygon, multi-point/line/polygon geometries that store their coordinates in sdo_ordinate_array, GeoRaptor will label the feature with the FIRST/MIDDLE/END_VERTEX or JTS_CENTROID, if the sdo_point is not filled in. If, however, the sdo_point is filled in, GeoRaptor will use it to label the feature if SDO_POINT is selected as the Label Point.

Rotation

The Rotation tab contains the options that determine how text and point features are rotated on the map.

Select Degrees or Radians to indicate how rotation values are to be specified. Degree values are rotated clockwise from north, while radian values are rotated clockwise from east.

Select a value from the Rotate drop down list to indicate whether the rotation should be applied to MarkersLabelsBoth or None.

If a numeric Column in a table contains rotation angle values in degrees or radians, then it can be selected from the drop down list. If no rotation column is available all text is rendered at 0 degrees (i.e. to the north) or 0 radians (i.e. to the east).


Additional Notes

Specify a Colour value in a column

Colour values specified in a column can be either an integer or a string.

If an integer, then it has to be capable of being converted to a Java Colour object which works as follows (this is similar to the way MapInfo does its colours):

An opaque sRGB colour is created with the specified combined RGB value consisting of the red component in bits 16-23, the green component in bits 8-15, and the blue component in bits 0-7. The actual colour used in rendering depends on finding the best match given the colour space available for a particular output device. Alpha is defaulted to 255.

If a string then it must have one of the following two formats:

  1. r,g,b
  2. r,g,b,a

With the values for all being between 0 to 255, inclusive.