Creating projects that use spatial data
This procedure describes the steps involved in creating projects that use spatial data.
Procedure
To create a project that uses spatial data:
- Plan and make preparations (set goals for the project, decide what tables and data you need, determine what coordinate system or systems to use, and so on).
- Decide whether an existing spatial reference system meets
your needs. If none does, create one. A spatial reference system is a set of parameter values that includes:
- Coordinates that define the maximum possible extent of space referenced by a specified range of coordinates. You need to determine the maximum possible range of coordinates that can be determined from the coordinate system that you are using, and to select or create a spatial reference system that reflects this range.
- The name of the coordinate system from which the coordinates are derived.
- Numbers used in mathematical operations to convert coordinates received as input into values that can be processed with maximum efficiency. The coordinates are stored in their converted form and returned to the user in their original form.
- Create spatial columns as needed. Note that in many cases,
if data in a spatial column is to be read by a visualization tool,
the column must be the only spatial column in the table or view to
which it belongs. Alternatively, if the column is one of multiple spatial columns in a table, it could be included in a view that has no other spatial columns, and visualization tools could read the data from this view.
- Register the spatial columns to assign the spatial reference system.
- Populate spatial columns by performing one of the following
actions:
- For a project that requires spatial data to be imported, import the data.
- For a project that requires a spatial column to be set from the LATITUDE and LONGITUDE columns, run an SQL UPDATE statement using the ST_Point constructor function.
- Facilitate access to spatial columns, as needed. This involves
defining filters or indexes that enable the database manager to access spatial
and related data quickly, and defining views that enable users to retrieve interrelated
data efficiently. If you want visualization tools to access the views' spatial columns, you might need to register these columns.
- Analyze generated spatial information and related business
information. This task involves querying spatial columns and related non-spatial columns. In such queries, you can include spatial functions that return a wide variety of information. For example, coordinates that define a proposed safety zone around a hazardous waste site, or the minimum distance between this site and the nearest public building.