Sep 19, 2007

Design a service oriented customizable framework to manipulate GIS data.

Introduction

Geographical Information Systems are found in all over the world. The services provided by each of these systems may vary according to the purpose of service providers and as well as service consumers. In most of these services there should be an underlying mechanism of manipulating geographic data and presenting the processed information over those data to outside world.

There are numerous kinds of frame works and services designed by various interested groups around the world to support geospatial data. Most of them are provided by proprietary organizations. Further, these proprietary frameworks are expensive, have various limitations are capable in utilizing only the products belong to corresponding organization.

On the other hand even there are frameworks designed by open source communities, dealing with those software is quite hard. Hence users have to get over a lot of difficulties when customizing existing functions to be suited to their needs.

Therefore, it is clear that there is a need of a customizable framework which can be used with both proprietary and open source GIS products to manipulate GIS data and exposing those facilities by mean of a web service.


Objective

In this project it is intended to design a customizable frame work, where the capabilities of certain GIS tools and utilities are wrapped into functions and procedures and then make available through a web service. Hence the opportunity of utilizing these functions is offered to users via web instead of working with a stand alone application. User will be able to sort out the most appropriate services out of the available services and customize his/her applications in an easier manner.

In addition to above, service could be further extended as business service. By making the framework service oriented the available facilities could be combined to make large number of business applications and on the top of available services by searching a directory service in which users could deploy and publish there own GIS business services.


Scope

As the initial step the application framework will be designed to wrap tools and utilities provided with UMN Map Server package such as gdal-ogr, mapserver, shapelib etc. Then it is being integrated with the application web service.

The architecture of the business service is concerned in the second phase. The directory service will be implemented as a facilitating sub module of it.

A diagram of the proposed architecture of the project is given below.


















References

[1] GIS Service Oriented Architecture, http://complexity.ucs.indiana.edu/~asayar/gisgrids/docs/gis-soa.pdf

[2] ESRI, Geospatial Service-Oriented Architecture, June 2007 www.esri.com/library/whitepapers/pdfs/geospatial-soa.pdf
[3]
Zhong-Ren Peng, Services-Oriented Architecture in Internet GIS http://www.gisdevelopment.net/magazine/years/2005/oct/webgis1.htm

Sep 11, 2007

New Era....

Here again!
Now I've found a new path. ie GIS....
Gonna make a framework for Service Oriented GIS Architecture.

Sep 3, 2007

Get in to the track!

Oops after a long time....

living the wonderful uni life agian. WHAT a feeling!!!!

Jun 11, 2007

Creating Java executables from jar files.

In order to create Java exe files from jar files, there is an ideal tool called 'exe4j' . This is actually working tool. Through this tool it could be done; setting exe icon, setting JVM parameters, setting splash screen etc..

Mar 28, 2007

To increase JVM memory

Type following in the command line while running the application:

java -Xmx512m


*Note - here i have set 512MB as memory capacity. It could take other values like 256, 1024 etc. Further we can set the minimum size by following command.

java -Xmsm

Mar 22, 2007

Code snipet for downloading image file from a ftp server and display that image localy.

/*
* Author Akila Nonis
* /


setImgUrlValues();

//Setting corresponding values to be appended to URL
//URL url = new URL("ftp://"+user+":"+password+"@"+server+file+".jpg;type=i");

//Setting URL
URL url = new URL("ftp://"+imgUserName+":"+imgPassword+"@"+imgUrl+imgName+";type=i");

//Setting URL connection
URLConnection con = url.openConnection();

//Reading image file data from and generating a local copy

BufferedInputStream in = new BufferedInputStream(con.getInputStream());

FileOutputStream out = new FileOutputStream("C:\\Sign\\"+imgName);

int i = 0;
byte[] bytesIn = new byte[1024];

while ((i = in.read(bytesIn)) >= 0)
{
out.write(bytesIn, 0, i);
}

out.close();
in.close();

//-------------------------------------------------------------

//File remoteFile = new File(url.toString());
//if (remoteFile.exists())
// System.out.println("Remote file size = " + remoteFile.length() +" " + url.toURI());

//-------------------------------------------------------------

System.out.println("Local file size = " + localFile.length());

System.out.println("this is Image Name " + imgName);

//Setting the downloaded local image copy as the icon image
lblSignature.setIcon(new ImageIcon("C:\\Sign\\"+imgName));

Code for spalsh screen of a java application

/* ---------- Splasher.java -------------*/

