Sharpmap Analysis for Open Source GIS project based on. NET 2.0 (2): source code structure analysis

Source: Internet
Author: User
Tags map class

Through the previous "first intimate contact", we have a general understanding of SharpMap functions. Now we will analyze the overall structure of the source code of SharpMap. Decompress the source code of version 0.9. There are two folders: SharpMap and SharpMap. UI, as shown in 1. Figure 1 SharpMap source code structure in which SharpMap. UI is a namespace related to the user interface, such as Forms and Ajax. The SharpMap project is the main body, including data conversion, coordinates, Data, ry, layers, and other namespaces. The following describes the SharpMap namespaces, including the Map class, you can create an instance of a Map object to generate a Map. A Map object consists of Layer objects and a Layers set. The GetMap method is used to Render the Map. Converts namespace, which provides the data conversion service. CoordinateSystems namespace, which provides a coordinate system and its projection and conversion. The Data namespace provides support for various types of Data, including MSSQL and ShapeFile. Providers namespace, including IProvider interface, Shape file, and PostGIS Data Reading implementation. This namespace provides data read (write) Support for SharpMap. Through interface-oriented design, various data formats can be easily added. Geometries namespace, including various geometric classes to be used by SharpMap and its interface classes, such as points, lines, and surfaces. It is one of the foundations of SharpMap. All geometric objects are inherited from the abstract class Geometry, which defines the common operations that the geometric objects should have, such as the size, ID, external matrix, and geometric operations. Layers namespace, which supports various Layers, including the annotation layer and vector layer. A Layer is an abstract class that implements the ILayer interface. Currently, a Layer has three subclasses: VectorLayer, LabelLayer, and WmsLayer, which represent three layers of different data types. Rendering namespace, which currently includes the vector Renderer class and several topic graph Renderer classes. This class can render a geometric object as a System. Drawing. Graphics object based on its Style settings. Styles namespace. This namespace mainly provides style setting classes for layers, such as line style, point style, and fill style. Utilities namespaces include the Algorithms class (currently only one method is implemented); the Providers class is a Helper of the Provider and the reflection mechanism is applied; Surrogates is mainly used for serialization of the system's Pen and Brush; transform provides mutual transformation from image coordinates to geographical coordinates, that is, the screen coordinates and geographic coordinates that are frequently used in the secondary development of desktop GIS, it is mainly used for map rendering and interactive operations. Utilities. SpatialIndexing is used for the spatial index of objects. The Web namespace implements the HttpHandler and Caching classes for the network environment. Web namespaces, including network support such as HTTP, and Web. Wms support WMS. The SharpMap. UI project contains the Forms namespace, including the MapImage Control, a simple User Control (User Control), which encapsulates the Map class for Windows Form programming. Web. UI. Ajax provides Ajax support.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.