Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 17 » SQL Anywhere Server - Spatial Data Support » Spatial data

Viewing spatial data as images (Spatial Viewer)

View multiple geometries as an image to understand what the data in the database represents using the Spatial Viewer.

Prerequisites

You must have SELECT privilege on the table you are selecting from, or the SELECT ANY TABLE system privilege.

Context

The order of rows in a result matter to how the image appears in the Spatial Viewer because the image is drawn in the order in which the rows are processed, with the most recent appearing on the top. Shapes that occur later in a result set can obscure ones that occur earlier in the result set.

Procedure

  1. Connect to your database in Interactive SQL, click Start of the navigation path Tools Next navigation step Spatial Viewer End of the navigation path.
  2. In the Spatial Viewer, execute a query similar to the following in the SQL pane and then click Execute:
    SELECT * FROM GROUPO.SpatialShapes;
  3. Use the Draw Outlined Polygons tool to remove the coloring from the polygons in a drawing to reveal the outline of all shapes. This tool is located beneath the image, near the controls for saving, zooming, and panning.

Results

All of the geometries in the result set are displayed in the Results area as one image.

Example

  1. Connect to the sample database from Interactive SQL.

  2. Click Start of the navigation path Tools Next navigation step Spatial Viewer End of the navigation path.

  3. In the Spatial Viewer, execute the following query in the SQL pane:

    SELECT * FROM GROUPO.SpatialShapes;

    Image of a set of colored polygons and lines
  4. Here is an example of how the image appears as outlines using the Draw Outlined Polygons tool:


    Set of polygon outlines and lines displayed in the Spatial Viewer.