import javax.swing.ImageIcon;

/*
* Author : Akila Nonis
* Desc : This thread displayes the splash screen and progress bar
* Date : 13.02.2007
*/

public class Splasher extends Thread{

public void run(){

//Image for splash is set here
String iconPath = "/images/Splash.gif";
ImageIcon splashImage = new ImageIcon(iconPath);

//SplashScreen scr = new SplashScreen(splashImage);
SplashScreen scr = new SplashScreen(new ImageIcon(getClass().getResource("/images/Splash.gif")));
scr.setLocationRelativeTo(null);
scr.setProgressMax(100);
scr.setScreenVisible(true);

//Initailizing main MDI form
MainMDI mmdi = new MainMDI();

//Delaying
for (int i = 0; i <= 100; i++)
{
for (long j=0; j<100000; ++j)
{
String poop = " " + (j + i);
}

scr.setProgress("Loading.. " + i, i);
}

scr.setScreenVisible(false);

//Displaying main MDI form
mmdi.setVisible(true);

scr = null;

//Removing unusable objects form memory
System.gc();

}
}

/* ---------- End of Splasher.java -------------*/




/* ---------- SplashScreen.java -------------*/

import java.awt.BorderLayout;
import javax.swing.*;
import java.awt.*;

/*
* Author : Akila Nonis
* Desc : This class constructs the spalsh image
* Date : 13.02.2007
*/

public class SplashScreen extends JWindow {

BorderLayout borderLayout1 = new BorderLayout();
JLabel imageLabel = new JLabel();
JPanel southPanel = new JPanel();
FlowLayout southPanelFlowLayout = new FlowLayout();
JProgressBar progressBar = new JProgressBar();
ImageIcon imageIcon;

public SplashScreen(ImageIcon imageIcon) {

this.imageIcon = imageIcon;

try {
init();
}
catch(Exception ex) {
System.out.println(ex.toString());
}
}


/*
* Initializes splash screen
*/
void init() throws Exception {

imageLabel.setIcon(imageIcon);
imageLabel.setSize(new java.awt.Dimension(365,206));

this.getContentPane().setLayout(borderLayout1);

southPanel.setLayout(southPanelFlowLayout);
southPanel.setBackground(Color.BLACK);

this.getContentPane().add(imageLabel, BorderLayout.CENTER);
this.getContentPane().add(southPanel, BorderLayout.SOUTH);
southPanel.add(progressBar, null);
this.pack();

}

/*
* Sets maximum limit of the progres bar
*/
public void setProgressMax(int maxProgress)
{
progressBar.setMaximum(maxProgress);
}


/*
* Sets and updates values of the progress bar
*/
public void setProgress(int progress)
{
final int theProgress = progress;

SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressBar.setValue(theProgress);
}
});

}


/*
* Sets and updates values of the progress bar
*/
public void setProgress(String message, int progress)
{
final int theProgress = progress;
final String theMessage = message;
setProgress(progress);
SwingUtilities.invokeLater(new Runnable() {
public void run() {
progressBar.setValue(theProgress);
setMessage(theMessage);
}
});
}


/*
* Makes splash screen visible
*/
public void setScreenVisible(boolean b)
{
final boolean boo = b;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
setVisible(boo);
}
});
}

/*
* Sets string messsage in the progress bar
*/
private void setMessage(String message)
{
if (message==null)
{
message = "";
progressBar.setStringPainted(false);
}
else
{
progressBar.setStringPainted(true);
}
progressBar.setString(message);

}

/* ---------- End of SplashScreen.java -------------*/

Have a nice day!

Thanks for visiting my blog :)