Primostka Alexandra
Institute of Mining and Geology Departament of Geoinformatics and Geodesy Profession: Geografic Information Systems and Technologies
Theme of master's work: "Exploration of computer methods of spatial information reflection" Scientific adviser: professor, Doctor of Engineering Science Sholomitskij Andrey Arkadievich |
ABSTRACT
Introduction:
The terms "digital maps and geographic information system (GIS) have long and firmly established in the lexicon of professionals involved in information technology. The increased current demands for quality, completeness and complexity of the representation of geospatial data makes GIS seen as a necessary tool in the evaluation, analysis and decision making in a wide range of aspects of human activity. In this regard, GIS systems are now one of the most dynamically developing fields of science and technology, which is constantly developing new technical solutions and software technologies.
Relevance:
Often there is no need to pose a serious GIS. To address various problems is well suited desktop application. To add to such applications of GIS functionality, programmers, developers have resorted to the use of embedded mapping components.
The objective of master's work is to study modern methods reflection of mapping information, develop their own mapping component.
Overview of the current state of knowledge of the problem:
Cartographic component for embedding maps into other applications is a software component cards, designed to work with other software through the SDK and API, using the OLE functions and Active-X components. Cartographic SDK (Software Development Kit) manages the cards and their contents using the API functions and also lets you create multiple applications from simple interactive map to the office to advanced GIS services. Cartographic feature allows you to display on the map database.
The program contains all the necessary means to develop mapping systems, ie all the tools for editing and processing cards.
One of these mapping components, in particular, is MapObject.
Study Objectives:
1) To study the computer technology to build an image;
2) To master the methods of constructing the image using the graphics library OpenGL;
3) To study the structure of GIS;
4) Explore the modern cartographic components.
Research tasks:
1) Create a mapping component;
2) Develop GIS cartographic component.
Consider what the spatial data, and from which they are composed.
The spatial data (geographical data, geodata) is data about spatial objects and their combinations. Spatial data are the basis of information support GIS.
Spatial data typically consist of two interrelated parts: the coordinate and attribute data.
Coordinate data determine the positional characteristics of the spatial object. They describe its location in the fixed coordinate system.
Attribute data represents a set of attributes of spatial object. Attributive data determine the semantic content (semantics) of the object and may include qualitative or quantitative values.
The data formats define a way to store information on your hard drive, as well as the mechanism of its processing. Data models and data formats in a certain way connected.
There are a large number of data formats. It may be noted that in many GIS formats are supported by the main storage of raster data (TIFF, JPEG, GIF, BMP, WMF, PCX).
All systems support the spatial information exchange (exports and imports) with many GIS and CAD through the main exchange formats: SHP, E00, GEN (ESRI), VEC (IDRISI), MIF (MapInfo Corp.), DWG, DXF (Autodesk), WMF (Microsoft), DGN (Bentley).
So for the storage of spatial information in cartographic component as the format of spatial data selected SHAPE, because of its prevalence and the simple structure and storage thereof. Raster data will be stored in a format TIFF.
Spatial data can be displayed by GDI.
GDI (Graphics Device Interface, Graphical Device Interface) is one of three main components or "subsystems", together with the core Windows API and user interface components (window manager GDI) Microsoft Windows.
GDI is a Windows interface for the representation of graphic objects and transfer them to display devices such as monitors and printers.
Along with the GDI used OpenGL (Open Graphics Library - open graphics library) is specification, defining a programming language, cross-platform API for writing applications using two-dimensional and three-dimensional computer graphics.
Basic graphic operations that OpenGL to display the image on the screen.
1. Constructs shape of geometric primitives, creating a mathematical description of objects (primitives in OpenGL are points, lines, polygons, bitmaps and images).
2. Holds the lens in three dimensions and selects the observation point for the inspection obtained composition.
3. Calculates the color for all objects.
4. Convert the mathematical description of objects and their associated color information to pixels on the screen. This process is called rasterization (or raster scan).
Thus, in creating their own mapping component for displaying spatial information has been selected namely OpenGL, given its performance, the orthogonality (about the possibility of all the OpenGL functions are orthogonal, ie independent, you can use them in any combination) and completeness (as far as possible , OpenGL the set of functions offered by modern graphics hardware acceleration).
As mentioned earlier, one of the possibilities of mapping component of the project is the preservation of maps, preservation of layers with the given parameters and their raster. As the format of such a project is selected XML-based format.
XML (born eXtensible Markup Language) - recommended by the World Wide Web Consortium markup language. XML - text format for storing structured data (to replace the existing database files), as well as to create on its base of more specialized markup languages.
Visually, the structure can be represented as a tree of elements. XML Elements are described by tags.
The names of those loaded in the project, their parameters (color, line thickness, etc.), addresses downloaded themes and other remains in the project file, which format is XML. This file has the following structure:
<XMLdoc>
<HEADER>
<name_project> project name </ name_project>
<MinX> Min. Õ bounding box of the current view </ MinX>
<MaxX> Max. X bounding box of the current view </ MaxX>
<MinY> Min. Y Y bounding box of the current view </ MinY>
<MaxY> Max. Y bounding box of the current view </ MaxY>
</HEADER>
<BODY>
<Points>
<Point1>
<name_point> name of the point theme </ name_point>
<address_point> address storage point theme </ address_point>
<size_point> point size </ size_point>
<color_point> color point </ color_point>
<visible_point> displays a point theme in the form of </ visible_point>
</ Point1>
…………………… ... ... ... ... ... ... ... ...
<PointN>
<name_point> name of the point theme </ name_point>
<address_point> address storage point theme </ address_point>
<size_point> point size </ size_point>
<color_point> color point </ color_point>
<visible_point> displays a point theme in the form of </ visible_point>
</ PointN>
</ Points>
<Lines>
<Line1>
<name_line> name linear theme </ name_ line>
<address_ line> address storage linear theme </ address_ line>
<size_ line> thickness of the line </ size_ line>
<color_ line> line color </ color_ line>
<visible_line> see whether a linear theme in the form of </ visible_line>
</ Line 1>
…………………… ... ... ... ... ... ... ... ...
<LineN>
<name_ line> name linenyo theme </ name_ line t>
<address_ line> address storage Linen theme </ address_ line>
<size_ line> thickness of the line </ size_ line>
<color_ line> line color </ color_ line>
<par_ line> line type (solid or dashed) </ par_ line>
<factor_ line> parameters strokes </ factor_line>
<pattern_ line> parameters strokes </ pattern_ line>
<visible_line> see whether a linear theme in the form of </ visible_point>
</ LineN>
</ Lines>
<Polygons>
<Polygon1>
<name_polygon> name polygonal themes </ name_ polygon>
<address_polygon> address storage polygonal themes </ address_polygon>
<size_ polygon> thickness of the border </ size_ polygon>
<color_border_polygon> border color </ color_border_polygon>
<color_ polygon> polygon fill color </ color_ polygon>
<visible_ polygon> see whether polygon theme in the form of </ visible_ polygon>
</ Polygon 1>
…………………… ... ... ... ... ... ... ... ...
<PolygonN>
<name_polygon> name polygonal themes </ name_ polygon>
<address_polygon> address storage polygonal themes </ address_polygon>
<size_ polygon> thickness of the border </ size_ polygon>
<color_border_polygon> border color </ color_border_polygon>
<color_ polygon> polygon fill color </ color_ polygon>
<visible_ polygon> see whether polygon theme in the form of </ visible_ polygon>
</ PolygonN>
</ Polygons>
</ BODY>
</ XMLdoc>
Consider the structure of the source data
The name of the array |
Description |
Data type |
The size of the array |
For point so |
|||
Name_t_tem |
Name of the point theme |
Àrray of string |
The number of open themes |
N_t |
Number of points in the topic |
Array of integer |
The number of open themes |
X_t |
Coordinates of X points |
Array of array of double |
The two-dimensional array: [0 .. The number of open themes -1, 0 .. number of points in the subject] |
Y_t Y_t |
Y coordinates of points |
Array of array of double |
The two-dimensional array: [0 .. The number of open themes -1, 0 .. number of points in the subject] |
For linear order |
|||
Name_l_tem |
Title olineynoy topic |
Àrray of string |
The number of open themes |
N_l |
The number of lines in the subject |
Array of integer |
The number of open themes |
K_lin |
Number of lines in a multiline |
Array of array of integer |
The two-dimensional array: [0 The number of open themes -1, 0 .. number of lines in the theme-1] |
K_t_l |
Number of points in the multiline |
Array of array of integer |
The two-dimensional array: [0 .. The number of open themes-1, 0 .. number of lines in the theme-1] |
In_l |
Indices of the first points of the lines in the multiline |
Array of array of integer |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
X_l |
è Coordinates of X line |
Array of array of array of double |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
Y_l Y_l |
Y coordinate line |
Array of array of array of double |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
For those polygonal |
|||
Name_p_tem |
Name polygonal themes |
Àrray of string |
The number of open themes |
N_p |
The number of polygons in the theme |
Array of |
The number of open themes |
K_pol K_pol |
Êîëè÷åñòâî ïîëèãîíîâ â ìóëüòèïîëèãîíå The number of polygons in multipoligone |
Array of array of integer |
The two-dimensional array: [0 .. The number of open themes -1, 0 .. The number of polygons in the theme-1] |
K_t_p K_t_p |
Êîëè÷åñòâî òî÷åê â ìóëüòèïîëèãîíå Number of points in multipoligone |
Array of array of integer |
The two-dimensional array: [0 .. The number of open themes -1, 0 .. The number of polygons in the theme-1] |
In_p |
Indices of the first points of polygons in multipoligone |
Array of array of integer |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
X_p |
Coordinates of X ranges |
Array of array of array of double |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
Y_p |
Y coordinate ranges |
Array of array of array of double |
Three-dimensional array: [0 .. The number of open themes -1, 0 .. The number of lines in the theme-1, 0 .. number of points in the multiline] |
In order to develop a component in Delphi, you must first declare a class.
Classes in Delphi called special types that contain fields, methods and properties.
The class is only to create specific models of implementation, which are called objects. The class consists of fields, methods and properties. Fields are encapsulated data in the classroom. Procedures and functions in the class are called methods, and properties (the special attributes of the class).
The component should be registered in Delphi, that is present at the Component Palette Delphi.
The developed class TGeoMap will contain the following fields, methods and properties.
Fields:
Layers - a list of map layers. Recourse to the layer number
Methods:
MoveTo(X,Y:Double) – shifts the card into a point with given coordinates.
LoadLayer –download the layer
DeleteLayer – remove a layer
NewProject – create a new project
SaveProject – save project
LoadProject – download the finished project
LoadTIFF – download grid
DeleteTIFF – remove grid
SetExtent – set a specified extent as the current
ScaleIn, ScaleOut – zoom map
Refresh – redraw the map
ShowThemeTable – display a table of attributes of the layer
ChangeLegend – change the legend of the layer
SetExtentTheme - to establish a boundary layer of the frame as the current extent
Vector algebra of maps:
Union –merging layers
Intersect –the intersection of layers
Clip –cutting out layers
Properties:
GetX,GetY – returns the current coordinates of the center of the map
GetExtent –returns the current extent map
LayerName – returns the name of the layer
LayerVisible – returns the layer visibility
LayerObjectCount –returns the number of objects on the layer
Image 1 - Illustration of the basic stages of the application
(Animation: file size - 129 KB, pixels 320x200, number of cadres - 8, the delay between shots - 100 ms,
number of cycles of repetition - unlimited)
Conclusions and prospects for research:
The study examined the methods of constructing an image. Display information in the generated cartographic component decided to carry out means OpenGL, given its high productivity.
At this stage, holds reading and displaying SHAPE-file with OpenGL. Also, by working with the image (scaling, moving, changing extents), working with the project (ie, maintenance and reading the XML-document).
It is planned to perform a connection to the DBF-tables (display attribute data), connectivity raster and create your own mapping component.
REFERENCES
1.Open desktop GIS: a review of the current situation. MY Dubinin, DA Rykov
2. OPENGL. Superbook. Richard C. Wright Jr., Benjamin Lipchak. Moscow, 2006
3. Encyclopedia of GIS. Shashi Shekhar, Hui Xiong
4. Translation of specification Extensible Markup Language (XML) 1.0 (Second Edition) (W3C Recommendation) in Russian
5. Valery Pharaohs "The art of the components in Delphi"
6. OpenGL Graphics, through Applications. Robert Whitrow
7. http://sharifa.uz/static/101 Theory and practice of GIS