Global Positioning System Reference
In-Depth Information
This query can be fi ltered for a selection of a subset of members
satisfying some condition, e.g., to select only those provinces whose number
of cancer cases is higher than 500:
select {[Measures].[Quantity]} on columns,
fi lter({[CRDivision].[Province].Members}, [Measures].[Quantity] > 500) on rows
from [Cancer]
where [Time].[2005]
Using GeoMondrian, a fi lter with spatial functions and topological
relationships can be applied as shown in the following examples. In the
fi rst case, only provinces with areas larger than 7,000 km 2 are selected; in
the second example, only the provinces that do not have any topological
relationship (disjoint) with the Alajuela province are chosen. Other
topological relationships, such as ST_Intersects , ST_Within , ST_ Contains can
also be used. Notice that in order to calculate the area size, the ST_Transform
function is used to convert geometries expressed in the SRS using longitude/
latitude (WGS with the number of 43264) to the format that allows metric
calculations (UTM zone 17N with the number of 32617). Furthermore, the
execution time for these queries can become high if large data set is used
and the limited amount of memory is available since GeoMondrian, similar
to Mondrian, represents memory-based architecture, i.e., reads data from
the disk and copies it into the cache. Although Mondrian provides an option
of creating aggregated tables in the disk to speed-up queries, this feature
is still not available for spatial data.
select {[Measures].[Quantity]} on columns,
fi lter({[CRDivision].[Province].Members}}, ST_Area(ST_ Transform
([CRDivision].[Province].CurrentMember.Properties(“geom”),4326,
32617))/1E6 > 7000) on rows
from
[Cancer]
where
[Time].[2005]
select {[Measures].[Quantity]} on columns,
fi lter({[CRDivision].[Province].Members},ST_Disjoint([CRDivision].[Province].
CurrentMember.Properties(“geom”),
[CRDivision].[Province].[Alajuela].Properties(“geom”) )) on rows
from [Cancer]
where [Time].[2005]
As was stated in the previous section, MDX can also be used to create
calculated members on the fl y. For example, to create a calculated measure
Growth for the Demographic cube and display it together with the Population
measure, the following MDX may be used:
Search WWH ::




Custom Search