Design of Campus Navigation System Based on MaPX

Introduction With the GIS entering the industrialization stage, the application field of secondary integration development is expanding. The secondary development mode of GIS component and object-oriented visual programming language integration is becoming the mainstream, which can fully utilize GIS components to spatial database. Management and analysis functions. It is also possible to take advantage of the high efficiency and convenience of the visual programming language. Combined with the ever-expanding background of the school scale and the number of enrolled students, the new campus will bring a lot of inconvenience to the new students when they enter school. Making a campus electronic map and displaying the target in real-time GPS position will become very good. Significant.

This article refers to the address: http://


1 Theoretical basis of system development
1.1 GIS
GIS is also known as "geographic information system." It is supported by computer hardware and software systems. A technical system for collecting, storing, managing, computing, analyzing, displaying, and describing geographicly distributed data in all or part of the Earth's surface (including the atmosphere). GIS processing and management objects are a variety of geospatial entity data and their relationships, including spatial positioning data, graphic data, remote sensing image data, attribute data and so on. It is used to analyze and process various phenomena and processes distributed in a certain geographical area to solve complex planning, decision-making and management problems.
1.2 MapInfo
Maplnfo Geographic Information System is the desktop geographic information system software of MapInfo Corporation of the United States. It is a desktop solution for data visualization and information mapping. It not only has the functions of vectorization, editing, query, statistical analysis, drawing thematic maps and report making, but also provides users with a series of powerful secondary development functions. MapInfo provides a companion development tool. Such as MapBasic5. O and MapX4. In the Maplnfo Geographic Information System. Spatial data and attribute data are stored separately. Attribute data is stored as a table in the form of a database, while spatial data is in a table. The format defined by MapInfo itself is saved in the file. The two are linked by a certain indexing mechanism. MapInfo uses geography to manage geography. Each layer consists of four basic files: attribute data table structure file (.TAB), attribute data file (.DAT), cross index file (.ID), and Spatial data file (.MAP).
1.3 MapX
Map is a 32-bit OCX control provided by Maplnfo to develop geographic information systems. It uses the map data format consistent with Maplnfo Professional and implements most of the features of MapInfo Professional. In VB.Delphi, PowerBuilder, VC and other visual development environments. Just put the MapX control into the form during the design phase. And program it. Set the properties or call methods or corresponding events, you can achieve data visualization, thematic analysis, geographic query, geocoding and other rich map information system functions.


2 Campus navigation system block diagram and implementation of each module The system uses a primitive object to represent and collect and process GPS positioning data in NMEA 0183 format and extract latitude and longitude data in real time by using GPS (Global Positioning Satellite) and multi-threading technology. It is assigned to the target element on the dynamic layer in the electronic map made by MapInfo, and the target position is updated by the timer to realize real-time positioning on the electronic map. When a certain location is reached, the voice prompt command is broadcasted. The system also has the basic functions of electronic maps such as zooming in, zooming out, roaming, and adding electronic maps. The block diagram of the system is as follows:

2.1 Electronic map production and display On the Maplnfo software platform, the campus map of the jpg format of the University of North China is loaded, and the latitude and longitude information collected in the field is recorded in the campus map to complete the registration of the electronic map. According to the characteristics of colleges and universities, the electronic map is divided into layers such as road level, teaching laboratory building, student apartment building, teacher apartment building, commercial service building, cultural and sports facilities. Run Geoset under MapX. The Manager application, create a new Geoset file called NUC, add the above layers to form a map file with the suffix gst: NUC. Gst, through the MapX control to embed the campus map into the system interface, thus completing the drawing and display of the electronic map.
2.2 Basic functions of electronic maps The basic functions of electronic maps include selection, labeling, reduction, enlargement, and roaming. These functions can be easily implemented using MapX. Let's take a zoom out function as an example to briefly introduce how to achieve map reduction in the program.
Add a new Toolbar resource. Enter the title "IDR_TOOL_BARMAP". Add a button under "IDR_TOOLBARMAP", draw a reduced graph on it to indicate "zoom out", and its ID is ID_MAP_TOOL_ZOOMOUT. Open the class wizard. Select the view class CMapXView. Add the COOMMAND message mapping function OnMapToolZoomout() to the menu item ID_MAP_TOOL_ZOOMOUT and edit the code as follows:


Compile and run the program. Click the zoom out button and click on the electronic map to zoom out the electronic map. The functionality of other standard tools can be implemented in the same way.
2.3 GPS data reception and processing This module completes the function of reading data from the serial port and processing the data according to the NMEA0183 protocol followed by GPS to obtain information such as latitude and longitude coordinates. This module includes two parts of serial communication and data processing.
Since the GPS module updates the data every second, when there are 4 satellites in the sky, the serial port will continuously receive the positioning data. In order to monitor the serial port in real time, you can also perform some other operations in the foreground. The serial communication method based on the multi-threaded CSerialPort class can solve this problem well.
The workflow of this module can be divided into the following steps: (1) Initialize the serial port configuration by using InitPort() of CSerial-Port. (2) If the configuration is successful, use StartMonitoring() to open the serial port and create a thread to monitor the serial port. (3) Add a message processing function that responds to the WM_COMM_RXCHAR message in the corresponding class, and perform receiving character processing therein. (4) Add a timer. Processing GPS positioning data in NMEA 0183 format in OnTimer. Save the extracted latitude data to a member variable on the corresponding class.
2.4 Target Positioning and Broadcasting This module obtains the latitude and longitude coordinates and other information from the GPS data processing module, and assigns it to the target picture element, and updates the picture element position through the timer to complete the real-time positioning.
Because the program receives the positioning data in real time to update the position of the primitive. It requires the program to refresh the entire layer frequently, which will affect the efficiency. The purpose of the dynamic layer is to speed up the refresh rate of the layer and improve efficiency. After setting up the dynamic layer. The dynamic layer is only refreshed every time it is refreshed, which solves this problem very well. The sample code is as follows:


The final running interface of the program is as follows:

3 Conclusion This paper is based on the background of GIS secondary development. Based on the actual characteristics of the campus, a campus navigation system based on MapX was developed. After debugging, the program runs stably, and realizes functions such as zooming in, zooming out, and roaming the electronic map. The program is compiled by Mi-crosoft Visual C++ 6.0 and runs under Windows XP.

Based on strict QA and QC system, all the laptop ac adapters are approved CE ROHS FCC SAA UL certification with 1 year warranty. And all laptop chargers have over voltage protection, over temperature protection, short circuit protection. Original laptop chargers are good, but I think you will also like our Laptop Adapter replacements with nice quality, competitive price and good after-sale service after a small trail order. Hope we be your trustworthy laptop charger business partner in China.

19V Laptop Adapter

19V Laptop Adapter,19V Laptop Power Adapter,19V Adapter For Laptop,19V Charger Laptop Adapter

Shenzhen Pengchu Industry Co., Ltd , http://www.pc-adapters.com