BaseMap:+ Look for it among the existent digital maps,(Easiest & Fastest because no processing required)(Therefore, the most desirable, but not always available)(It can cost much)+ Make it from the satellite images in sale,(Easier & Faster, but not always available)(It does cost much. An astronomical number!)+ Make it from Google Earth Image “legally” by DIY.
(Slowest & requires much processing, but costless)

We have to follow the requirements if we want to use
images downloaded from Google Earth1

2

Place Marks of Google Earth are used in place of Ground Control Points.
Namely, Place Marks are put on Google Earth browser in grid pattern on andaround the target area and used for rectification of the images.
Place Marks in grid pattern can be produced in bulk using Excel spread
sheet.
An example is stored in Install CD:
D:¥materials¥Tutorial2009¥PMzorozoro.xls
Copy it in a working directory on HD of your PC and open the copied one.
The spread sheet is shown in the next slide.
The row from #9 to #34 are not locked. Insert rows as much as you need andcopy the row #8 on them.
Type in the longitude (column B) and latitude (column D) in the yellow cells.
Every row corresponds to a pair of Place Marks: one is clamped to groundsurface (‘clamtoground’) another clamped to the geoide (‘absolute’).
After completing it, copy the blue cells into the buffer memory, namely,
select all blue cells at once, click the right button and select ‘copy’.
The way how to select the values of longitude and latitude is explained in thefollowing.

3

Type in longitude and latitude here.
KML script is created here automatically.

Suppose that this slide shows your target area. Let’s use the interval of
longitude and latitude 0.01 and 0.005 degrees respectively. These
approximately correspond to 0.9Km and 0.55Km respectively.

4

Then, these 25 points are selected and typed in
the Excel spread sheet at the left.

Then, produced KML script is copied into the clip board (buffer memory).

Note:

0.01 deg.
0.9 km
1.1 km0.56 km0.005 deg.

In the previous slide the intervals of longitude and latitude are 0.01 deg. and 0.005
deg. , respectively. These correspond to 0.9km and 0.56km as shown below.

1.8 kmAs shown below, these ones give a image of which resolution is sufficient for
1/5000 map but not enough for 1/2500 one.
Use the intervals of longitude and latitude 0.005 deg. and 0.0025 deg. if a mapof 1/2500 is required.

5

On Google Earth browser,
click on ‘Edit’ and ‘Paste’.

Then, the created Place Marks are copied on Google Earth browser.
Yellow ones are ‘clamptoground’ and the red ones ‘Absolute’. Let’s
pay attention to the right top PlaceMarks.

6

The appearance after ‘paste’ PlaceMarks differs
depending on the setting of Google Earth browser.
If the red and yellow ones are displaced each other,‘Terrain Layer’ is on. The way to put it off is to click on‘show slide bar’ button
and make check mark off from
‘Terrain’ shown in the right.
Then, click onagain.

The displacement is corrected.

PlaceMarks clamped to ground surface
Ground Surface
Geoid
Projected one

Projected one
Absolute
PlaceMarks clamped to Sea Level (Geoide)
Geoide is almost flat in this big scale mapping.

7

Note: Objects in the image are clamped to the ground surface. The
yellow PlaceMark also. Therefore they are affected by the distortion due
to the variation of the altitude above Sea Level.
The red pins are clamped to the Sea Level (Geoide). Due to limited
height of the view point, the yellow ones do not coincide to the red ones.
Especially at high land, the discrepancy is significant.
By checking off ‘Terrain’ layer, the height above sea level loses its effecton the image shown in the browser. Therefore, yellow PlaceMarks moveon to the red ones and the image it self is corrected.
The image is the projection of ground objects on Geoide but looked froma view point with finite height. Geoide is almost flat but not completely.
Therefore the equi-longitudinal lines on the image are not completely
parallel. They are slightly curved and getting closer at the higher latitude.
This must be corrected before merging images (rectifying). Georeferencing (adding the coordinates) also.

At rectifying:
Afin transform is not enough for this case.
2nd order polynomial requires 9 GCP (Place Marks) at the minimum.
3rd order polynomial requires 16 GCP at the minimum.

8

Zoom up a part of the target area for that the image has 9 PlaceMarks asshown here.

Be sure that the image is not tilted pushing the lower
part of the navigator tool shown in the left figure.

Save the image of this part into a fileusing ‘File’, ‘Save’ and ‘Save Image’.

