> -----Original Message-----
> From: Chris Pelkie [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 12, 2001 1:07 AM
> To: [email protected]
> Subject: RE: [opendx-users] Clipping
>
>
> >
> >Same for your TIFF: construct a "blank field" with the right number
> >of positions and connections (delta 1 in both dimensions, since it's
> >a pixel map), then in one instantaneous sleight of hand, lift the
> >colors of the TIFF and drop onto this field.
> >
>
>
> One more item: Map expects the positions of the map and input to
> overlap (at least partly) but it doesn't care if the numbers of
> positions match. It wouldn't be much use most of the time if it had
> the latter constriction.
>
> Replace requires the numbers of positions to match, but it doesn't
> care if their values are related in any way. (Heck, their
> dimensionality doesn't even have to match, if I'm not mistaken.)
>
> So the upside of Map is that you can use it when the objects are not
> perfectly coincident and do not have the same number of positions
> (but the positions must have the same dimensionality). (If they ARE
> perfectly coincident and DO have the same number of positions, use
> Replace).
>
> The upside of Replace is you can Construct your already scaled XY
> surface (say 100 values of X from -1000-+1000, 100 values of Y from
> 2500-3500), then take your TIFF of 100x100 positions (whose deltas
> are both 1, and origins are both 0), and simply Replace the TIFF's
> colors directly onto the apparently much larger Constructed field.
> Why does it work? Cause Replace is associating colors by position
> index ("dep" positions), not by actually location. 100x100 colors
> snaps nicely to 100x100 positions.
I have made a lot of progress, but I'm falling at the last hurdle.
I Construct a field with the same shape grid as the TIFF, but with real(x,y)
positions. I then use Replace to put the TIFF colors into this field. I
then use an X slab then a Y slab to chop out a small rectangle. Call this
the COLOR field.
I Import the gridded elevation data, which spans a region that includes the
selected rectangle. Call this the ELEVATION field. I also use Compute to
translate the data in both fields into byte form.
The next step, using Map to get elevations from ELEVATION into the data
component in COLOR, does not give an error and does display the image, but
sets the data array to 0, so rubbersheeting gives a flat surface.
Map is used as follows:
COLOR ELEVATION
\ /
\ /
Map
source = positions
destination = data
I have Describe modules attached to the inputs from COLOR and ELEVATION, and
the output of MAP, and the following Message file is created (my annotations
in { }):
Begin Execution
{from ELEVATION}
Object Description:
Input object is a Field, the basic data carrying structure in DX.
There are 1094079 data items, each is of type unsigned byte (1-byte or
int*1).
The positions are enclosed within the box defined by the corner points:
[ 2.67702e+006 6.03289e+006 0 ] and [ 2.67814e+006 6.03388e+006 0 ]
Data range is:
minimum = 0, maximum = 241, average = 45.4435
Input is not ready to be rendered because the Field does not have colors
yet.
Use the `AutoColor', `AutoGreyScale', or `Color' modules to add colors.
Object Description:
{from COLOR}
Input object is a Field, the basic data carrying structure in DX.
There are 251001 data items, each is of type unsigned byte (1-byte or
int*1).
The positions are enclosed within the box defined by the corner points:
[ 2.67715e+006 6.03377e+006 0 ] and [ 2.67725e+006 6.03387e+006 0 ]
Data range is:
minimum = 17, maximum = 17, average = 17
Input is already an Image. It can be displayed fastest using the `Display'
module with no `Camera' input.
Use the `Image' module, which will be slower, if you want to resize the
image, rotate it, zoom in or out,
or combine the image with other renderable items.
Input contains a surface. Planar (flat) surfaces exactly aligned
along the viewpoint will NOT be visible. To see the
surface move the viewpoint slightly off-axis.
Input contains Fields with Byte colors. Byte colors use 3-byte triplets per
data value.
Valid color values are between 0 and 255 for each of Red, Green and Blue.
Object Description:
{Map output}
Input object is a Field, the basic data carrying structure in DX.
There are 251001 data items, each is of type unsigned byte (1-byte or
int*1).
The positions are enclosed within the box defined by the corner points:
[ 2.67715e+006 6.03377e+006 0 ] and [ 2.67725e+006 6.03387e+006 0 ]
Data range is:
minimum = 0, maximum = 0, average = 0
Input is already an Image. It can be displayed fastest using the `Display'
module with no `Camera' input.
Use the `Image' module, which will be slower, if you want to resize the
image, rotate it, zoom in or out,
or combine the image with other renderable items.
Input contains a surface. Planar (flat) surfaces exactly aligned
along the viewpoint will NOT be visible. To see the
surface move the viewpoint slightly off-axis.
Input contains Fields with Byte colors. Byte colors use 3-byte triplets per
data value.
Valid color values are between 0 and 255 for each of Red, Green and Blue.
Any idea where I'm going wrong?
Gib
NOTICE - This e-mail is only intended to be read by the named recipient. It
may contain information which is confidential, proprietary or the subject of
legal privilege. If you are not the intended recipient please notify the
sender immediately and delete this e-mail. You may not use any information
contained in it. Legal privilege is not waived because you have read this
e-mail.
For further information on the Beca Group of Companies, visit our web page
http://www.beca.co.nz