Environmental Engineering Reference
In-Depth Information
It is the aim of the modeller to transfer some information from the map into
a computer model, which may itself be implemented in MATLAB
or at least
®
connected to MATLAB
and
a Geo Information System (GIS) have already been discussed in literature. Marsili-
Libelli et al. ( 2001 ) couple a river quality model with a GIS software, whereas
Marsili-Libelli et al. ( 2002 ) present a pure MATLAB
. Different kinds of connections between MATLAB
®
®
approach for a task of
similar kind. Raterman et al. ( 2001 ) describe an integrated approach, using
MATLAB
®
with GIS for groundwater modeling.
Moreover, it is often convenient to view model output results in front of a map
or a cross-section plot. Calculated concentration distributions of environmental
species, temperature, hydraulic head or pressure are often visualized in front of
an area background. In the following it is outlined how the task can be achieved
with MATLAB
®
.
In the first subchapter it is shown how the user can include a bitmap image in
a MATLAB
®
figure. There are two steps: the image must be read (1) and displayed
on the screen (2). The second part is a guide to the correct coordinate frame. In the
GIS literature such a task is referred to as Geo-referencing . In the third subchapter it
is demonstrated how information from the map is transferred to the computer
model. We summarize this work under the header Digitizing .
®
17.2 Reading and Display
The main new features within an M-file for geo-referencing are explained using an
example. As an example image, we choose a map that is read from MATLAB ® .It
is shown how the map is depicted in the MATLAB
figure editor. Thereafter, the
image is geo-referenced in order to be able to extract basic features from the map
image figure. The following command sequence performs the first task.
®
The complete code, outlined in this chapter, is included in the accompanying
software under the name 'georef.m'.
[infile,path] = uigetfile('*.jpg','Select graphics file...');
infilepath = strcat(path,infile);
lx = 1000; ly = 1000;
figure;
[X,map] = imread(infilepath);
imagesc(X);
axis off; hold on;
ax1 = gca;
ax1 = axes ('Position',get(ax1,'Position'),'Color',...
'none','XLim',[0 lx],'Ylim',[0 ly],'XTick',[],'YTick',[]);
® uigetle command.
Parameters in the command are the type of the file (here: *.jpg), and the header
'Select graphics file
The first line opens a file select box using the MATLAB
'. The file-select box looks as follows:
...
Search WWH ::




Custom Search