9

Click on ‘show side bar’ button.

The previously copied PlaceMarks are groupedand named ‘Kml_test_file’ .
Make it check off and click ‘show side bar’ button
again.
All PlaceMarks are erased from the image.

Then, let’s save this image
without PlaceMarks. Never movethe image.

Two identical images are stored in files, but one with PlaceMarks andanother without them. The former is used to define the rule to convert the
pixel coordinates to the geographical ones and this rule is applied to thelatter for rectifying and geo-referencing.
The pair of images must be downloaded through the target area. In thisexample, the target area is divided in four partial area.
Start ‘Cygwin-GRASS’.

10

First, the images areimported to a new mapset ofthe location of x-y
coordinates.
‘Tsukuba’ is the new map set
name in this example.

1

2

Select ‘x-y’ in ‘Project
Location’ and type in‘Tsukuba’ in ‘Create newmapset in selected location’.
Then, click on ‘Create newmapset’ button.

3

New mapset ‘Tsukuba’ iscreated. Select it.
Then, click on ‘Enter GRASS’button.

11

GRASS starts with three displays.

Select ‘Config’, ‘Region’ and ‘Display region setting’ to check the region setting.
Region setting is displayed in ‘Output-GIS.m’ display.
Pixel sizes of imported images must be smaller thanthese ones. 8000X8000 seems sufficient.
(If peripheral part of imported images are lost byimporting, check the Pixel sizes and the region setting
again)

12

Import image files using ‘File’, ‘Import’, ‘Raster Map’ and ‘Multiple formats
using GDAL’.
‘r.in.gdal’ dialog appears.
Type in the name of the file to beimported and that for output raster map.
For example, ‘T.jpg’ with its path for theformer, ‘T’ for the latter. Then, click on‘Run’.

‘T.jpg’ is successfully imported into three files that correspond to red, blueand green: ‘T.red’, ‘T.blue’ and ‘T.green’.

13Fit the region to a output
raster map.
Select ‘Config’, ‘Region’ and‘Change region Setting’.
‘g.region’ dialog appears.
Type in the name of raster
map, for example, ‘T.red’ andclick on ‘Run’.

After checking the appearance of thismessage on ‘Output-GIS.m’ display, clickon ‘close’ of ‘rg.region’ dialog.

Select ‘Config’, ‘Region’ and‘Display region setting’ tocheck the changed region
setting.

For this example, pixel sizes are 660X1016.

14

Region setting:north:
660
south:
0
west:
0
east:
1016
nsres:
1
ewres:
1

660

Pixel

North

Downloaded image is composedof 660 by 1016 pixels

0

Pixel

South

West

1016
East

Import ‘TPM.jpg’ by the similar way. All of the images of the partial area withand without Place Marks are imported one by one.
After importing all of them, click ‘close’ of ‘r.in.gdal’ dialog.

15

Create color image using‘Raster’, ‘Manage map
Colors’ and ‘Create color
image from RGB files’.

‘r.composite’ dialog appears. Type in
the name of three color maps andthe combined color map.
For this example, ‘T.red’ for <red>,‘T.green’ for <green>, ‘T.blue’ for<blue> and ‘T’ for raster map to
contain result.
Then, click ‘Run’.
Repeat this step for all of images
with and without PlaceMarks.
Then, click on ‘close’ of‘r.composite’ dialog‘File’, ‘Manage maps andvolumes’ and ‘Remove
Maps’.

‘g.remove’ dialog appears.
Remove all of the maps
having extension ‘.red’,‘.green’ and ‘blue’.
Then, ‘close’ the ‘g.remove’
dialog.

16

The color raster maps in Pixel coordinates are stored in Location ‘x-y’.
These will be projected into Location ‘wgs84’ of which projection is wgs84.
Rectifying and Geo-referencing will be done at once. The coordinates given
to PlaceMarks are used for this step.
Here, we exit from GRASS once and re-enter it but to Location ‘latlong(wgs84)’ in order to prepare its region setting. This is necessary to
prevent loss of images.

Re-enter GRASS to Location‘lat-long(wgs84)’ and new
map set ‘Tsukuba’.
Select Location ‘latlong(wgs84)’ .
Type in ‘Tsukuba’ for Create
new mapset…
Click on ‘Create new mapset’
button.
Select Mapset ‘Tsukuba’.
Click on ‘Enter GRASS’.

