ThinkGeo.Core.RasterSource
Inheritance Hierarchy
Members Summary
Public Constructors
Protected Constructors
RasterSource()
Parameters
Public Methods
CloneDeep()
The difference between deep clone and shallow clone is: when shallow cloned, only the object is copied, but the contained objects are not; while in deep clone it does copy the cloned object as well as all the objects within.
Return Value
Parameters
GetWorldFileText()
This method wraps the Core version of this method and returns a string that represents the image's world file. The world file is a file type that can accompany image files. It contains information about the image's position, resolution and other spatial-related items. It is common to have this kind of file associated with generic image types such as JPG, BMP, and normal TIFF because they do not have a mechanism to store this data internally. Modern GIS image types such as JPEG2000, ECW, and MrSid typically have this information stored internally. We provide this method in the event that you want to create your own world file from any image that either already has one or has its data stored internally. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetImageWidth()
This method returns the width of the image in screen coordinates. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetImageHeight()
This method returns the height of the image in screen coordinates. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetHorizontalResolution()
This method returns the horizontal resolution of the image. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetVerticalResolution()
This method returns the vertical resolution of the image. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetBoundingBox()
This method returns the bounding box of the RasterSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
Open()
This method is the concrete wrapper for the abstract method OpenCore. The Open method plays an important role, as it is responsible for initializing the RasterSource. Most methods on the RasterSource will throw an exception if the state of the RasterSource is not opened. When the map draws each layer, it will open the RasterSource as one of its first steps; then, after it is finished drawing with that layer, it will close it. In this way, we are sure to release all resources used by the RasterSource. When implementing the abstract method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RasterSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Type:Void
Description:None
Parameters
Close()
This method is the concrete wrapper for the abstract method CloseCore. The Close method plays an important role in the life cycle of the RasterSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override the Core version of this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed RasterSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Type:Void
Description:None
Parameters
GetImage(RectangleShape,Int32,Int32)
This method is responsible for returning the image based on the parameters passed in. As the core version of this method is abstract, you will need to override it when creating your own RasterSource. As this is a concrete public method that wraps a Core method, we reserve the right to add events and other logic to pre- or post-process data returned by the Core version of the method. In this way, we leave our framework open on our end, but also allow you the developer to extend our logic to suit your needs. If you have questions about this, please contact our support team as we would be happy to work with you on extending our framework.
Return Value
Parameters
GetType()
Return Value
Type:Type
Description:N/A
Parameters
ToString()
Return Value
Type:String
Description:N/A
Parameters
Equals(Object)
Return Value
Type:Boolean
Description:N/A
Parameters
obj
Type:Object
Description:N/A
GetHashCode()
Return Value
Type:Int32
Description:N/A
Parameters
GenerateWorldFileText(RectangleShape,Int32,Int32)
This method returns a string that represents the image's world file. The world file is a file type that can accompany image files. It contains information about the image's position, resolution and other spatial-related items. It is common to have this kind of file associated with generic image types such as JPG, BMP, and normal TIFF because they do not have a mechanism to store this data internally. Modern GIS image types such as JPEG2000, ECW, and MrSid typically have this information stored internally. We provide this method in the event that you want to create your own world file from any image that either already has one or has its data stored internally.
Return Value
Parameters
Protected Methods
OnOpeningRasterSource(OpeningRasterSourceEventArgs)
You can call this method from a derived class to enable it to raise the OpeningRasterSource event. This may be useful if you plan to extend the RasterSource and you need access to the event. Details on the event: This event is called before the opening of the RasterSource. Technically, this event is called after the calling of the Open method on the RasterSource, but before the protected OpenCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Return Value
Type:Void
Description:None
Parameters
OnChangedSourceStatus(ChangedSourceStatusEventArgs)
Return Value
Type:Void
Description:N/A
Parameters
OnOpenedRasterSource(OpenedRasterSourceEventArgs)
You can call this method from a derived class to enable it to raise the OpenedRasterSource event. This may be useful if you plan to extend the RasterSource and you need access to the event. Details on the event: This event is called after the opening of the RasterSource. Technically, this event is called after the calling of the Open method on the RasterSource and after the protected OpenCore method is called. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Return Value
Type:Void
Description:None
Parameters
OnClosingRasterSource(ClosingRasterSourceEventArgs)
You can call this method from a derived class to enable it to raise the ClosingRasterSource event. This may be useful if you plan to extend the RasterSource and you need access to the event. Details on the event: This event is called before the closing of the RasterSource. Technically, this event is called after the calling of the Close method on the RasterSource, but before the protected CloseCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Return Value
Type:Void
Description:None
Parameters
OnClosedRasterSource(ClosedRasterSourceEventArgs)
You can call this method from a derived class to enable it to raise the ClosedRasterSource event. This may be useful if you plan to extend the RasterSource and you need access to the event. Details on the event: This event is called after the closing of the RasterSource. Technically, this event is called after the calling of the Close method on the RasterSource and after the protected CloseCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Return Value
Type:Void
Description:None
Parameters
CloneDeepCore()
The difference between deep clone and shallow clone is: when shallow cloned, only the object is copied, but the contained objects are not; while in deep clone it does copy the cloned object as well as all the objects within.
Return Value
Parameters
GetImageWidthCore()
Return Value
Parameters
GetImageHeightCore()
Return Value
Parameters
GetBoundingBoxCore()
Return Value
Parameters
OpenCore()
This protected virtual method is called from the concrete public method Open. The Open method plays an important role, as it is responsible for initializing the RasterSource. Most methods on the RasterSource will throw an exception if the state of the RasterSource is not opened. When the map draws each layer, it will open the RasterSource as one of its first steps; then, after it is finished drawing with that layer, it will close it. In this way, we are sure to release all resources used by the RasterSource. When implementing this abstract method, consider opening files for file-based sources, connecting to databases in the database-based sources and so on. You will get a chance to close these in the Close method of the RasterSource.
Return Value
Type:Void
Description:None
Parameters
CloseCore()
This protected virtual method is called from the concrete public method Close. The Close method plays an important role in the life cycle of the RasterSource. It may be called after drawing to release any memory and other resources that were allocated since the Open method was called. If you override this method, it is recommended that you take the following things into account: This method may be called multiple times, so we suggest you write the method so that that a call to a closed RasterSource is ignored and does not generate an error. We also suggest that in the Close you free all resources that have been opened. Remember that the object will not be destroyed, but will be re-opened possibly in the near future.
Return Value
Type:Void
Description:None
Parameters
GetWrappingImageLeft(RectangleShape,Double,Double,RectangleShape)
Return Value
Parameters
screenWidth
Type:Double
Description:N/A
screenHeight
Type:Double
Description:N/A
GetWrappingImageRight(RectangleShape,Double,Double,RectangleShape)
Return Value
Parameters
screenWidth
Type:Double
Description:N/A
screenHeight
Type:Double
Description:N/A
GetImageCore(RectangleShape,Int32,Int32)
Return Value
Parameters
MemberwiseClone()
Return Value
Type:Object
Description:N/A
Parameters
Finalize()
Return Value
Type:Void
Description:N/A
Parameters
Public Properties
ProjectionConverter
Return Value
Projection
Return Value
Transparency
Return Value
BlueTranslation
Return Value
RedTranslation
Return Value
GreenTranslation
Return Value
IsNegative
Return Value
IsGrayscale
Return Value
ScaleFactor
Return Value
IsOpen
Various methods on the RasterSource require that it be in an open state. If one of those methods is called when the state is not open, the method will throw an exception. To enter the open state, you must call the RasterSource's Open method. The method will raise an exception if the current RasterSource is already open.
Return Value
Protected Properties
Public Events
OpeningRasterSource
This event is called before the opening of the RasterSource. Technically, this event is called after the calling of the Open method on the RasterSource, but before the protected OpenCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Event Arguments:OpeningRasterSourceEventArgs
OpenedRasterSource
This event is called after the opening of the RasterSource. Technically, this event is called after the calling of the Open method on the RasterSource and after the protected OpenCore method is called. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Event Arguments:OpenedRasterSourceEventArgs
ClosingRasterSource
This event is called before the closing of the RasterSource. Technically, this event is called after the calling of the Close method on the RasterSource, but before the protected CloseCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Event Arguments:ClosingRasterSourceEventArgs
ClosedRasterSource
This event is called after the closing of the RasterSource. Technically, this event is called after the calling of the Close method on the RasterSource and after the protected CloseCore method. It is typical that the RasterSource may be opened and closed may times during the life cycle of your application. The type of control the MapEngine is embedded in will dictate how often this happens. For example, in the case of the Web Edition, each time a RasterSource is in the Ajax or Post Back part of the page cycle, it will close the RasterSource before returning back to the client. This is to conserve resources, as the web is a connection-less environment. In the case of the Desktop Edition, we can keep the RasterSource open, knowing that we can maintain a persistent connection.
Event Arguments:ClosedRasterSourceEventArgs