Editing Surfaces

Surfaces may be edited using many of the same methods used to edit images. Methods include:

 

·      Changing the surface "free hand" by making selections and the deleting pixels or otherwise modifying them.

·      Using the Transform toolbar to change many pixels at once throughout the surface.

·      Using effects or adjust commands from the Surface menu such as Quantize to edit the surface.

·      Changing the surface by projecting or georeferencing it.

·      Altering surfaces with scripts or other tools.

·      Use View - Display Options to change the appearance of the surface, including computing slope and aspect.

·      Creating new surfaces from drawings or other components via copy and paste as.

·      Cutting, copying and pasting between surfaces.

·      Copying a surface, pasting as a table, changing the table values and then creating a surface from the table.

·      Edit the image using update queries that operate on the image's virtual table to directly change the colors of pixels or other characteristics. See the Virtual Tables for Images and Surfaces topic as well as the Queries and Images or Surfaces topic.

·      Use the Surface - Transform command dialog packaged with the optional Surface Tools extension to perform arbitrary transformation of surfaces, including computations that involve multiple surfaces such as subtracting one surface from another.

·      Use commands on the Surface Menu to change the surface.

 

Cropping a Surface

 

Crop a surface to a given size by making a selection and then choosing [Selection] Crop in the transform toolbar and pressing Apply. The surface will be cropped down to the minimum enclosing rectangle of the selection.

 

Use Crop Margin to crop the surface by the given number of pixels at the border. Use Add Margin to expand the size of the surface by the given number of pixels at the border.

 

Eliminating "No Data" or spurious values

 

Some surfaces may contain pixels coded with a value of -9999 or some other distinctive value to indicate there is no reliable data for that pixel. To eliminate such pixels we have two options:

 

·      Select pixels representing no data using Select Touch or other selection method and delete them.

·      Use the Surface - Transform dialog provided in Surface Tools to cut out values lower or higher than the given threshold.

 

Copying a Surface and Pasting as a Table

 

Surfaces may be copied and pasted as tables. When pasting a surface as a table, the system will compute intrinsic fields for each pixel in the surface. the Paste As dialog offers the following choices:

 

images\btn_show_all_columns.gif

Select All - Paste all fields.

images\btn_hide_all_columns.gif

Select None - Do not paste any fields.

images\btn_show_inverse.gif

Select Inverse - Do not paste all current Paste As fields and paste all other fields. A fast way to use all but one field: click Select None, specify a Paste As choice for the one field not desired and then click Select Inverse.

Center Easting (I)

X coordinate of the center of this pixel in native coordinate system units adjusted with the values of the local scale and local offset parameters.

Center Latitude (I)

Latitude of the center of this pixel in degrees latitude.

Center Longitude (I)

Longitude of the center of this pixel in degrees longitude.

Center Northing (I)

Y coordinate of the center of this pixel in native coordinate system units adjusted with the values of the local scale and local offset parameters.

Center X (I)

X coordinate of the center of this pixel in native coordinate system units.

Center Y (I)

Y coordinate of the center of this pixel in native coordinate system units.

Height (I)

Height value.

Invisible (I)

0 or 1 to indicate invisible pixels, normally used for missing height values.

Latitude (I)

Latitude of the lower left corner of this pixel in degrees latitude.

Longitude (I)

Longitude of the lower left corner of this pixel in degrees longitude.

Easting (I)

X coordinate of the lower left corner of this pixel in native coordinate system units adjusted with the values of the local scale and local offset parameters.

Northing (I)

Y coordinate of the lower left corner of this pixel in native coordinate system units adjusted with the values of the local scale and local offset parameters.

Selection (I)

Boolean: currently selected or not.

Selection Mask (I)

A byte giving the saved selections mask.

X (I)

X coordinate of the lower left corner of this pixel in native coordinate system units.

X Offset (I)

X position in pixel coordinates from the lower left corner.

Y (I)

Y coordinate of the lower left corner of this pixel in native coordinate system units.

Y Offset (I)

Y position in pixel coordinates from the lower left corner.

 

Copying a surface and pasting as a table is a good way to make sophisticated edits or to perform analyses. For example, one can copy a surface and paste it as a table and then use the transform toolbar to change the values in the Height field. After making modifications, one can then copy the table and paste it back as a surface.

 

Suppose we would like to know the average height in a surface in regions that are within 100 meters of certain roads in a drawing. We create a buffer zone about the roads in the drawing, select the buffer zone and then transfer the selection to the surface. We can then copy the surface and paste as a table including the Height (I) and Selection (I) fields. We select all records in the table where Selection (I) is 1 and then use a ViewBot to report the average value of Height (I) for all records in the selection.

 

Note: When copying surfaces and pasting as tables, don't forget to paste the Longitude (I) and Latitude (I) fields or the X (I) or Y (I) fields to allow subsequent conversion back to a surface, if desired.

 

Tech Tip

 

Change the appearance of surfaces by selecting parts of the surface and then deleting them and letting the background show through. For example, one way to show lakes or other water bodies in surfaces (which are at the same elevation) is to select their pixels and then delete them. Make the background of the surface blue so that the water regions are all colored blue no matter what their elevation.

 

images\sc_surface_pixel_delete_01.gif

 

For example, suppose we start with a surface that's been colored with a palette using View - Display Options. The background for this surface is turned on in the Layers pane. The background has been set to blue color in the View - Properties dialog for this surface.

 

images\sc_surface_pixel_delete_02.gif

 

We click on regions using SHIFT - touch select to select all portions of the surface at a given elevation. Using Add to Selection mode, click on the desired elevation and on regions below the desired elevation.

 

images\sc_surface_pixel_delete_03.gif

 

Press Delete and the selected pixels disappear, allowing the blue background to show through. Note how this method provides a "waterline" effect to instantly show which regions are above a given elevation.

 

This method can also be used to remove flatter parts of a surface, leaving only very mountainous areas. The surface can then be used in a map overlaid upon drawings to provide visual cues of mountainous terrain.

 

Converting Data Types in Surfaces

 

Surfaces internally consist of a regular array of numbers. The numbers within surfaces can be any one of a variety of numeric types, either integers of various types (signed, unsigned, 8-bit, 16-bit, 32-bit or 64-bit) or single or double precision floating-point numbers.

 

The Surface - Convert To command allows conversion between different types of numbers within the surface.

 

Masks and Surfaces

 

Masks can be used with surfaces as they are with images. Saving a mask from a surface results in an image that is georegistered to the surface and that retains any selection that was made in the surface. This is a handy way of saving complex selections made in a surface as an alternative to using the Selections pane.

 

See Also

 

Editing a Surface for Visual Effect