Using a Custom Spatial Query | 53
This custom spatial query becomes the following after the Autodesk
MapGuide server has updated the parameters with the appropriate values:
SELECT ID, LAT, LON FROM TRAFFIC_SIGNS WHERE (LAT > -90 AND LAT <
90 AND LON > -180 AND LON <180)
Note Using parameters within a custom spatial query is optional.
Accessing the Oracle Linear Referencing System
(LRS)
Autodesk MapGuide now provides access via the custom spatial query to
Oracle’s Linear Referencing System (LRS). You can use linear referencing to
locate attributes along a linear map feature. For example, you can locate
attributes along a road, using a measure parameter rather than specifying
latitude and longitude coordinates. Further, you can reference sections of a
linear map feature or create them dynamically by indicating the start and
end locations along the feature without explicitly storing these location. LRS
functions can be supported in one of two ways. You can do either of the
following:
■ Create an Oracle VIEW and apply linear referencing to any Oracle VIEW
as long as it contains a geometry column.
■ Use the new Autodesk MapGuide settings that are available to modify spa-
tial queries (either custom or geometry functions).
Sample Code: Oracle VIEW using the Oracle LRS
Function
This is an example of Autodesk MapGuide’s new capability providing access
to the linear referencing system function embedded in an Oracle VIEW. This
example illustrates the syntax of the required code.
The Oracle VIEW description would be the following:
SELECT
P.ACCIDENT_ID,
SDO_LRS.CONVERT_TO_STD_GEOM(SDO_LRS.LOCATE_PT(A.GEOM, P.SM, 0),
M.DIMINFO) GEOM,
A.ID,
P.SM
FROM USER_SDO_GEOM_METADATA M, LRS_TEST A, ACCIDENTS P WHERE
A.ID = P.ID AND M.TABLE_NAME = ‘NT_SF_POI’