This article illustrates the different configuration options for spatial access restrictions. For a general overview of access control in LuciadFusion, see the Access control in LuciadFusion article.
Spatial restrictions for vector data
As an example, we use the Data/Shp/Usa/States.shp
shapefile, which defines the states of the USA.
First we define the area and reference for the spatial restriction. The area is the WKT representation of a polygon. Together with the area we specify the spatial reference, which must be an EPSG code.
In this example, we use this spatial area and reference:
-
Area:
POLYGON ((-115 50, -90 50, -90 25, -115 25))
-
Reference:
EPSG:4326
The blue polygon in this figure shows the resulting spatial area:
Now we illustrate the behavior of the accept
and overlappingShapes
parameters for the defined area. The
Table 1, “Spatial restriction parameter combinations” table shows the behavior of the different combinations of these parameters.
In the figures, the red areas are filtered out by the spatial restriction and won’t be visible.
Accept | OverlappingShapes | Behavior | Example |
---|---|---|---|
|
|
Contains the shapes that are inside the spatial area. Shapes that overlap with the bounds of the spatial area are included. |
|
|
|
Contains the shapes that are inside the spatial area. Shapes that overlap with the bounds of the spatial area are excluded. |
|
|
|
Contains the shapes that are inside the spatial area. Shapes that overlap with the bounds of the spatial area are clipped at the spatial area bounds. |
|
|
|
Contains the shapes that are outside the spatial area. Shapes that overlap with the bounds of the spatial area are included. |
|
|
|
Contains the shapes that are outside the spatial area. Shapes that overlap with the bounds of the spatial area are excluded. |
|
|
|
Contains the shapes that are outside the spatial area. Shapes that overlap with the bounds of the spatial area are clipped at the spatial area bounds. |
|