Methodology
Development of effective geo-visualisation based decision support system (DSS) involved primarily data compilation from collateral sources, setting up appropriate hardware configuration, design of database and design of a spatial DSS.
1. Data collection:
Data collected from various government sources includes:
-
Resource maps of panchayat, both in the form of hard copy and digital copy.
-
Panchayat Asset Register – (Details of roads, lanes, culverts, bridges and other constructions.)
-
Local Self Government Institutions Election - Ward de-limitation documents.
-
Census of India - District Census Hand book.
-
Watershed Atlas – State Land Use Board.
-
Watershed based development master plan – Block Panchayat.
-
Panchayat citizens’ charter.
Data is collected primarily from office of the Cheruvannur Grama Panchayat itself. Features like roads, landuse, water resource polygons, water resource lines, place names, etc were extracted from resource maps. Survey of India toposheets 1:250000 (49M) was used to digitise taluk boundaries. With the help of this map, a taluk map with village boundaries was georegistered. Toposheet of 1:25000 (49M/10 SE) was used for extracting contour lines for creating DEM and shaded relief.
2. Setting up / upgradation of Hardware:
This was implemented in GNU/Linux with essential softwares like GIS, web server, geo-visualisation, etc. In order to suite these software certain changes in hardware was done by upgrading existing PC with DVD R/W, 256 MB RAM to 1 GB RAM and 15” monitor to 17” monitor and an additional hard disk.
3. Setting up the software environment:
3.1. Installation of operating system:
The installation of the Debian GNU/Linux is a straight forward way. The CD image of Debian GNU/Linux Etch obtained from Swathantra Malayalam Computing - a patched release with Unicode Malayalam support and a graphical installer. The set of official Debian Etch binary DVDs (3 nos.) obtained from Indian Linux Users Group, Cochin chapter.
Made the DVD R/W drive into primary boot device in system BIOS settings, inserted Debian GNU/Linux CD into it and restarted the system. In the next consecutive screens appeared, selected installation language as English, location as India, System language as English, Keyboard layout as English. After the initial self checking of system, installer CD etc, the installer loaded the additional components. In the next screen, the host name selected ‘localhost’.
In “Partition disks” screen, selected partitioning method as manual, and selected the hard disk. Then created the partitions, and selected the “finish partition” option, and written changes to disk, disk is formatted by installer. In the next steps, selected appropriate root password, created a user, and given user password. Base system is installed by installer. In the next screen, installer asked whether to use a network mirror for packages, selected no. Installer asked for CD or DVD media to install the packages, put them one by one. Next, chosen the packages to install, namely Desktop environment, Web server, SQL database, Standard system etc. Installer installed the required software environment on the system. Next asked for media change depending upon the packages selected to install, just followed the on screen instructions. Installer asked weather to install GRUB boot loader to master boot record, selected yes. After the installation of GRUB, the system rebooted to the installed Debian GNU/Linux, ejecting out the installation media from DVD drive.
3.2. Post install configuration of operating system:
3.2(a). Adding addresses of essential software locations to the system’s source list:
Address of a mirror site nearby is added to list of software sources, for the easy updation of the operating system, and installation of software packages. For this, the file /etc/apt/sources.list is edited.
3.2(b). Network and internet configuration:
Internet connection is a must, to upgrade the system as and when updates are released, to download the required software tools and to be in communication with mailing lists and free software users community. Configured the network and internet settings by editing the configuration file /etc/network/interfaces, and restarting the network daemon by issuing the following command in terminal:
# /etc/init.d/networking restart
Edited the file /etc/hosts and issued the following command in terminal:
# echo localhost.ces.iisc.ernet.in > /etc/hostname
Added name server address to file /etc/network/resolv.conf
Restarted the system. After restart, issued the following commands in terminal as follows:
$ hostname
localhost.ces.iisc.ernet.in
$ hostname -f
localhost.ces.iisc.ernet.in
Both commands returned the host name. Network configuration is complete.
3.2(c). Set-up for Unicode Malayalam support:
Malayalam is the mother tongue and administrative language of the people of the study area. In order to enter and handle data in Malayalam, Unicode Malayalam support is necessary. At present, Standard GNU/Linux systems are heavily patched to achieve Unicode Malayalam support after installation. Software patches are available in repositories of Swathantra Malayalam Computing. Swathantra Malayalam Computing or SMC is a group of volunteers working for developing Malayalam interfaces for free software as those can be used also by the people who know only Malayalam language. As this development is going on upstream, these patches would become integral part of the upcoming versions of standard free operating systems. Followed the instructions given in the website of SMC and applied the commands as follows to get these patches applied in system. These commands will update the system with patches, and if latest updates of other softwares installed are available, upgrade them:
# wget http://download.savannah.gnu.org/releases/smc/praveen.key.asc # apt-key add praveen.key.asc # apt-get update # apt-get upgrade # apt-get install scim-ml-phonetic
Purpose of adding Praveen’s (One among the project administrators of SMC.) GPG public key to the key-ring of apt, is to ensure the authenticity of package, and to confirm that nobody has changed the packages in repository after he did.
3.2(d). OpenSSH:
For the security of passwords through internet, SSH and OpenSSH is installed by issuing the following command in terminal:
localhost:/home/user# apt-get install ssh openssh-server
3.3. Installation and configuration of essential softwares for the proposed work:
Installation of software which are part of Debian Etch are done with the command:
# apt-get install <package_1 package_2 package_n>
Among the software packages used, GRASS 6.2.3, Malayalam Patches, Quantum GIS 0.9.0, and ka-Map 1.0 are not part of Debian Etch system, and these need a separate installation and configuration.
3.3(a). Apache web server and php:
A working web server and php, are necessarily installed on system. Apache is used as web server. php is a server-side, HTML-embedded scripting language, designed for producing dynamic web pages. Apache and php are installed by issuing the following commands:
# apt-get install apache2 apache2.2-common
# apt-get install php5 php5-common libapache2-mod-php5 php5-pgsql
# apt-get install php-db
# /etc/init.d/apache2 restart
3.3(b). Installation of PostgreSQL and PostGIS:
PostgreSQL is an open source, fully featured object-relational database management system which can be used for storing attribute data. PostGIS adds support for geographic objects to the PostgreSQL object-relational database. Installation is done via following commands:
# apt-get install postgresql-8.1 postgresql-client-8.1
# apt-get install postgis postgresql-8.1-postgis odbc-postgresql
Checked whether PostgreSQL is running or not, by issuing:
# /etc/init.d/postgresql-8.1 restart
Configured PostgreSQL as it can be used for the user user, via issuing following commands:
# su
# su postgres
# psql template1
# template1=# \q
# exit
# su postgres
# psql
# CREATE ROLE “user” WITH LOGIN SUPERUSER;
# ALTER ROLE “user” WITH PASSWORD ‘********’;
# \q
# exit
It is needed to ensure whether the client encoding is Unicode, as Unicode (UTF8) support is needed to handle data in traditional Malayalam scripts. For checking this, issued:
$ psql
# SHOW client_encoding;
client_encoding
—————–
UTF8
(1 row)
# \q
3.3(c). Installation and configuration of GRASS 6.2.3:
GRASS is a free software, and the leading GIS tool in the world of free softwares. GRASS is the abbreviation of the “Geographic Resources Analysis and Support System”. The source code of GRASS GIS package is downloaded from its website, extracted compiled and installed on system, by issuing following commands:
$ tar -zxvf grass-6.2.3.tar.gz
$ cd grass-6.2.3
$ ./configure \
–with-tcltk-includes=/usr/include/tcl8.4/ \
–with-postgres-includes=/usr/include/postgresql/ \
–with-postgres-libs=/usr/lib/postgresql/8.1/lib/ \
–with-blas \
–with-lapack \
–with-motif \
–with-glw \
–with-nls \
–with-readline \
–with-odbc
$ make
$ su
# make install
After installation, issued the following commands to create GRASS database:
$ mkdir data
$ mkdir data/GRASSDATA
GRASS is started in terminal by issuing:
$ grass62
An icon is made for GRASS on Desktop, for easy access.
3.3(d). Installation of Quantum GIS 0.9.0:
Downloaded the .deb packages for Etch from Quantum GIS website and installed via GDebi package installer by right click and select Open with “GDdebi package installer”.
An icon is made also for Quantum GIS on Desktop, for easy access.
3.3(e). Installation of MapServer:
UMN MapServer is used for setting up geo-visualisation. MapServer is an open source development environment for building spatially-enabled internet applications. MapServer, and associated packages like php-MapScript (A dynamically loadable module that makes MapServer’s MapScript functions and classes available in a PHP environment.), php-gd (GD module for php) etc are installed by issuing command:
# apt-get install mapserver-bin cgi-mapserver php5-mapscript php5-gd
4. Scanning and photographing maps:
-
S.O.I Toposheets: The Survey of India toposheets 49M (1:250,000 scale) and 49M/10/SE (1:25,000 scale) were scanned with a flat-bed scanner with a resolution of 200×200 pixels, part by part.
-
Taluk map: The taluk map with village boundaries is obtained from the District Census Handbook of Kozhikode, received from the Directorate of census operations, Thiruvananthapuram, was scanned with flat-bed scanner (Resolution: 200×200 pixels).
-
Resource maps: The resource map of grama panchayat was already converted to digital form in JPEG format, and received a copy from grama panchayat. As it lacked many of the details in the original, the original resource maps (10 sheets) were photographed and used for comparing while extracting features.
5. Georeferencing maps:
For georeferencing the maps and feature extraction, following method is adopted:
Georeferenced the SOI toposheet 49M/10 (1:250,000) in which taluk boundaries are given, along with the SOI toposheet 49M/10/SE (1:25,000) with 1st order transformation.
The taluk map with village boundaries is georeferenced with 1st order transformation, by the help of coordinate points from georeferenced 49M/10 1:250,000 toposheet. Boundary coordinates and village boundary (it is the boundary of grama panchayat also) were extracted from taluk map.
Toposheets are projected maps on to Everest-1956 reference datum with polyconic projection. The grama panchayat resource map, already in digital format was made based on the village cadastral maps. Cadastral maps contain only direct field survey measurements and not projected on to any reference datum. In order to fit this resource map on a projected toposheet when overlaying, 3rd order transformation (either called as rubber sheeting) is adopted when georefencing. The problem of modifying boundary corners to fit existing ground features is solved by using a unique rubber sheeting procedure that takes into account linear features (Felus, Yaron A., 2007).
Resource map is georeferenced with the help of boundary coordinates extracted from taluk map, and with the coordinate points from georeferenced 49M/10/SE 1:25,000 toposheet, adopting 3rd order transformation with 33 GCPs uniformly spread in panchayat area selected from among 43 known control points.
-
The features were extracted from georeferenced resource map, by extensively comparing with the digitised original resource map sheets. Contour lines were extracted from 49M/10/SE 1:25,000 toposheet.
Georeferencing is done with GRASS via following steps:
Figure 7.1: Georeferencing in GRASS - steps.
(Source: GDF Hannover bR)
-
Created an x,y location tempxy and mapset user in GRASS database with default grid resolution settings, following on-screen directions of GRASS.
-
Changed into the GRASS x,y location, and converted scanned tif images of maps to GRASS format by issuing commands as follows:
GRASS 6.2.3 (tempxy):~ > r.in.gdal in=49m.tif out=49m
GRASS 6.2.3 (tempxy):~ > r.in.gdal in=49m10se.tif out=49m10se
GRASS 6.2.3 (tempxy):~ > r.in.gdal in=taluk.tif out=taluk
GRASS 6.2.3 (tempxy):~ > r.in.gdal in=resource.jpeg out=resource
-
After exiting from x,y location, restarted GRASS and created a Lat-Long location with settings as follows:
Location: cheruvannur
Mapset: user
Ellipsoid: everest 1956
Projection: Latitude-Longitude
north: 11:45 N
south: 11:30 N
east: 75:30 E
west: 76:00 E
east-west resolution : 0:00:01
north-south resolution : 0:00:01
Then exited from the Lat-long location.
-
Georeferenced the toposheets in GRASS by the use of following sets of commands:
i.group - To collect raster map layers in an imagery group.
i.target - To target the imagery group to GRASS lat-long location and mapset.
i.points - To mark the ground control points on image to be rectified.
and
i.rectify - To rectifiy the image by computing coordinate transformation for each pixel in the image based on the control points.
Started GRASS again with x,y location tempxy and mapset user, and issued following commands:
-
i.group:
GRASS 6.2.3 (tempxy):~ > i.group group=49m subgroup=49m \
input=49m.red,49m.blue,49m.green
GRASS 6.2.3 (tempxy):~ > i.group group=49m10se subgroup=49m10se \
input=49m10se.red,49m10se.blue,49m10se.green
GRASS 6.2.3 (tempxy):~ > i.group group=taluk subgroup=taluk \
input=taluk.red,taluk.blue,taluk.green
GRASS 6.2.3 (tempxy):~ > i.group group=resource subgroup=resource \
input=resource.red,resource.blue,resource.green
-
i.target:
GRASS 6.2.3 (tempxy):~ > i.target group=49m \
location=cheruvannur mapset=user
GRASS 6.2.3 (tempxy):~ > i.target group=49m10se \
location=cheruvannur mapset=user
GRASS 6.2.3 (tempxy):~ > i.target group=taluk \
location=cheruvannur mapset=user
GRASS 6.2.3 (tempxy):~ > i.target group=resource \
location=cheruvannur mapset=user
-
i.points:
To initialise a GRASS monitor, issued:
GRASS 6.2.3 (tempxy):~ > d.mon start=x0
Selected the 49M toposheet, and added ground control points by issuing:
GRASS 6.2.3 (tempxy):~ > i.points 49m
In the GRASS monitor, selected the raster file to be plotted, zoomed to centre pixel of lat-long cross hairs and placed control points. After this analysed for root mean square error, as it to be within zero. After adding 4 GCPs correctly, quit the screen. Repeated this process for the 49M/10/SE also, with following command:
GRASS 6.2.3 (tempxy):~ > i.points 49m10se
After adding GCPs to toposheet raster images, rectified the toposheets with following commands:
-
i.rectify:
GRASS 6.2.3 (tempxy):~ > i.rectify group=49m \
input=49m.blue,49m.green,49m.red \
extension=.rectified order=1
GRASS 6.2.3 (tempxy):~ > i.rectify group=49m10se \
input=49m10se.blue,49m10se.green,49m10se.red \
extension=.rectified order=1
Georectification of toposheets is complete. Exited from GRASS.
Selection of ground control points to georeference the taluk map:
Restarted GRASS with Latitude - Longitude location cheruvannur and mapset user. Adjusted the region and resolution with following command:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=49m.blue.rectified
Selected and loaded the 49m.blue.rectified raster image from menu and comparing with the image taluk.tif, 10 GCPs are selected along the taluk boundary, noted down their coordinates, and exit from GRASS.
Restarted GRASS with x, y location tempxy and mapset user and issued:
GRASS 6.2.3 (tempxy):~ > d.mon start=x0
Selected the taluk map, and added ground control points by issuing:
GRASS 6.2.3 (tempxy):~ > i.points taluk
Added points via same as the process described in case of toposheet 49M, and analysed for root mean square error, and ensured it to be within zero. After adding 10 known GCPs, quit the screen. Rectified the taluk map with following command:
GRASS 6.2.3 (tempxy):~ > i.rectify group=taluk \
input=taluk.blue,taluk.green,taluk.red \
extension=.rectified order=1
Georectification of taluk map is complete. Exited from GRASS.
Restarted GRASS with Latitude - Longitude location cheruvannur and mapset user. Adjusted the region and resolution with following command:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=taluk.blue.rectified
Selected and loaded the taluk.blue.rectified raster image in map display from menu and, four GCPs which lie extreme north, east, south and west ends of village (grama panchayat) along the boundary line were selected. Noted down their coordinates. Followed by issuing command:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=49m10se.blue.rectified
Selected and loaded the 49m10se.blue.rectified raster image in map display from menu, maximum number of GCPs could identify (43 nos) were selected and noted down their coordinates, comparing with the image resource.jpeg, and photographed original resource map sheets in an image viewer. Then exited from GRASS.
Restarted GRASS with x, y location tempxy and mapset user, and issued:
GRASS 6.2.3 (tempxy):~ > d.mon start=x0
Selected the resource map map, and added ground control points by issuing:
GRASS 6.2.3 (tempxy):~ > i.points resource
Added all the selected 43 points via same as the process described in case of toposheet 49M. Analysed for root mean square error, and removed 10 points among them, those gave more error, as to ensure the error to be minimum and points are spread uniformly over the area. After this, quit the screen. Rectified the resource map map with 3rd order transformation via following command:
GRASS 6.2.3 (tempxy):~ > i.rectify group=resource \
input=resource.blue,resource.green,resource.red \ extension=.rectified order=3
Georectification of resource map is complete. Exited from GRASS.
6. Digitisation of vector layers:
For digitising vector layers, following method is adopted:
-
Extracting boundary lines of Cheruvannur village from georeferenced maps:
Restarted GRASS with Latitude - Longitude location cheruvannur and mapset user. Adjusted the region and resolution with following command:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=taluk.blue.rectified
From GRASS GUI menu, selected item:
Vector > Develop map >Digitize
and, from the appearing v.digit window, name for vector layer is given as villageboundaries. The raster image of taluk map is displayed as canvas backdrop. The commands for this:
GRASS 6.2.3 (cheruvannur):~ > d.mon start=x0
GRASS 6.2.3 (cheruvannur):~ > v.digit -n map=villageboundaries \
‘bgcmd=d.rast -o \
map=taluk.blue.rectified’
Selected tools from the appearing v.digit tools menu and drawn the features on the monitor. Then saved the features, followed by the command v.build to build vector topology:
GRASS 6.2.3 (cheruvannur):~ > v.build villageboundaries
-
Correction of village boundary:
The correction of village boundary with the resource map was done with v.digit module, by displaying resource map as backdrop. The commands used:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=resource.blue.rectified
GRASS 6.2.3 (cheruvannur):~ > d.mon start=x0
GRASS 6.2.3 (cheruvannur):~ > v.digit map=villageboundaries \
‘bgcmd=d.rast -o \
map=resource.blue.rectified’
All the vector layers are prepared via same method, using the corrected vector layer villageboundaries as second back drop. Only necessary fields in attribute table were created from the v.digit menu for entering essential identification details of features, such as name of feature etc. Remaining fields in table structure left to create later.
Post-digitising errors in vector layers were detected by issuing the command v.build as follows:
GRASS 6.2.3 (cheruvannur):~ > v.build map=luse error=luse_error \
option=build
And these errors were corrected by editing the vector layers with v.digit command itself.
For creating layer contours, the raster image of toposheet 49M/10/SE is used as backdrop image, and vector layer villageboundaries as second back drop. Drawn contour lines, entered attribute data in field height along with and saved the layer. The commands used are:
GRASS 6.2.3 (cheruvannur):~ > g.region rast=49m10se.blue.rectified
GRASS 6.2.3 (cheruvannur):~ > d.mon start=x0
GRASS 6.2.3 (cheruvannur):~ > v.digit -n map=contours \
‘bgcmd=d.rast -o \
map=49m10se.blue.rectified; \
d.vect map=villageboundaries’
7. Creating database and attribute tables in PostgreSQL:
Attribute tables were created along with vector layers in GRASS itself, with limited number of fields. But the default database inside GRASS has limited SQL support and data-types. GRASS doesn’t have the capability to handle Malayalam Unicode characters at present. Because of these reasons, and for more ease of managing the tables and data, attribute tables are transferred into a database named g28cgp set up in PostgreSQL. From GRASS prompt created and configured a database in PostgreSQL, by issuing:
GRASS 6.2.3 (cheruvannur):~ > createdb -h localhost g28cgp
Password:
CREATE DATABASE
Tested the database by issuing:
GRASS 6.2.3 (cheruvannur):~ > psql -h localhost g28cgp
Password:
Welcome to psql 8.1.11, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
g28cgp=# \q
Connected GRASS with the PostgreSQL database by issuing:
GRASS 6.2.3 (cheruvannur):~ > db.connect driver=pg \
database=”host=localhost,dbname=g28cgp”
Checked the database connection by issuing:
GRASS 6.2.3 (cheruvannur):~ > db.login user=user
GRASS 6.2.3 (cheruvannur):~ > db.connect -p
driver:pg
database:host=localhost,dbname=g28cgp
schema:(null)
group:(null)
Copied the attribute tables from GRASS database to the g28cgp database set up in PostgreSQL, using db.copy command, by issuing:
GRASS 6.2.3 (cheruvannur):~ > db.login
GRASS 6.2.3 (cheruvannur):~ > db.copy from_driver=dbf \
from_database=$HOME/data/GRASSDATA/cheruvannur/user/dbf \
from_table=contour \
to_driver=pg \
to_database=”host=localhost,dbname=g28cgp” \
to_table=contour
GRASS 6.2.3 (cheruvannur):~ >
All attribute tables other than contour also were transferred to PostgreSQL using this method.
7.1. Installation of a front-end to PostgreSQL database:
For entering data to attribute tables easily, phpPgAdmin is used as front end for PostgreSQL. phpPgAdmin is a package written in php. phpPgAdmin will work on top of a web server and can be accessed via a web browser. phpPgAdmin is installed and configured by issuing:
# apt-get install phppgadmin # cd /var/www/ # ln -sf /usr/share/phppgadmin/
Accessed the database g28cgp in PostgreSQL through a browser by typing the address as: http://localhost/phppgadmin/
8. Correction and completion of attribute tables and data entry:
Logged in to the attribute database through phpPgAdmin, made necessary changes to attribute tables and fields, and created rest of the fields left when digitising vector layers. The structure of attribute tables, adopted as per National (Natural) Resources Information System (NRIS) Node Design and standards (NNRMS, ISRO). As the NRIS nodes are supposed to set-up in district level, and more detailed data is available from grama panchayat resource maps spatially, changes have made to the original NRIS table structures to accommodate these detailed data. An additional field descr_mal is also created to enter description in Malayalam language.
Entered rest of the attribute data. For entering data in Malayalam, SCIM platform is used. SCIM is the abbreviation of Smart Common Input Method. It a common input platform for typing Unicode text in languages other than English for Unix and Unix-like operating systems.
Batch entry of data such as land use code, is done through GRASS command interface itself, by using the command v.db.update as:
GRASS 6.2.3 (cheruvannur):~ > v.db.update luse col=lu_code \
value=02030400 where=”descr_type=’Coconut’”
9. Creating base maps:
9.1. Creating shaded relief map:
For creating shaded relief map cgprelief.tif, first created DEM (Digital Elevation Model) followed by creating shaded relief. Then overlayed DEM over Shaded relief, merged them by reducing opacity of DEM. Steps as follows:
-
Optimum resolution is identified and set for the DEM to create via a trial and error method with the following command:
GRASS 6.2.3 (cheruvannur):~ > g.region -a -p res=0.00005
-
Raster layer contour is made from vector layer contour by issuing command as follows:
GRASS 6.2.3 (cheruvannur):~ > v.to.rast input=contour \
output=contour \
column=height
-
A raster mask is need to be created for limiting raster operations inside mask, and for this purpose, layer administrative boundary (admin_2005_2010) is copied to a temporary vector file landmass by issuing:
GRASS 6.2.3 (cheruvannur):~ > g.copy vect=admin_2005_2010,landmass
-
Removed all the inside boundary lines and centroids inside it with the help of v.digit command, as a single boundary exist for the land mass. Put one centroid and given attribute value in the field const_code as 1 for it.
-
Then rasterised this vector layer by issuing the command:
GRASS 6.2.3 (cheruvannur):~ > v.to.rast input=landmass \
output=landmass column=const_code
-
Created raster mask by issuing:
GRASS 6.2.3 (cheruvannur):~ > r.mask input=landmass maskcats=*
-
Created a surface (DEM) by issuing command as follows:
GRASS 6.2.3 (cheruvannur):~ > r.surf.contour input=contour \
output=surface.dem
-
Shaded relief is created by issuing command:
GRASS 6.2.3 (cheruvannur):~ > r.shaded.relief map=surface.dem \
shadedmap=shadedrelief \
altitude=30 azimuth=270 \
zmult=1 scale=1 \
units=meters –overwrite
-
The shaded relief map is generated in GRASS map display screen by overlaying the raster layer surface.dem on layer shadedrelief by reducing opacity, and exported as tif image relief.tif.
9.2. Creating land use map:
For creating land use map, cgplanduse.tif, followed the steps:
-
An additional field lu_code_pseudo is added in the attribute table of the vector layer luse and a pseudo colour code is entered for each land use type, for rasterising the layer, and identifying each land-use type distinctly, after rasterisation.
-
Batch entry of codes for each land use type were done by issuing command as:
GRASS 6.2.3 (cheruvannur):~ > v.db.update luse col=lu_code_pseudo \
value=16 where=”descr_type=’Coconut’”
-
Rasterised the vector layer luse applying command:
GRASS 6.2.3 (cheruvannur):~ > v.to.rast input=luse \
output=luse column=lu_code_pseudo
-
The land use map in pseudo colours is generated in GRASS map display screen and exported as tif image landuse.tif.
-
The colours of the land use types are changed by editing the image with GIMP as it may match with the land use colours of grama panchayat resource map.
9.3. Converting the base map tif images to GeoTIF format:
The base map tif images landuse.tif and relief.tif are converted to GeoTIF format by the help of GDAL (Geospatial Data Abstraction Library). gdalinfo and gdal_translate are the modules used for this purpose. gdalinfo is used to get the information about the image, and gdal_translate is used for converting tif image to GeoTIFF format.
The latitude-longitude extends for the images are obtained from GRASS, by issuing command:
GRASS 6.2.3 (cheruvannur):~ > v.info -g map=villageboundaries layer=1
Then command is issued to convert the images to GeoTIF as:
$ gdal_translate -of GTiff -co “TILED=YES” -a_ullr 75.673957 \
11.601310 75.732038 11.543698 relief.tif cgprelief.tif
$ gdal_translate -of GTiff -co “TILED=YES” -a_ullr 75.673957 \
11.601310 75.732038 11.543698 landuse.tif cgplanduse.tif
The command gdalinfo is used for checking the image:
$ gdalinfo cgplanduse.tif
Driver: GTiff/GeoTIFF
Files: cgplanduse.tif
Size is 1980, 1965
Coordinate System is `’
Origin = (75.673957000000001,11.601310000000000)
Pixel Size = (0.000029333838384,-0.000029319083969)
Metadata:
TIFFTAG_DOCUMENTNAME=/var/www/ka-map-1.0-
20070205/htdocs/cgpdata/cgpland_use.tif
TIFFTAG_XRESOLUTION=72
TIFFTAG_YRESOLUTION=72
TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( 75.6739570, 11.6013100)
Lower Left ( 75.6739570, 11.5436980)
Upper Right ( 75.7320380, 11.6013100)
Lower Right ( 75.7320380, 11.5436980)
Center ( 75.7029975, 11.5725040)
Band 1 Block=256×256 Type=Byte, ColorInterp=Red
Band 2 Block=256×256 Type=Byte, ColorInterp=Green
Band 3 Block=256×256 Type=Byte, ColorInterp=Blue
$
9.4. Exporting vector layers as shapefile format:
Each vector layers are converted to ESRI shapefile format by issuing commands as:
GRASS 6.2.3 (cheruvannur):~ > v.out.ogr -e input=gen_fac \
type=point dsn=gen_fac olayer=gen_fac \
layer=1 format=ESRI_Shapefile
10. Setting up visualisation:
An Open Source API (Application programme interface) – ka-Map is used for setting up visualisation. It is a javascript API used to develop interactive web-mapping interfaces using the features available in modern web browsers. It works on top of Apache, Mapserver, PHP, and PHP Mapscript.
-
Downloaded the file ka-map-0.2-20060207.tar.gz from the ka-Map website, and extracted on to the directory /var/www/.
-
Changes were made in ka-Map configuration and index scripts as it may work properly with operating system. Changes made in ka-Map’s config.php script file are the settings to point to two shared object files namely gd.so and php_mapscript.so as the name and position of these files differ in various operating systems. The other change is setting of the pre-defined scales of visualisation.
-
A data directory is created in /var/www/ka-map-1.0-20070205/htdocs/ directory by issuing following command:
$ mkdir /var/www/ka-map-1.0-20070205/htdocs/cgpdata
-
Copied all the vector layers which were exported to ESRI Shapefile format, to the directory cgpdata, along with the two raster base maps.
-
Created a key map keymap.png with a lesser resolution with GRASS, put an image of compass rose on it with the help of GIMP, also copied to this directory.
-
Created map file cgp.map, symbol file symbols,sym, fonts file fonts.list .
-
cgp.map is copied to the /var/www/ka-map-1.0-20070205/htdocs/ directory, symbols,sym, and fonts.list are copied to the directory /var/www/ka-map-1.0-20070205/htdocs/cgpdata.
-
The fonts listed in file fonts.list also copied to the directory /var/www/ka-map-1.0-20070205/htdocs/cgpdata.
-
Created a raster legend legend.png using GIMP, copied into the /var/www/ka-map-1.0-20070205/htdocs/ directory.
-
Set web server aliases in file /etc/apache2/sites-available/default,. Then restarted the web server by issuing following command:
# /etc/init.d/apache2 restart
Setting up of geo-visualisation is complete.
Figure 7.2: Diagrammatic representation of visualisation set-up.
Comment from IRSHAD
Time April 27, 2009 at 11:30 am
A very good project in modern technique