Table of Contents

Class NativeImageRasterLayer

Namespace
ThinkGeo.Core
Assembly
ThinkGeo.Core.dll

This class represents general image types to be drawn on the map, such as .BMP, .JPG, .PNG, etc.

public class NativeImageRasterLayer : RasterLayer
Inheritance
NativeImageRasterLayer
Inherited Members

Remarks

This type of layer is used to draw standard image types on the map. These include .BMP, .JPG, .PNG, .TIFF, and all other image types that are supported by the .NET Framework to be loaded as a Bitmap.

Each of these images will need a world file associated with it. The world file contains the geospatial information pertaining to the image. Using the world file, we know its spatial position and other required information to draw it on the map relative to other images or spatial features. World files are small text files with an extension that matches the original image's extension, but with the middle character of the extension changed to a "w". If you have images that you want to use but do not have their world files, please contact the source of the image so that they can provide one for you. world files are fairly common in the GIS community.

Constructors

NativeImageRasterLayer()

This is a constructor for the class.

public NativeImageRasterLayer()

Remarks

If you use this constructor, then you need to set the PathFilename property manually before using the layer.

NativeImageRasterLayer(string)

This is a constructor for the class.

public NativeImageRasterLayer(string imagePathFilename)

Parameters

imagePathFilename string

This parameter is the path and filename of the GDI+ image file you want to use. If you want to load a Tiff(.tif or .tiff) files, please use the GeoTiffRasterLayer instead for better performance.

Remarks

This constructor gets the layer ready to use.

NativeImageRasterLayer(string, string)

This is a constructor for the class.

public NativeImageRasterLayer(string imagePathFilename, string worldfilePathFilename)

Parameters

imagePathFilename string

This parameter is the path and filename of the GDI+ image file you want to use. If you want to load a Tiff(.tif or .tiff) files, please use the GeoTiffRasterLayer instead for better performance.

worldfilePathFilename string

This parameter is the world file path and filename for the GDI+ image you want to use.

Remarks

This constructor gets the layer ready to use.

NativeImageRasterLayer(string, RectangleShape)

This is a constructor for the class.

public NativeImageRasterLayer(string imagePathFilename, RectangleShape imageExtent)

Parameters

imagePathFilename string

This parameter is the path and filename of the GDI+ image file you want to use. If you want to load a Tiff(.tif or .tiff) files, please use the GeoTiffRasterLayer instead for better performance.

imageExtent RectangleShape

This parameter is the image extent of GDI+ image file you want to use.

Remarks

This constructor gets the layer ready to use.

Properties

HasBoundingBox

This property checks to see if a Layer has a BoundingBox or not. If it has no BoundingBox, it will throw an exception when you call the GetBoundingBox() and GetFullExtent() APIs. In GdiPlusRasterLayer, we override this API and mark it as true.

public override bool HasBoundingBox { get; }

Property Value

bool

Remarks

The default implementation in the base class returns false.

ImagePathFilename

This property gets and sets the path and filename of the image file you want to use.

public string ImagePathFilename { get; set; }

Property Value

string

This property gets the path and filename of the image file you want to use.

Remarks

This should be a complete path and filename for the image file.

Events

StreamLoading

[Obfuscation(Exclude = true)]
public event EventHandler<StreamLoadingEventArgs> StreamLoading

Event Type

EventHandler<StreamLoadingEventArgs>