WMS:Images: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 15: Line 15:
The ''Images'' menu can be found when the GIS module is active. The menu has the following commands:
The ''Images'' menu can be found when the GIS module is active. The menu has the following commands:
; Import : Opens an image file. See below.
; Import : Opens an image file. See below.
; Screen Capture  : Saves a image file. See below.  
; Screen Capture  : Saves a bitmap image file. See below.


==Importing an Image==
==Importing an Image==
Line 25: Line 25:


:Additionally, some images contain companion world files (separate text files with the coordinate information) that can be used to georeference the image. WMS automatically recognizes some world files and when they are the images are automatically georeferenced using the included information. If the world file is not recognized automatically it can still be imported from the ''Registration'' dialog.
:Additionally, some images contain companion world files (separate text files with the coordinate information) that can be used to georeference the image. WMS automatically recognizes some world files and when they are the images are automatically georeferenced using the included information. If the world file is not recognized automatically it can still be imported from the ''Registration'' dialog.
{{Displaying Images}}


==Image Display Options==
==Image Display Options==
Line 39: Line 41:


When the '''Screen Capture''' command is issued the image currently in the ''Graphics window'' is converted internally to a TIFF image. Since the real coordinates of the screen corners are already known the image is automatically registered as it is captured. These images and registration points can be exported and read back into WMS at a later time.
When the '''Screen Capture''' command is issued the image currently in the ''Graphics window'' is converted internally to a TIFF image. Since the real coordinates of the screen corners are already known the image is automatically registered as it is captured. These images and registration points can be exported and read back into WMS at a later time.
<!-- Obsolete as of WMS 11.0
<!-- Obsolete as of WMS 11.0
==Image Crop Collar==
==Image Crop Collar==
Line 46: Line 47:
The '''Crop Collar''' command, available by right-clicking on an image in the Project Explorer, can be used to automatically remove the collar from the image for display.
The '''Crop Collar''' command, available by right-clicking on an image in the Project Explorer, can be used to automatically remove the collar from the image for display.
-->
-->
==Exporting Images==
==Exporting Images==
The '''Export''' command, available when right-clicking on the image in the Project Explorer is used to save a registered image. This command is most useful after screen capturing or cropping an image, or multiple images so that the new area can be saved as an image file.
The '''Export''' command, available when right-clicking on the image in the Project Explorer is used to save a registered image. This command is most useful after screen capturing or cropping an image, or multiple images so that the new area can be saved as an image file.

Latest revision as of 19:58, 6 March 2023


Images are one of the four basic object types that is supported in the Map module. An image is typically a scanned map or aerial photo in TIFF or JPEG format. Images can be imported to WMS and displayed in the background to aid in the placement of objects as they are being constructed or simply to enhance a plot. Images can also be draped or "texture mapped" onto a TIN or 2D grid.

WMS supports the following image types:

  • TIFF
  • JPEG
  • MrSID
  • ECW

Images Menu

The Images menu can be found when the GIS module is active. The menu has the following commands:

Import
Opens an image file. See below.
Screen Capture
Saves a bitmap image file. See below.

Importing an Image

The first step in using a new digital image for either background display or for texture mapping is to import the image. This can be done by either selecting the Import command in the Images menu or using the Open command in the File menu with the correct extension and opening an image file (TIFF, JPEG, or MRSID). Image files will be either georeferenced (contain coordinate information embedded) or not.

Multiple Images
WMS now allows more than one image at a time, however most will want to insure that each image is in the same coordinate system and that they are adjacent or it will do little good to have more than one image.
Geo-Referenced TIFF Files
Without embedded coordinate information about the image, it must be registered to real world coordinates when first imported. Some image files have the coordinate information embedded as part of the image and are referred to as georeferenced images. When a georeferenced image is imported to WMS, the image is automatically registered.
Additionally, some images contain companion world files (separate text files with the coordinate information) that can be used to georeference the image. WMS automatically recognizes some world files and when they are the images are automatically georeferenced using the included information. If the world file is not recognized automatically it can still be imported from the Registration dialog.

Displaying Images

Due to the large number of image formats and applications, XMS (GMS, SMS, and WMS) makes use of the GDAL library to classify the type of data in an image file when it is loaded into the application. XMS first classifies the image data as "Online", "Vector" or "Raster".

Online images are added to a project using the File | Add Online Image command. This command associates a URL to a web source with the image object, so XMS can always handle these images as dynamic images.

Vector images are not images at all but files that contain points, lines and/or polygons. When a GIS file (with the exception of ESRI Shapefiles and CAD DWG, DXF, or DGN files) containing vector data is read into XMS, XMS converts the vector information to an RGB image (raster) that XMS can display on the screen using a vector display pipeline. Vector data for ESRI shapefiles and CAD files is displayed as vector data without converting the information to a raster.

When opening any other image file, XMS looks for raster bands in the image. A band is a list of values for each pixel in an image. Most common types of bands include byte values, integer values, and float values. Each band may also have attributes to help indicate what the intended purpose of that data band. These attributes are not completely standard or required.

If XMS detects that an image file has raster data bands, it is processed as a raster image as described below. If no raster information is detected, XMS attempts to detect vector data in the file. If vector data is detected, XMS processes the vector data into a raster format for display. Vector image objects also include functionality to convert the vector data to map coverage data or to export them as ESRI shapefiles or other vector file formats.

