Applying of Flash Technology in GIS
Transkrypt
Applying of Flash Technology in GIS
Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Geographical Information Systems - Interdisciplinary Aspects University of Silesia - GIS Forum - SILGIS Association, Sosnowiec - Zagreb 2003 Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak University of Silesia in Katowice, Faculty of Engineering, Poland Applying of Flash Technology in GIS Introduction In present global society, when the number of information increases in progress of time, the most important seems to be to reach the most indispensable information. Presently the information can be gained in many ways, e.g. from reports of proprieties and statistics up to digital satellite pictures and multimediumistic documents. „Geographic Information Systems” (GIS) allows gathering of all types of information together, basing on spatial relations. In opportunity to traditional cartographic products they allow analysing in simultaneous way some actual, necessary information layers, enabling their simultaneous presentation on computer screen or in a form of listings. In Poland GIS functions as category of primary importance. For needs of central Government offices GIS was divided according to the degree of minuteness of details of collected information of spatial objects, distinguishing: - Systems of Geographical Information (SIG) – scale above 1 : 5000, - Systems Information of Terrain (SIT) – scale below 1 : 5000. SIT is characterised nor only by precision and minuteness of details of data belonged to it, but typical for it is also institutional aspect It regards all legal, political, economical and social dependences connected with system activity. The organisation aspect is also very important, because it presents dependences between technical means, information resources and user working in the system. According to the definition by International Federation of Geodesists „GIS is the tool to make legal, administrative and economical decisions and the help in planning and development. It consists in database, including spatial data concerning defined areas and procedures and techniques to systematic collecting, actualising and access to these data” [7]. One of GIS systems elements is „digital map” and rather its digital reflection. This map consists not only of point and objects coordinates, but also of their properties and connection between them. Till now “digital maps” were presented only by means of specialistic GIS programs, e.g. MapInfo. In this paper the conception of internet GIS program is presented. GIS systems In Poland among people engaged in Geographic Information Systems (GIS) there is no univocal definition and meaning of this word. Therefore below are presented some definition of GIS according to English and American literature: 165 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak - GIS is the informatics system projected to work with data, which are related to spatial or geographical coordinates. In other words GIS is base-data system with the possibility to store spatially related data as well as the series of functions intended to these data processing [1] - GIS is the system intended to collect, store, verify, integrate, manipulate, analyse and visualise data spatially related to the Earth surface [2] - GIS is the automatized system to collect, store, search, analyse and project spatial data [3] - GIS is the system built of the equipment, programs and procedures, projected to collect, manage, manipulate, analyse, model and visualise data spatially related to solve complicated planning and organisation problems [4] From above-mentioned definition results, that they are very similar, but they indicate the technical side of GIS systems. GIS systems were to a large degree based on the application of CAD type, systems supporting digital cartography and systems of database management. D.J. Cowen in one of his papers mentioned importance of decision support by GIS systems: „system of decision support connected with interactive processing of spatial data to solve problems” [5]. From cited definitions result three main features of GIS system: 1. GIS renders accessible mechanisms of input, collecting and storing of spatial data and management of them, it secures their integrity and compactness and allows their initial verifying. 2. On the base of data collected in the system it is possible to realise specific analyses basing among others on spatial relations between objects. 3. Results of spatial analyses and operations for base-data programs can be presented in a description (table form) or graphic form (map, diagram, graphs, figures), therefore the characteristic feature of GIS is visualisation and offering spatial information in required form. Systems of Spatial Information connect knowledge from many disciplines: informatics, geography, cartography, geodesy, administration, the environment protection, economy, statistics and many others. The base of GIS systems is digital map. To objects on the map are added different description databases; one of fields' records contains information of its location in the space. The core of GIS is the base of geographical data, often described as digital reflection of map, being the composition of three series: - numerical map, on which the record of objects coordinates is stored; - topology, where the record of spatial relations between geographical objects is stored; - attributes, qualitative and quantitative features of particular objects or classes. Base of geographical data as an integral GIS component is the „series of numerical data relating to objects of geographical character, univocally and spatially located together with managing programs, which - together with data - 166 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Applying of Flash Technology in GIS allows realising defined, precise, formal model of reality in geographical expression” [6]. Every system should fulfil five basic functions (relating to spatial data): 1. data input, 2. data transforming, 3. data storing, completing and actualisation (data management), 4. data analysis, 5. gaining of final product. Dependences between particular functions are presented in fig. 1. Problem defining and data collecting Product Data input Database management Spatial analysis of data Data visualisation Data transformation Fig. 1 Structure of GIS systems There is still increasing interest in using of global nets – most of all Internet – in distribution of geodata and securing distance access to local systems of spatial information. It is also possible to meet more and more frequently with word InterGIS, which means the integration of GIS system with Internet. Conception on INTERNET GIS system Project of this internet GIS program applies co-operation of WWW server, such as Apache, PHP scripts, CGI scripts and library of Macromedia Flash to generate visualisation of processed digital maps. The general scheme of such project activity is presented in fig. 2. 167 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak Application of client Application of WWW server START login, password user verification logging logging error cookie, SID choice of files to translation file name if more files translation mif2.dat names of processed map files choice of map to display name of map file generating of FLASH file change of map map generated (stdout) new parameters and ranges of map zoom+, zoommap service STOP Fig. 2 Proposed structure of Internet GIS program 168 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Applying of Flash Technology in GIS APACHE is the WWW server, containing set of programs, used on huge number of servers working under control of UNIX systems (Linux), but accessible also on other platforms e.g. Windows. Considering the fact that it is free, there are: easy access to code, easiness of installation and configuration and possibilities to apply, it became the leader among WWW servers. Possibilities of Apache allow to use it as a server serving any kind of internet portals – starting from static WWW pages or more developed portals using dynamical files generating HTML and finishing at huge base-data systems in a kind of data wholesale firm. Module character of Apache (possibility to add different enlargements of server – also at the stage of its compilation) causes that it is completely graduated solution, which easily allows adapting server to real needs and tasks. Modules located in Apache distribution enables among others: starting of scripts written in different programming languages, verifying of users, using different techniques and facilities (e.g. cookie, files diaries, operations on catalogues). In following versions the support for the newest technologies is added and the server efficiency is improved. PHP: Hypertext Pre-processor is script language acting at the side of server and settled in code HTML. Therefore the whole code php is located between code html, and made on server. It is excellent tool to collect data from forms, to generate dynamically changing www pages, to operate on cookies and to present and operate on databases. Additionally PHP has support for other net protocols. Server Apache is most often usable to test pages WWW, made by itself and mostly to test scripts CGI (Common Gateway Interface) and PHP, which are often added to our pages as counters, guests books, programs processing different data Scripts CGI act at the side of server. They process these messages transferred by means of HTTP at the usage of Internet web browser. These data are most often written in forms of HTML and transferred by means of method of POST. When user opens the main page of project, the script PHP (index.php) with logging in the project is opened. Logging is based on the checking of login and password given by user with data written in file hasla.dat (passwords.dat) in the proper catalogue at the side of server WWW. Satisfactory logging opens the access to project and sets up new session and cookie for user. User receives unique number, identifying him, which is also written to cookie up to the closing of the web browser. Number of session and cookie are very necessary in the further part of the project, because on the base of them it is permitted user to execute scripts CGI. If user does not open the session or has not cookie on his computer, then he is unable to execute script CGI, even through the writing of proper net path into file. Scripts CGI are such protected, that they do not execute function included in them till the time when session identifier and cookie will be not in agreement with these values, which user receives at the moment of proper logging into the project. 169 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak When the stage of logging is properly finished, then the redirection into the following script PHP (mif2dat.php) takes part. This script is responsible for the selection of files with extension .mif, i.e. files presenting digital map reflection by user. Files selection is organised in two ways. The first of possibilities is selection of files located on the server. User can mark one file from catalogue located on the server, which is in the field of his interest and then run script CGI (mif2dat.exe), which will make the translation of file to temporary form, thanks to which the data presenting takes part. When the user has any file answering the form of digital map with extension .mif and wants to display it using this project, then he can to choose the second possibility. He can – by means of script PHP - (send_mif.php) send into server and then, using the first possibility, process it to the form, from which the digital reflection of the map will be created. When the user will make a decision of the choice of the proper file with digital reflection of the map, then this file should be exposed to translation into the form of file (.dat). This translation is made by means of script CGI (mif2dat.exe). The activity of this script can be divided into three important stages: opening of file with extension .mif, translation of file with extension .mif into the form of file .dat, closing of both files. Next step is execution of function to file translation from form .mif to form .dat. When the translation is properly realised, then the file with extension .dat is open and the function of writing into file .dat is executed for all information, necessary to create presentation. Data for the file .dat are not written in the text way, as in files .mif, but in binary way. After satisfactory realising of all three parts of program mif2dat and creating proper for the former display files .dat it is possible to go into the last script (co2.exe). This script, on the base of information included in files .dat and added to it library MACROMEDIA FLASH generates reflections of given files .dat. On the base of this information is generated film clip FLASH, where on its particular layers the proper reflections of files .dat are included. Very important and ticklish matter in script co2.exe is calculation of socalled KOD, which is directly connected with algorithm of Cohen-Sutherland. It is used to designate objects, which have not enough room to be wholly located within actually browsed window of zooming in of the given map, and more precisely to mark objects, which not ever point is located within the range of actual window of zooming in. To be sure, the library Macromedia Flash has algorithms cutting objects to the range of actual window, but they are not sufficiently good, because it happens, that at zooming in and next zooming out of mere Flash, these objects go beyond the area provided to map drawing. Then, we use algorithm by CohenSutherland to calculate, from which side points being beyond the range of window of zooming in are located. 170 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Applying of Flash Technology in GIS This is the end of programming connected with dynamic creating of Flash film clips. But there is still problem of proper organising of graphic interface, which should be perspicuous and intuitive in usage. Conclusions This paper is an important link connecting local systems of spatial information with wide group of Internet receivers, who are interested in geodata applying. Thanks to Flash technology it is possible to present geodata in simple and clear way for every user. Bibliography 1. Star J., Estes J.: Geographic Information Systems: An Introduction. Prentice Hall, 1990. 2. Handling Geographic Information: The Chorley Report. Department of the Environment (UK). London 1987. 3. Clarke K.: Analytical and Computer Cartography. Prentice Hall, 1990. 4. Cowen D.J. The National Center for Geographic Information and Analysis. 5. Cowen D.J. GIS versus CAD versus DBMS: what are the differences? "Photogrametric Engineering and Remote Sensing" 1988 nr 11 6. Miksa K.: SIG a SIT. Materiały na V Konferencję Naukowo-Techniczną PTIP. Warszawa, 9-10 listopada 1995 7. Piotrowski R.: System Informacji o Terenie - Program Modernizacji. Warszawa 1991. 8. Tomlinson R.F.: Geographic Information Systems - A New Frontier. "The Operational Geographer" 1984 nr 5. 9. Michalak J.: OGIS - Integracja systemów informacji geoprzestrzennej w geologii. INFOBAZY '97. 10. Pavlidis Theo: Grafika i przetwarzanie obrazu. Algorytmy. WN-T . Warszawa 1987. 171 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak University of Silesia in Katowice, Faculty of Engineering, Poland Applying of Flash Technology in GIS S u m m a r y It seems that in GIS high quality of graphic map presentation is of essential importance. The lack of it is often noticed in internet graphic applications, because the majority of maps here presented is made in raster form, what makes zooming in of high quality impossible and zooming out can cause the lost of information on the given map. This paper is a proposition to use flash technology in Internet applications to present maps. It allows presenting maps of high quality of graphics devoid of above-mentioned faults. This technique applying gives also the possibility to import maps made in typical GIS tools, as MapInfo etc. Internet GIS application presented in this paper allows creating the content of looked map in a dynamical way in dependence of needs and with co-operation of person, who looks over it. This system allows remote control of processing of data collected of GIS, creating Internet program GIS. This new quality – interactive map can be also used in applications developing knowledge of the environment and distance learning systems, which for geographical programs in the majority of cases require presentation of thematic layers. Keywords: spatial information systems, Internet, FLASH technology, interactive map Ireneusz Gościniak, Łukasz Łagosz, Jolanta Pełka-Gościniak Uniwersytet Śląski w Katowicach, Wydział Techniki, Polska Zastosowanie Technologii Flash w GIS S t r e s z c z e n i e W systemach GIS bardzo istotna wydaje się być wysoka jakość prezentacji graficznych map, a jej brak często odczuwany jest w internetowych aplikacjach graficznych, gdyż większość prezentowanych tam map jest przedstawiona w postaci rastrowej, co uniemożliwia wykonanie powiększeń o dobrej jakości a pomniejszenia mogą powodować utratę informacji na prezentowanej mapie. W artykule zaproponowano wykorzystanie technologii Flash w aplikacjach internetowych do prezentacji map o wysokiej jakości grafiki, pozbawionych wyżej wspomnianych wad. Zastosowanie tej technologii daje również możliwość importu map opracowanych w typowych narzędziach GIS, takich, jak: MapInfo itp. Internetowa aplikacja GIS, prezentowana w niniejszym artykule, daje możliwość 172 Gościniak I., Łagosz Ł., Pełka-Gościniak J. (2003). Applying of Flash Technology in GIS. In: M. Gajos, U. Myga-Piątek (ed.). Geographical Information Systems. Interdisciplinary Aspects. University of Silesia, Croatian Information Technology Association – GIS Forum, SILGIS Association, Sosnowiec, Zagreb, 165-173. Applying of Flash Technology in GIS dynamicznego tworzenia treści przeglądanej mapy w zależności od potrzeb oraz przy współudziale osoby ją przeglądającej. Taki system pozwala na zdalne kierowanie przetwarzaniem zgromadzonych danych systemu GIS, tworząc internetowy program GIS. Ta nowa jakość – mapa interaktywna – może być również stosowana w aplikacjach rozwijających wiedzę o środowisku i systemach distance learning, które dla programów geograficznych w większości przypadków wymagają prezentacji map tematycznych. Słowa kluczowe: systemy informacji przestrzennej, Internet, technologia FLASH, mapa interaktywna 173