17

Change region setting using‘Config’, ‘Region’ and ‘Change
region Setting’.
‘g.region’ dialog appears.
Select ‘Bounds’ tag and typein four edges’ value.
For this example,
36.210 North
36.090 South
140.120 East
140.07 West
Select ‘Resolution’ tag andtype in the value of Grid
resolution 2D. For thisexample,ns=ew=0:00:00.05
Fine resolution isrecommendable in this step.
Then, click ‘Run’ of ‘g.region’
dialog .
Exit from GRASS.

Re-enter GRASS to Location ‘xy’ and mapset ‘Tsukuba’ .

18‘Imagery’, ‘Develop
images and groups’and ‘Create/edit
imagery group’Type in the name ofimagery group and selectmaps to be included.
For this example, name is‘T11’ and maps ‘T11’ and‘T11PM’ are included.
All the files included in thesame imagery group can beprojected to other Location
using the same conversion
rule.
Repeat this step for allother maps of the partial
area. Then, close ‘i.group’dialog‘Imagery’, ‘Develop
images and groups’and ‘Target imagery
group’.
‘i.target’ dialog appears.
Type in one of the imagery
group name, target Locationand Mapset
For this example,
Imagery Group Name=‘T11’
Target Location=lat-long(wgs84)
Target Mapset=Tsukuba
Repeat this step for all
imagery groups. Then, close‘i.target’ dialog

19‘Imagery’, ‘Rectify and georeference image group’ and ‘Set ground control
points (GCPs) from raster maps or keyboard entry.
‘i.points’ and ‘Monitor X0’ displays
appear. It is better to enlarge the latteras much as possible. Drug ‘i.points’
display to the top left corner and‘Monitor X0’ display a little below.

Show ‘i.points’ display byclicking its top bar.
Type in one of the imagery groupname.
For this example, ‘T11’.
Then, hit ‘Enter’.

The message ‘Use mouse now…’
appears.
Show ‘Monitor X0’ display byclicking its top bar.

20‘In the left half of ‘Monitor X0’
display this message appears.
Double click on the name of thecolor image with PlaceMarks.
For this example, ‘T11PM’.

The selected color image with
PlaceMarks is displayed in the
top left.
For this example, ‘T11PM’.
Menu bar is shown at the bottom
left.
The coordinates of thePlaceMarks are going to be given
using this menu.

Menu bar

21

Click only once on ‘ZOOM’.

Menu for ‘ZOOM’ appears.
Click on ‘POINT’.
Then, click on one of the displayed
PlaceMarks. Clicked position does
not require an accuracy.
‘Magnification’ dialog appears.
Make it bigger by clicking on ‘+’.
For example, ‘2’. Then, click on‘ACCEPT’.

An area around the clicked point is
automatically selected and shownin zoomed up way in the bottom left
panel.

22

Click on the tip of the PlaceMark’s
needle accurately in the bottom left
panel.
Message ‘Keyboard input required’appears at the bottom.
Show ‘i.point’ display by clicking its top
bar.
Then, type in the longitude and latitude(longitude first!) and hit ‘Enter’.
For this example,
140.095 36.205
Delimiter must be a space.

The typed in values are displayed.
Check them and type ‘y’ if it’s OK. If
not, type ‘n’ and you can re-type inthe values.

The message ‘Use mouse now…’
appears. Show ‘Monitor X0’ display
by clicking its top bar.

23

Repeat the above steps to give thecoordinates for all displayed
PlaceMarks.
Finally, click on
And ‘Yes’.
‘i.points’ display disappears but‘Monitor X0’ display remains.

1. Click here

3. Click here
2. Select ‘Kill’

Click on the back ground of X-window once and ‘Twm’ pull down menu appears.
Then, select ‘kill’.
The cursor changes to a skull mark.
Click on the top bar of ‘Monitor X0’ display to erase it.

