Spatial SQL

Overview

Spatial SQL =

a query language which specifies the information to retrieve +
a presentation language which specifies how the information has to be displayed.

The expression of query Q

Two parts:

  1. Defining the characteristics of the graphical display
  2. Defining the query using the syntax of Spatial SQL.

    SET LEGEND
	COLOR black
    FOR SELECT boundary (geometry)
	FROM plot;

    SET LEGEND
	COLOR blue
	PATTERN dashed
    FOR SELECT interior (geometry)
	FROM zone
	WHERE type"‘URBAN’;

    SET LEGEND
	COLOR red
    FOR SELECT interior (geometry)
	FROM historical-monument;

    SET CONTEXT
    FOR plot.geometry
	SELECT historical-monument.geometry, zone.geometry, plot.name
	FROM historical-monument, plot, zone;

    SET MODE   highlight;
    SELECT     plot.geometry
    FROM       plot, historical-monument, zone
    WHERE      plot.geometry INSIDE zone.geometry
           	AND zone.type"‘URBAN’
           	AND distance (historical-monument.geometry, plot.geometry<500;