Wednesday, October 7, 2009

Build a Web GIS 1

GIS Technology (Georaphic Information System) has been growing rapidly. We have already known the terms Desktop GIS, WebGIS, and Spatial Database which is a form of development of Geographic Information System technology, to accommodate the needs of the solution to many problems which can only be answered by this GIS technology.

While there are several technologies that can be used to build WebGIS system. One of the most popular is the MapServer, which uses the concept of Open Source. As for Spatial Database technology choice, PostgreSQL is an open source database option is the most popular, with the support of spatial extension called PostGIS.

However, an understanding of how to develop WebGIS with Mapserver and PostGIS not much understood by the developers of information technology. Therefore, this time we will try to do research on how to develop a simple WebGIS applications with MapServer - PostGIS, what result will we publish on the Internet. With hopes tutorials and sample applications that we develop WebGIS will be useful as a fellow for information technology developers can more easily control how to build systems with MapServer WebGIS - PostGIS.

MS4W (MapServer for Windows) is the MapServer installation bundle for the Windows platform. Where MapServer (http://mapserver.gis.umn.edu) is a freeware applications and open source to be able to show Geographic Information System on the web.

MS4W equipped with a variety of additional modules (optional) which makes our administrated build and WebGIS system. Among others: MapLab, KaMap, Chameleon, and others. Used to facilitate MapLab we create MapServer configuration files (*. map) on WebGIS applications we develop. Medium Chameleon is a framework that provides a variety of classes and methods which enable us to build interfaces WebGIS applications we develop, such as adding features zoom, pan, etc.. Information about MS4W, MapLab and Chameleon can be found on the site www.maptools.org

Currently, in addition to access MapServer as a CGI program, we can access the MapScript MapServer as a module, through a variety of programming languages, like PHP, Perl, Python, Java and so forth. Access MapServer functions via scripts will make it easier WebGIS application development.

PostgreSQL is Open Source database that is quite popular, because the toughness and ability to manage the data. PostgreSQL has a PostGIS extension, which offers the ability to manage spatial data for Geographic Information System applications. Information about PostgreSQL can be found on the site www.postgresql.org. Was information to be obtained from PostGIS http://postgis.refraction.net site.

MS4W INSTALLATION, AND MAPLAB Chameleon

MS4W
MS4W can be downloaded at www.maptools.org. In it are united Apache Web server applications, PHP, Map Server and the various libraries required to build a WebGIS system. There are two versions can be downloaded MS4W, version 1.x and 2.x versions. However if we want to use the Chameleon framework, better select MS4W version 1.x (which is used today is version 1.6) because the Chameleon has not supported perfectly MS4W package PHP5 on 2.x versions.
After you successfully download ms4w_1.6.zip, then extract the contents into the root of the disk partition (eg C: / or D: /), so that the entire contents of the package MS4W located at C: / ms4w or D: / ms4w. Then execute apache-install.bat to install the Apache service. If the service is running, it will show httpd.exe process in Windows Task Manager window. Check by opening http://localhost in your web browser. If the front page MS4W appear, then your installation successfully.

PHP MapScript
To activate the PHP module / Mapscript, we must make some changes in php.ini konfiurasi located in D: \ ms4w \ Apache \ cgi-bin \ php.ini. remove the character ";" on "; php_mapscript_4.10.0.dll extension =". Then restart Apache by executing the apache-restart.bat.

To check the installation Mapscript, create a file folder msinfo.php D: \ ms4w \ Apache \ htdocs which contains: "", Then open a web browser http://localhost/msinfo.php . When the report came from mapserver version, then MapScript has gone well.

MapLab and Chameleon
Download package for MapLab and Chameleon www.maptools.org MS4W on the website. Then put the contents of chameleon_ms4w-2.4.1-20060906.zip and maplab_ms4w-2.2.1.zip on http.d directory, apps, and apache / htdocs on your ms4w director. Restart Apache, and consider whether to have seen the link http://localhost url MapLab Chameleon 2.2.1 and 2.4. If true, then install Chameleon on MapLab and MS4W successfully. Maplab so could work out perfectly, required JRE (Java Runtime Environment) installed on your computer.

to be continued to build a Web GIS 2

Read More..

Sunday, September 27, 2009

Java Language Programming..

Java is a proprietary language developed by Sun Microsystems. Originally intended as a programming language suitable for supporting an environment of networked machines and embedded systems. Java did not really fulfill its potential until the internet and the web started to become popular. Now, Java is rapidly becoming the de facto standard programming language for Web computing.

The importance of the Java language and its related technologies has been increasing for the last few years. Java is a type-safe, object oriented programming language that is interesting because of its potential for building Web applications (applets) and server applications (servlets) (Gosling et al.,2000). with the widespread interest in Java, its similarity to 'C' and 'C++', and its industrial support, many organizations are making Java their preferred language. Java is 'a simple, object-oriented, distributed, interpreted, robust, secure, architecture neutral, portable, high-performance, multi-threaded and dynamic language' (Sun 1997).


Java Architecture
Java
is particularly interesting because of its machine-independent target architecture, the Java Virtual Machine (JVM) (Arnold et al.,2000). for this reason, Java is often quoted as a 'write once run anywhere' language. The Java environment is shown in figure :


The Java compiler takes a '.java' file and generates a '.class' file, which contains bytecode instructions that are independent of any particular computer architecture. These bytecodes are both easy to interpret on any platform and are easily translated into native methods. The JVM can interpret and execute Java bytecodes directly on any platform to which an interpreter and runtime system have been ported. Since almost every Web browser vendor has already licensed Java and implemented an embedded JVM. Java applications can currently be deployed on most end-user platforms.

Before a Java application can be executed, it must first be loaded into memory. This is done by the class loader, which takes the '.class' files containing the bytecodes and transfers it into memory. The class file can be loaded from the local hard drive or it can be downloaded from a network. Finally, the bytecodes must be verified to ensure that they are valid and that they do not violate Java's security restrictions.

Loosely speaking Java is a 'safe' C++. Its safety features include strong static type checking, the use of implicit storage management through automatic garbage collection to manage deallocation of dynamically allocated storage, and the absence of machine pointers at the language level. These features combine to make Java free of the types of pointer misuse that are the cause of many errors in C/C++ programs. These Safety transmit Java code across the internet. Security is also an integral part of Java's design. It has been described using the metaphor of the Sandbox. The Sandbox ensures that an untrusted. Possibly malicious, application cannot gain access to system resources.

Read More..

Friday, February 20, 2009

VBScript

VBScript is a Microsoft proprietary interpreted scripting language whose goals and operation are virtually identical to those of JavaScript/JScript. VBScript, however, has syntax more like Visual Basic than Java. It is interpreted directly from source code and permits scripting within an HTML document. As with JavaScript/JScript, VBScript can be executed within the browser or at the server before the document is sent to the browser.

VBScript is procedural languages and so uses subroutines as the basic unit. VBScript grew out of Visual Basic, a programming languages that has been around for several years. Visual Basic is the basic for scripting languages in the Microsoft Office packages (Word, Access, Excel, and PowerPoint). Visual Basic is component based: a Visual Basic program is built by placing components on to a form and then using the Visual Basic Language to link them together. Visual Basic also gave rise to grandfather of the ActiveX control, the Visual Basic Control (VBX).

VBX shared a common interface that allowed them to be placed on a Visual Basic form. This was one of the first widespread uses of component based software. VBXs gave way to OLE Controls (OCXs), which were renamed ActiveX. When Microsoft took an interest in the Internet, they moved OCX to ActiveX and modeled VBScript after Visual Basic. The main different between Visual Basic and VBScript is that to promote security, VBScript has no functions that interact with files on the user’s machine.

Read More..

JavaScript and JScript

JavaScript and JScript are virtually identical interpreted scripting languages from Netscape and Microsoft. Microsoft’s JScript is a clone of the earlier and widely used JavaScript. Both languages are interpreted directly from the source code and permit scripting within an HTML document. The scripts may be executed within the browser or at the server before the document is sent to the browser. The constructs are the same, except the server side has additional functionally.

JavaScript is an object-based scripting language that has its roots in a joint development program between Netscape and Sun, and has become Netscape’s Web scripting language. It is a very simple programming language that allows HTML pages to include functions and scripts that can recognize and respond to user events such as mouse clicks, user input, and page navigation. These script can help implement complex web page behavior with relatively small amount of programming effort.

The JavaScript language resembles Java, but without Java’s static typing and strong type checking. In contrast to Java’s compile-time system of classes built by declarations. JavaScript supports a runtime system based on a small number of data types representing numeric, Boolean, and String values. JavaScript complements Java by exposing useful properties or Java Applets to script developers. JavaScript statements can get and set exposed properties to query the state or alter the performance of an applet or plug-in.

Comparison of JavaScript and Java applets
Java Script
  • Interpreted (not compiled) by client
  • Object-based, Code uses built-in extensible objects, but no classes or inheritance
  • Code integrated with and embedded in HTML
  • Variable data types not declared (loose typing)
  • Dynamic binding, Object references checked at runtime
  • Cannot automatically write to hard disk
Java (applets)
  • Complied on server before execution on client
  • Object-oriented. Applets consist of object classes with inheritance
  • Applets distinct from HTML (accessed from HTML pages)
  • Variable data types must be declared (strong typing)
  • Static binding. Object references must exist at compile-time
  • Cannot automatically write to hard disk

Read More..
 
Template by Administrator Frelia | Anak SD | Blogger