XYZ2DEM Importer - Import a DEM image of Nantucket Island
and apply a coastline polygon

Import a Digital Elevation Model image of Nantucket Island and apply a coastline polygon. Here we explain how to proceed if an a priori known outline polygon of the input data is given. This example is intended for comparison with the results from the typical use of XYZ2DEM Importer.

Screenshot:

images/nantucket_using_roi.png

Preliminaries:
  1. Download and install XYZ2DEM Importer.
  2. Download input data: nantucket.txt
  3. Download Region Of Interest (ROI): nantucket_roi.txt
  4. Download Look Up Table (LUT): nantucket_lut.txt
  5. Ensure that ImageJ has at least 128MB of memory available:
    Edit > Options > Memory & Threads...
  6. Ensure appropriate colors:
    Edit > Options > Colors... > Background: black
    Edit > Options > Colors... > Selection: yellow
Proceeding:
  1. Import nantucket.txt:
    Plugins > XYZ2DEM Importer: nantucket.txt
    using the following set of input parameters:
    Length of one pixel:   7.5
    Maximum edge length:   0.0
    Background value:     -1.0
  2. Import nantucket_roi.txt:
    File > Import > XY Coordinates...: nantucket_roi.txt
  3. Clear everything outside the coastline:
    Edit > Clear outside
  4. Save DEM image:
    File > Save As > Tiff...
  5. Apply Look Up Table:
    File > Import > LUT... : nantucket_lut.txt
Discussion: The blue background value in the resulting DEM image indicates the area out of the coastline. Please note that the given coastline only fits to a pixel size of 7.5m because it has to be given in pixel coordinates.
In many cases boundary information like the coastline will not be (easily) available. Here you find the example how to import the DEM image of Nantucket the quick and easy way without using a ROI polygon. You may want to compare both resulting DEM images by simply subtracting them.
Credits: The data set nantucket.txt is a compilation of Digital Terrain Model data kindly provided by the Office of Geographic and Environmental Information (MassGIS), Commonwealth of Massachusetts Executive Office of Environmental Affairs.