Raster Images

XMS includes multiple display pipelines for raster images. These include:

  • Contour Raster Display Pipeline – This display pipeline is used to display contours on rasters containing floating point values:
    • These rasters have one single band of any data type. There cannot be any color palette or color defined for the single band. XMS displays contours for these rasters and allows users to change the contour options.
  • Color Image Display Pipeline – This display pipeline is used to display color images (anything that XMS does not contour):
    • If the image has a single band with a palette (such as a land use raster), XMS identifies this image as a type of index map. It converts this to an RGB image and displays the image using the palette colors.
    • If the image has a single band with a grayscale attribute associated with the band, XMS converts this image to an RGB image and displays it.
    • In all other cases, XMS converts the image to an RGB image based on the data in the first 3 bands and displays it. If the image has less than 3 bands, XMS uses the data in the first 1 or 2 bands as it exists and converts the image to a 3-band RGB image.

Note: if an XMS user loads an image with non-standard data, XMS will log a message indicating the type of anomaly associated with the image. These anomalies include:

  • XMS creates one or more bands as in the case described when the third band is generated.
  • XMS loads an image with bands that are of type other than “Byte”.
  • XMS detected extra bands that were not used in the generation of the image.

A user may desire to process the image file using external tools to clarify the intent of the data bands. This processing will normally result in a new image file, for which the data bands are clearly defined.

Vector Images

These images use the vector display pipeline in XMS. This display pipeline converts vector files that don’t have raster data to RGB images that can be displayed in XMS.

Online Images

These image use the online image display pipeline in XMS. This display pipeline converts online image services to RGB images that can be displayed in XMS.


Image Display Options

Once an image is imported, the Display Options command in the Display menu can be used to control how the image is displayed. The Image Display Options button of the Map tab brings up the Image Display Options dialog. The following display options are available:

Draw on XY plane behind all objects
If this option is selected, the image is drawn in the background prior to drawing any other objects. This mode is used to aid in the creation of new objects or to simply enhance a plot. The image is only displayed in plan view.
Texture map to surface when shaded
If this option is selected, the image is "draped" or texture mapped over the designated surface (TIN or 2D Grid). The image must be registered such that the surface lies within the domain of the image. The surface is texture mapped when the image is shaded using the Shade command.

Display Order

Images are displayed in the order they appear in the Project Explorer. Images that are listed above other images in the Project Explorer will be displayed above those images in the Graphics Window. The display order can be changed by clicking-and-dragging images above or below other images in the Project Explorer.

Screen Capture

Displays created by WMS can be captured to a TIFF image file using the Screen Capture command. These images can then be used in WMS as backgrounds, or can be used as images in other applications or report documents.

When the Screen Capture command is issued the image currently in the Graphics window is converted internally to a TIFF image. Since the real coordinates of the screen corners are already known the image is automatically registered as it is captured. These images and registration points can be exported and read back into WMS at a later time.

Exporting Images

The Export command, available when right-clicking on the image in the Project Explorer is used to save a registered image. This command is most useful after screen capturing or cropping an image, or multiple images so that the new area can be saved as an image file.

See also WMS:Exporting Dialog.

Image And Raster Projections

Most raster data has a projection and coordinates (X, Y, and possibly Z locations of each raster cell) associated with it. The projection contains information about how to map the coordinates in the raster to actual horizontal and vertical locations on the surface of the earth.

Storing Projection Information

When loading an image or a raster, GMS, SMS, or WMS (referred to collectively as XMS) determines the horizontal projection using GDAL. This will be based on either a projection file (*.prj) or internal projection information in the raster.

If vertical projection information (vertical datum and units) is available for the image or raster, XMS reads the information and stores it internally.

If changing any projection information for a raster loaded into the a project, the XMS software saves a new raster in GeoTiff format.

Occasionally, a raster will exist that does not contain elevation data (for example, concentration values). In this case, XMS stores a metadata flag (read only by GMS, SMS, and WMS) with the raster stating that the raster does not have elevation units. When this metadata flag is found by XMS, none of the vertical values are reprojected after reading the raster.

XMS uses GeoTiffs to export rasters with horizontal and vertical projection information for use in other GIS programs.

When loading a raster, if there are no vertical units found in the raster, and the vertical values are treated as elevations, XMS prompts the user for the vertical units and exports a new raster as a GeoTiff. Also, if the vertical units do not match the horizontal units and the file being loaded is not a GeoTiff file, XMS prompts the user to confirm the vertical units and exports a new raster as a GeoTiff.

Saving Projection Information with a Raster

XMS imports rasters in a wide variety of supported formats. XMS exports rasters in either GeoTiff or Arc/Info ASCII Grid formats. No other formats are currently supported for exporting raster data.

When exporting a GeoTiff, the horizontal and vertical projection information is stored internally in the file. When saving an Arc/Info ASCII Grid file, the horizontal and vertical projection information is stored in a projection file (*.prj) and metadata file. All the necessary horizontal and vertical projection information is read into XMS (or other GIS programs such as ArcGIS) in these formats.

Related Topics