If you create a spatial reference system and your coordinate
data includes negative numbers or measures, you need to specify the
offset values that you want to use.
About this task
An offset is a number that is subtracted from all coordinates,
leaving only positive values as a remainder. You can improve the performance
of spatial operations when the coordinates are positive integers instead
of negative numbers or measures.
Procedure
To calculate the offset values for the coordinates that
you are working with:
- Determine the lowest negative X, Y, and Z coordinates within
the range of coordinates for the locations that you want to represent.
If your data is to include negative measures, determine the lowest
of these measures.
- Optional but recommended: Indicate to IBM® Spatial Support for Db2 for z/OS® that
the domain that encompasses the locations that you are concerned with
is larger than it actually is. Thus, after you write data about these
locations to a spatial column, you can add data about locations of
new features as they are added to outer reaches of the domain, without
having to replace your spatial reference system with another one.
For each coordinate and measure that you identified in step
1, add an amount equal to five to ten percent of the coordinate or
measure. The result is referred to as an augmented value.
For example, if the lowest negative X coordinate is –100, you could
add –5 to it, yielding an augmented value of –105. Later, when you
create the spatial reference system, you will indicate that the lowest
X coordinate is –105, rather than the true value of –100. IBM Spatial Support for Db2 for z/OS will
then interpret –105 as the westernmost limit of your domain.
- Find a value that, when subtracted from your augmented
X value, leaves zero; this is the offset value for X coordinates. IBM Spatial Support for Db2 for z/OS subtracts
this number from all X coordinates to produce only positive values.
For example, if the augmented X value is –105, you need
to subtract –105 from it to get 0. IBM Spatial Support for Db2 for z/OS will
then subtract –105 from all X coordinates that are associated with
the features that you are representing. Because none of these coordinates
is greater than –100, all the values that result from the subtraction
will be positive.
- Repeat step 3 for the augmented Y value, augmented Z value,
and augmented measure.