GeoRaptor: Layer Properties

Layer Properties

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.

Layer Properties

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.

Properties

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

SQL

The SQL window displays the base SQL that is used for retrieving data for the map layer.

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

To draw data on the map, GeoRaptor generates the following base SQL:

SELECT [other columns from the table],t.[geometry column] as GEOM 
  FROM (SELECT ? AS geom FROM DUAL) a,
       [the table/view for the layer] t 
 WHERE SDO_FILTER(t.[geometry column],a.[geometry column],?) = 'TRUE'

An example is:

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

The base SQL can be modified as follows:

  • The number of attributes can be modified as long as the geometry column’s name remains the same as the layer and in the metadata.
  • The sub query with alias “a” must never be touched.
  • The SDO_FILTER clause must not be edited in any way.
  • Additional predicates are allowed either before or after the SDO_FILTER. If a user modifies the predicates they are responsible for ensuring the query runs correctly and quickly.

To identify a feature on the map, GeoRaptor extends the base SQL in one or other of the following examples. Note that the spatial search SQL cannot (as yet) be modified.

With Index

If a spatial index exists, the following SQL is generated to conduct and “indentify” query.

 WITH searchDistanceCTE As (
  SELECT MDSYS.SDO_GEOM.SDO_DISTANCE(?,?,?,?) AS dist 
    FROM DUAL 
)
SELECT /*+ORDERED INDEX(b PROJCIRCLE2D_GEOM)*/
       a.*
  FROM (SELECT "ID","LABEL","RADIUS","RGB","IRGB",t.GEOM as GEOM 
          FROM (SELECT ? AS geom FROM DUAL) a,
               GEORAPTOR.PROJCIRCLE2D t 
         WHERE SDO_FILTER(t.GEOM,a.GEOM,?) = 'TRUE'
       ) a,
       GEORAPTOR.PROJCIRCLE2D b,
       searchDistanceCTE 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)

No Index

If no spatial index exists, the following SQL is generated to conduct and “indentify” query.

WITH searchCTE As (
SELECT MDSYS.SDO_GEOM.SDO_BUFFER(
        ?,
        MDSYS.SDO_GEOM.SDO_DISTANCE(?,?,?,?),
        ?) as geom
  FROM DUAL 
)
SELECT "ID",t.GEOM as GEOM 
  FROM searchCTE scte,
       (SELECT ? AS geom FROM DUAL) a,
       GEORAPTOR.PROJPOINT3DNI t 
 WHERE t.GEOM IS NOT NULL
   AND t.GEOM.SDO_GTYPE IS NOT NULL
   AND MDSYS.SDO_GEOM.VALIDATE_GEOMETRY(t.GEOM,?) = 'TRUE'
   AND MDSYS.SDO_GEOM.RELATE(t.GEOM,'ANYINTERACT',a.geom,?) = 'TRUE'

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. 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.

Layer Properties - Point tab

Size Sub Panel

  • 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 Sub Panel

  • 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.

Layer Properties - Stroke tab

Size and Style Sub Panel

  • 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 Sub Panel

  • 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 Sub Panel

  • 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

Layer Properties - Stroke Vertices

Arrows Sub Panel

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.

Layer Properties - Fill tab

Colour Sub Panel

  • 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.

Layer Properties - Selection tab

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.

Layer Properties - Labelling tab

Vertices Sub Panel

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)
  • Segment_Id The segment identifier starting at one (segments are the two vertex line elements that collectively describe a whole linestring).

Layer Properties - Vertex labelling

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 Sub Panel

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.

Layer Properties - Label Position

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.

Layer Properties - Label Styler

  • 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.

Layer Properties - Rotation tab

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 Markers, Labels, Both 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).

Query Layer

The Query Layer tab is available only for layers defined by a spatial query. To create a Query Layer, right-click on a layer and select Spatial Query. Select the type of spatial query to run, digitise the query geometry, and click Execute on the Spatial Query Review dialog.

The Query Layer tab provides an option to modify the query geometry by applying a buffer. To create a buffer around the digitised geometry, set the Buffer Distance, check the Apply Buffer and Show Query Geometry check boxes and press Apply.

The SDO Operator that the spatial query is based on can changed by selecting the operator from the drop down list. If multiple masks are required, then select SDO_RELATE and select the required masks from the list box.

Layer Properties - Query Layer tab

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.

Leave a Reply

Your email address will not be published. Required fields are marked *