24‘Imagery’, ‘Rectify and georeference image group’ and ‘Affine and Polynomial
rectification (rubber sheet)’‘i,retify’ dialog appears.
Type in the imagery group name tobe projected (for this example ‘T11’.
Select input raster maps (‘T11’,‘T11PM’). Type in ‘Output fileextensions’ (for this example ‘r’,
but arbitrary). Type in ‘Rectification
polynom order’ (if more than 15
PlaceMarks are used ‘3’ can beselected. If not type in ‘2’. It meansthat the second order polynomial isused for rectification).
Then, click ‘Run’.

Result of ‘Run’ is shown in ‘Output-GIS.m’ dialog.

Rectification is completed. T11r
was created in the target
Location-Mapset selectedalready (for this example,
Location=‘lat-long(wgs84)’,
Mapset=‘Tsukuba’.

25Repeat: ‘Create imagery group’, ‘target imagery group’, ‘set ground control
points’ and ‘Affine and Polynomial Rectification’ for all other remained color maps.

Start QGIS.

26

‘Plugins’, ‘GRASS’ and ‘Add GRASS
raster layer’.

‘Select GRASS Raster Layer’ dialog. SelectLocation and Mapset. For this example,
Location=lat-long(wgs84), Mapset=‘Tsukuba’.

Select Map. Then, click ‘OK’.

Selected raster layer is displayed.

Zoom Out.

2

1

27

Load all layers with PlaceMarks.
Check whether they are projected
appropriately or not.

Remove them. Click the right button on thelayer, select ‘Remove’.

Load all layers without PlaceMarks.
Check whether they are projected
appropriately or not.

Type in Scale 1:1000028

Quit from QGIS without save anything.

29

Re-enter GRASS to
Location=‘lat-long(wgs84),
Mapset=‘Tsukuba’.
The projected raster maps
are going to be trimmed
and merged.

Trimming: the peripheral part of the projected images, especially outside of the areasurrounded by PlaceMarks, can not have good accuracy, because of theextrapolation of the projection rule defined using PlaceMarks.
For the example shown below, the part of the latitude from 36.195-e to 36.205+e
and the longitude 140.075-e to 140.095+e is going to be extracted, where e is asmall value.

36.20536.195140.075140.085140.095

30

‘Config’, ‘Change region Setting’.

‘g.region’ dialog.
Type in new edges of regionslightly wider than the areasurrounded by PlaceMarks.
Then, click ‘Run’.

‘Raster’ and ‘Mapcalculator’.

‘r.mapcalculator’ dialog.
Type in A the raster layer name to betrimmed.
Type in ‘A’ in Formula.
Type in a new name for ‘Resulting output
map.
Then, click on ‘Run’.

Repeat this trimming process for all images without PlaceMarks. Then, close‘r.mapcalculator’ dialog

31

Component maps

TrimmedMergedSet region to cover all thetrimmed images.
‘Run’ and ‘close’.

‘Raster’, ‘Overlay maps’ and ‘Patch maps’.

Close all dialog.

32

Browse the merged map using QGIS (‘plugins’, ‘GRASS’ and ‘Add GRASS raster…’)

Click onand the image can be panned. Quit from QGIS.

‘File’, ‘Export’, ‘RasterMap’ and ‘TIFF image’. The merged map is going to beexported in TIFF format.

33‘r.out.tiff’ dialog. Select ‘Output TIFF world file that has the georeference
information.
Select the merged map for ‘Existing raster file name’ and type in file name for new
TIFF file.
Then, ‘Run’.
Exit from GRASS after the completion of the exporting task.

The exported geotiff files, namely ‘Tai.tif’ and ‘Tai.tfw’, have the image inlatitude-longitude system (wgs84).
This can be converted to other projection system using GRASS, for example,
to Universal Transverse Mercator projection. The procedure is as follows.
i: Create a new location for the selected projection.
‘Define New Location with..’, ‘EPSG code’ or ‘Projection Value’.
Ii: Re-project raster layer from the original location-mapset.
‘Raster’, ‘Develop Map’ and ‘Reproject raster from other location’.

34Tiff file (Tai.tif) and its world file (Tai.tfw) are created in the working directory ofuser ‘yokoi’. Make copy of them for back up. The next step breaks them.

Display the exported tiff file on QGIS.

35

The following slides show the stepes to build “Pyramid” structureof BaseMap especially for Quantum GIS.
It’s advantage is speeding up panning and zooming.
Click on the right button on the layer
name and select ‘Properties’.

‘Raster Layer Properties’ dialog. Select‘Pyramid’ tag.

Select Resolutions.
Resampling Method=Average.
Then, click ‘Build Pyramid’.

After completion, click ‘OK’.

The inner structure of ‘Tai.tif’ and ‘Tai.tfw’ is changed. They can not open by usual
image browsers .
The long process to make BaseMap from Google Earth images is completed.

36