Web Mapping Illustrated Using Open Source Gis Toolkits 1st Edition Tyler Mitchell
Web Mapping Illustrated Using Open Source Gis Toolkits 1st Edition Tyler Mitchell
Web Mapping Illustrated Using Open Source Gis Toolkits 1st Edition Tyler Mitchell
Web Mapping Illustrated Using Open Source Gis Toolkits 1st Edition Tyler Mitchell
1. Web Mapping Illustrated Using Open Source Gis
Toolkits 1st Edition Tyler Mitchell download
https://ebookbell.com/product/web-mapping-illustrated-using-open-
source-gis-toolkits-1st-edition-tyler-mitchell-2498584
Explore and download more ebooks at ebookbell.com
2. Here are some recommended products that we believe you will be
interested in. You can click the link to download.
Introduction To Web Mapping Michael Dorman
https://ebookbell.com/product/introduction-to-web-mapping-michael-
dorman-11069622
Advances In Webbased Gis Mapping Services And Applications 1st Edition
Songnian Li
https://ebookbell.com/product/advances-in-webbased-gis-mapping-
services-and-applications-1st-edition-songnian-li-4767094
Web Application Development With Streamlit Develop And Deploy Secure
And Scalable Web Applications To The Cloud Using A Pure Python
Framework 1st Edition Mohammad Khorasani
https://ebookbell.com/product/web-application-development-with-
streamlit-develop-and-deploy-secure-and-scalable-web-applications-to-
the-cloud-using-a-pure-python-framework-1st-edition-mohammad-
khorasani-44888638
Web Application Development With Streamlit Develop And Deploy Secure
And Scalable Web Applications To The Cloud Using A Pure Python
Framework 1st Edition Mohammad Khorasani
https://ebookbell.com/product/web-application-development-with-
streamlit-develop-and-deploy-secure-and-scalable-web-applications-to-
the-cloud-using-a-pure-python-framework-1st-edition-mohammad-
khorasani-44912928
3. Web Development And Design Foundations With Html510th Edition Terry
Felkemorris Terry Ann Felkemorris 10th Edition Terry Felkemorris
https://ebookbell.com/product/web-development-and-design-foundations-
with-html510th-edition-terry-felkemorris-terry-ann-felkemorris-10th-
edition-terry-felkemorris-46149808
Web Design Playground Html Css The Interactive Way 1st Edition Paul
Mcfedries
https://ebookbell.com/product/web-design-playground-html-css-the-
interactive-way-1st-edition-paul-mcfedries-46181510
Web Coding Development Allinone For Dummies Paul Mcfedries
https://ebookbell.com/product/web-coding-development-allinone-for-
dummies-paul-mcfedries-46260420
Web Services Concepts Architectures And Applications Gustavo Alonso
https://ebookbell.com/product/web-services-concepts-architectures-and-
applications-gustavo-alonso-46710918
Web Services Icws 2021 28th International Conference Held As Part Of
Service Conference Federation Scf 2021 Chengzhong Xu
https://ebookbell.com/product/web-services-icws-2021-28th-
international-conference-held-as-part-of-service-conference-
federation-scf-2021-chengzhong-xu-47242656
9. iv | Table of Contents
5. Acquiring Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Appraising Your Data Needs 59
Acquiring the Data You Need 64
6. Analyzing Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Downloading the Demonstration Data 69
Installing Data Management Tools: GDAL and FWTools 70
Examining Data Content 71
Summarizing Information Using Other Tools 82
7. Converting Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
Converting Map Data 92
Converting Vector Data 93
Converting Raster Data to Other Formats 98
8. Visualizing Mapping Data in a Desktop Program . . . . . . . . . . . . . . . . . . . . . . 103
Visualization and Mapping Programs 103
Using OpenEV 105
OpenEV Basics 111
9. Create and Edit Personal Map Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Planning Your Map 129
Preprocessing Data Examples 132
10. Creating Static Maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
MapServer Utilities 150
Sample Uses of the Command-Line Utilities 151
Setting Output Image Formats 170
11. Publishing Interactive Maps on the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Preparing and Testing MapServer 173
Create a Custom Application for a
Particular Area 183
Continuing Education 209
12. Accessing Maps Through Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
Web Services for Mapping 212
What Do Web Services for Mapping Do? 212
Using MapServer with Web Services 214
Reference Map Files 235
10. Table of Contents | v
13. Managing a Spatial Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Introducing PostGIS 241
What Is a Spatial Database? 241
Downloading PostGIS Install Packages and Binaries 244
Compiling from Source Code 247
Steps for Setting Up PostGIS 247
Creating a Spatial Database 252
Load Data into the Database 253
Spatial Data Queries 256
Accessing Spatial Data from PostGIS in Other Applications 266
14. Custom Programming with MapServer’s MapScript . . . . . . . . . . . . . . . . . . . 276
Introducing MapScript 276
Getting MapScript 276
MapScript Objects 278
MapScript Examples 278
Other Resources 285
Parallel MapScript Translations 286
A. A Brief Introduction to Map Projections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
B. MapServer Reference Guide for Vector Data Access . . . . . . . . . . . . . . . . . . . . 307
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
12. This is the Title of the Book, eMatter Edition
vii
Foreword
For novices and geospatial experts alike, mapping technologies are undergoing as
significant a change as has been seen since mapping first went digital. The prior
introduction of Geographic Information Systems (GIS) and other digital mapping
technologies transformed traditional map making and introduced an era of special-
ists in these new geographic technologies. Today, an even newer set of technological
advancements are bringing an equally massive change as digital mapping goes main-
stream. The availability of Global Positioning Systems (GPS), broadband Internet
access, mass storage hard drives, portable devices, and—most importantly—web
technologies are accelerating the ability to incorporate geographic information into
our daily lives. All these changes have occurred simultaneously and so quickly that
the impact of only a fraction of the full potential of spatial technologies has yet been
felt.
In parallel with the exciting opportunities that modern technologies are providing
the digital geospatial universe, a less broadly known but perhaps far more important
phenomenon has emerged: a new world of open source collaboration. Open source
development and user communities, along with a healthy commitment from indus-
try, are filling the growing need and demand for spatial technologies for making bet-
ter decisions and providing more information to the growing mapping needs of
technology users. In a multidimensional world, geography forms a common frame-
work for disseminating information. The open source community and industry is fill-
ing that need at a growth rate unmatched in the industry.
In an age when web technologies have erased the distances between peoples of differ-
ent continents and nationalities, this book and the technologies behind it remind us
of the continued importance of place in the world in which we live. Mapping has
always highlighted the differences and variations that occur over space; but at the
same time it has reminded us that we share this world with our neighbors, and our
actions have impact beyond ourselves. Hopefully, web mapping technologies will
help to bring this powerful information to all of us for our common future good.
13. This is the Title of the Book, eMatter Edition
viii | Foreword
If you are reading this book without ever having heard of Geographic Information
Systems or Remote Sensing, you are not alone. It is for you that the publishing of this
book is so timely; it is now that mapping technologies are for the first time becom-
ing readily accessible to the broader IT world. The incredible wealth of information
provided in this book will allow you to interact with the open source mapping com-
munity as so many have already done, and will one day allow you to help the many
others that will follow.
I hope that this book will, if nothing else, engage you in understanding the power
that mapping information can bring to your web presence and other IT needs—
regardless of whether you are with an NGO, a small or large corporation, or a gov-
ernment organization. The importance of this book cannot be overstated. It comes at
a critical stage, when two phenomena with tremendous momentum are coming
together: the emergence of Open Source mapping technology, and the availability of
technologies enabling digital mapping to become accessible by the masses.
—Dave McIlhagga
President, DM Solutions Group
14. This is the Title of the Book, eMatter Edition
ix
Preface
What is it about maps? For some of us, maps are intriguing no matter where we are.
I’ve spent hours poring over them learning about foreign places. There is a sense of
mystery surrounding maps. They contain information that can only be revealed
through exploration.
Digital maps allow a user to explore even further by providing an interactive experi-
ence. Most maps have traditionally been static. Now digital maps allow users to
update information and customize it for their particular needs.
Youthful Exploration
For me, map-based exploration started at a young age. I remember the thrill of find-
ing our Scout camp on a topographic map. Part of the map is shown in Figure P-1. I
found my home town, local roads, and even greenhouses. It was hard to believe that
someone bothered to map the streets I used to play on or the tobacco fields I worked
in during summer vacation. Yet there they were, drawn on this fascinating map that
hangs on my office wall 20 years later.
These maps opened the door to planning hiking adventures and bicycle trips. I blame
maps for luring me further and further away from home—to see what a map symbol
or town looked like on the ground.
When I wasn’t exploring, I was often on the computer learning more about the digital
world. My combined interest in computers and exploration naturally led me to the
field of computerized mapping and geographic information systems (GIS). It never
occurred to me that my enjoyment of maps and computers would become a career.
Whether showing a friend where you live or displaying the path of a pending hurri-
cane, maps play an important role in lives of people everywhere. Having the tools
16. This is the Title of the Book, eMatter Edition
Preface | xi
free for you to use and adopt as you see fit. Many of them are pushing the envelope
of what even the commercial products can do.
I began using many of these tools shortly after finishing university. My day job was in
mapping and geospatial data analysis, and I had access to some of the latest commer-
cial tools. However, when I wanted to pursue projects at home on my own time, the
traditional tools were simply not available. The licensing restrictions and costs forced
me to find alternatives; eventually, the open source tools took over. Any gaps in my
array of tools will likely be filled within a year of this book being published.
There is a lot of active development going on across the spectrum of open source
mapping and GIS projects. Many projects use the latest open standards for interoper-
ability and tend to implement them much faster than the commercial products.
My initial motivation for writing was to fill in the gaps of existing documentation
and answer the new user’s common questions. I hope it does this and more. I hope
you become as excited about these tools as I am. Years of programming have given
us a powerful toolkit for mapping, data management, and even youthful exploration.
What This Book Covers
This book introduces several concepts and tools. They can be grouped into the fol-
lowing four categories:
• Mapping and data-management concepts
• Command-line data-management tools
• Command-line and web-based mapping tools
• Spatial database management
You will study the following tools:
Geospatial Data Abstraction Library (GDAL) with OGR
This tool includes application programming interfaces (APIs) and command-line
utilities for raster and vector data. GDAL’s web site is http://www.gdal.org.
OpenEV
For basic desktop GIS and imagery analysis; includes tools to draw new map fea-
tures for use in other programs.
UMN MapServer
This tool includes command-line tools to build CGI web applications and uses
the MapServer API, called MapScript, to custom-script mapping applications.
PostGIS
This tool is an extension to the PostgreSQL database management system that
allows you to store and manipulate spatial data alongside tabular data.
17. This is the Title of the Book, eMatter Edition
xii | Preface
Organization of This Book
This book is organized into 14 chapters and 2 appendixes:
Chapter 1, Introduction to Digital Mapping
This chapter introduces digital mapping, including web mapping, and presents
some of the barriers to using the technology. It also includes a list of web sites
providing web mapping services and outlines the technology required to do web
mapping.
Chapter 2, Digital Mapping Tasks and Tools
This chapter outlines the goals of digital mapping and the common types of
tasks involved including viewing, analysis, creating/manipulating, conversion,
and sharing.
Chapter 3, Converting and Viewing Maps
This chapter introduces the concepts of raster and vector data types, and the
main tools used in this book: OpenEV, MapServer, GDAL, OGR, and PostGIS.
Chapter 4, Installing MapServer
In this chapter, we walk through the main components of MapServer applica-
tions. You’ll find detailed instructions for installing binaries or compiling
MapServer from source. The chapter also provides a list of MapServer support
contacts.
Chapter 5, Acquiring Map Data
This chapter discusses how to assess your data needs and acquire data to meet
those needs. It provides a list of resources for finding free mapping data.
Chapter 6, Analyzing Map Data
This chapter covers setting up the FWTools package and using GDAL/OGR util-
ities for examining raster and vector datasets. Here you’ll find examples that
combine these utilities with command-line text processing tools to produce cus-
tomized reports and summaries.
Chapter 7, Converting Map Data
This chapter shows how to convert raster and vector data between formats
using GDAL/OGR utilities. You’ll learn how to convert between formats such
as ESRI shapefiles, GML, DGN, and PostGIS formats.
Chapter 8, Visualizing Mapping Data in a Desktop Program
This chapter provides a list of desktop mapping programs. It also introduces
OpenEV as a desktop mapping program and walks through common tools in
OpenEV. Here, you’ll find examples of color-theming and preparing 3D views.
Chapter 9, Create and Edit Personal Map Data
This chapter discusses what to consider when preparing to create your own data.
You’ll use OpenEV to digitize and draw new features into a shapefile.
18. This is the Title of the Book, eMatter Edition
Preface | xiii
Chapter 10, Creating Static Maps
In this chapter, you’ll use command-line MapServer programs to create map
images, scalebars, and legends. You’ll use configuration files—a.k.a. map files—
to create color-themed and labeled maps.
Chapter 11, Publishing Interactive Maps on the Web
This chapter studies how to set up MapServer for use with a web server. It builds
on Chapter 10, making the mapping application available through a web page.
You’ll learn how to add HTML components for zooming, layer control, and ref-
erence maps.
Chapter 12, Accessing Maps Through Web Services
This chapter introduces the concept of web services and the Open Geospatial
Consortium (OGC) specifications. It focuses on Web Map Service (WMS) and
Web Feature Service (WFS). You’ll find manual URL creation and MapServer
configuration examples.
Chapter 13, Managing a Spatial Database
This chapter introduces the PostGIS extension to the PostgreSQL database.
Here, you find installation guidelines and resources for Windows, Linux, and
Mac operating systems. It also describes loading data into a PostGIS database,
creating queries using SQL, and adding PostGIS data sources into MapServer
applications.
Chapter 14, Custom Programming with MapServer’s MapScript
In this chapter, you’ll find out how to install or compile MapScript for various
languages. The chapter introduces the main MapScript objects and provides
examples of MapServer map files and Python code for drawing maps. It also
includes examples of code in several languages.
Appendix A, A Brief Introduction to Map Projections
This appendix discusses coordinate systems and projections and introduces the
main classes of projections and their use. It also explains EPSG codes and pro-
vides visual examples of several projections and associated MapServer map file
syntax.
Appendix B, MapServer Reference Guide for Vector Data Access
This appendix describes different types of vector data sources and presents a
comprehensive guide to 15 vector data formats MapServer can use. Here, you’ll
find map file syntax for native MapServer formats and for those accessed
through the OGR library.
Conventions Used in This Book
Italic is used for:
• New terms where they are defined
• Emphasis in body text
19. This is the Title of the Book, eMatter Edition
xiv | Preface
• Pathnames, filenames, and program names; however, if the program name is
also the name of a Java class, it is written in constant width font, like other class
names
• Host and domain names (e.g., http://www.maptools.org)
Constant width is used for:
• Code examples and fragments
• Anything that might appear in an XML document, including element names,
tags, attribute values, entity references, and processing instructions
• Anything that might appear in a program, including keywords, operators,
method names, class names, utilities, and literals
Constant width bold is used for:
• User input
• Emphasis in code examples and fragments
Constant width italic is used for:
• Replaceable elements in code statements
This icon indicates a tip, suggestion, or general note.
This trap icon indicates a warning or caution.
Case-sensitive filenames and commands don’t always allow authors to adhere to
standard English grammar. It is usually possible to rewrite the sentence so the two
don’t conflict, and when possible I have endeavored to do so. However, on rare occa-
sions when there is simply no way around the problem, I let standard English come
up the loser.
Finally, many of the examples used here are designed for you to follow along with. I
hope you can use the same code examples, but for reasons beyond my control, they
might not work. Please feel free to reuse them or any parts of them in your own code.
No special permission is required. As far as I am concerned, they are in the public
domain (though the same isn’t true of the explanatory text).
20. This is the Title of the Book, eMatter Edition
Preface | xv
Safari Enabled
When you see a Safari® Enabled icon on the cover of your favorite tech-
nology book, it means the book is available online through the O’Reilly
Network Safari Bookshelf.
Safari offers a solution that’s better than e-books. It’s a virtual library that lets you
easily search thousands of top technology books, cut and paste code samples, down-
load chapters, and find quick answers when you need the most accurate, current
information. Try it for free at http://safari.oreilly.com.
Comments and Questions
Please address comments and questions concerning this book to the publisher:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, CA 95472
(800) 998-9938 (in the United States or Canada)
(707) 829-0515 (international or local)
(707) 829-0104 (fax)
There’s a web page for this book that lists errata, examples, and any additional infor-
mation. You can access this page at:
http://www.oreilly.com/catalog/webmapping
To comment or ask technical questions about this book, send email to:
bookquestions@oreilly.com
For more information about our books, conferences, Resource Centers, and the
O’Reilly Network, see our web site at:
http://www.oreilly.com
Acknowledgments
Several fellow passengers on this writing roller coaster deserve special mention. This
project would never have happened without the support and patience of my editor,
Simon St.Laurent. He helped me through several proposals, refining and focusing the
content of this book.
Regardless of a successful book proposal, I would never have pursued this project
without the support of my loving wife. Her encouragement, patience, and enthusi-
asm kept me going to the end.
21. This is the Title of the Book, eMatter Edition
xvi | Preface
Technical reviewers for this book helped catch my mistakes and improve the con-
tent substantially. Thank you very much to all of them: Bart van den Eijnden, Dar-
ren Redfern, Jeff McKenna, Paul Ramsey, and Tom Kralidis. A handful of others
helped answer my endless stream of questions. If you helped with even a yes/no
question, it was appreciated.
I’m thankful for the support and encouragement I received from Dave McIlhagga
and DM Solutions Group in general. It was a continual reminder that this book was
necessary.
The developers of these tools deserve special recognition for their contributions to
open source GIS and mapping. Without them, there wouldn’t be much to write to
about! I would also like to acknowledge the long-term support of the University of
Minnesota and their willingness to let the MapServer community grow beyond their
borders.
A significant amount of documentation already exists for MapServer. Without the
efforts of many companies and volunteers, I would never have learned as much as I
have about these great tools. Thank you, fellow authors. In no way does this book
mean to downplay your efforts.
Several friends and colleagues have helped encourage me over the years. Without
their encouragement to think outside the box and strive for something better, I
doubt I’d be writing this today.
I spent way too many hours on IRC channels picking the brains of other chatlings.
When email was just too slow, this help was much appreciated and allowed real-time
assistance from the broader community.
22. This is the Title of the Book, eMatter Edition
1
Chapter 1
CHAPTER 1
Introduction to Digital Mapping
Not long ago, people drew and colored their maps by hand. Analyzing data and cre-
ating the resulting maps was slow and labor intensive. Digital maps, thanks to the
ever-falling cost of processing power and storage, have opened up a whole new range
of possibilities. With the click of a mouse or a few lines of code, your computer ana-
lyzes, draws, and color-themes your map data. From the global positioning system
(GPS) in your car to the web site displaying local bus routes, digital mapping has
gone mainstream.
Of course, learning to produce digital maps requires some effort. Map data can be
used incorrectly, resulting in maps with errors or misleading content. Digital map-
ping doesn’t guarantee quality or ethics, just like conventional mapping.
The Power of Digital Maps
When you contrast the methods of conventional and digital mapping, the power of
digital mapping becomes evident. The process of conventional mapping includes
hand-drawn observations of the real world, transposed onto paper. If a feature
changes, moves, or is drawn incorrectly, a new map needs to be created to reflect
that change. Likewise if a map shows the extent of a city and that city grows, the
extent of the map will need to be changed and the map will need to be completely
recreated.
These problems are reduced with digital mapping. Because features are stored as dis-
tinct layers in a computer file, you can modify a map without starting from scratch.
Once a feature is modified, the computer-based map instantly reflects the change the
next time the feature is viewed. Interactive maps allow the user to view the precise
area they are interested in, rather than be confined by the dimensions of a printed
page. The user can also choose to view only certain pieces of content. The map-
maker doesn’t have to guess which information the viewer wants to see but can make
it possible for the reader to choose.
23. This is the Title of the Book, eMatter Edition
2 | Chapter 1: Introduction to Digital Mapping
Instead of focusing on the details of a particular area of the world to map, the digital
mapmaker can focus on how to best present information. This is much like the dif-
ference between an author and a web page designer. When you move into the digital
realm, the focus is more on helping others find information rather than presenting
static representations of information, as on a printed page. Today’s mapmaker is
often a web site developer, programmer, or some sort of geographic information ana-
lyst. Her focus is on managing and presenting information to a specific audience, be
it in finance, forestry, or national defense, for instance.
The Difficulties of Making Maps
If you’ve worked with maps, digital or conventional, you’ll know that despite my
enthusiasm, mapping isn’t always easy. Why do we often find it so difficult to make
maps of the world around us? How well could you map out the way you normally
drive to the supermarket? Usually, it’s easier to describe your trip than it is to draw a
map. Perhaps we have a perception of what a map must look like and therefore are
afraid to draw our own, thinking it might look silly in comparison. Yet some maps
drawn by a friend on a napkin might be of more use than any professional city map
could ever be.
Personal Maps
The element of personal knowledge, rather than general knowledge, is what can
make a somewhat useful map into one that is very powerful. When words fail to
describe the location of something that isn’t general knowledge, a map can round
out the picture for you. Maps can be used to supplement a verbal description, but
because creating a map involves drawing a perspective from your head, it can be very
intimidating. That intimidation and lack of ownership over maps has created an
interesting dilemma. In our minds, maps are something that professionals create, not
the average person. Yet a map like the one shown in Figure 1-1 can have much more
meaning to someone than a professional map of the same area. So what are the pro-
fessional maps lacking? They show mostly common information and often lack per-
sonal information that would make the map more useful or interesting to you.
Technology Barriers
Digital mapping isn’t a new topic. Ever since computers could create graphic repre-
sentations of the earth, people have been creating maps with them. In early comput-
ing, people used to draw with ASCII text-based maps. (I remember creating ASCII
maps for role-playing games on a Tandy color computer.) However, designing graph-
ics with ASCII symbols wasn’t pretty. Thankfully, more sophisticated graphic tech-
niques on personal computers allow you to create your own high-quality maps.
24. This is the Title of the Book, eMatter Edition
The Difficulties of Making Maps | 3
You might already be creating your own maps but aren’t satisfied with the tools. For
some, the cost of commercial tools can be prohibitive, especially if you just want to
play around for a while to get a feel for the craft. Open source software alleviates the
need for immediate, monetary payback on investment.
For others, cost may not be an issue but capabilities are. Just like proprietary soft-
ware, open source mapping products vary in their features. Improved features might
include ease of use or quality of output. One major area of difference is in how prod-
ucts communicate with other products. This is called interoperability and refers to
the ability of a program to share data or functions with another program. These
often adhere to open standards—protocols for communication between applica-
tions. The basic idea is to define standards that aren’t dependent on one particular
software package; they would depend instead on the communication process a devel-
oper decided to implement. An example of these standards in action is the ability of
your program to request maps from another mapping program over the Internet. The
real power of open standards is evident when your program can communicate with a
program developed by a different group/vendor. This is a crucial issue for many large
organizations, especially government agencies, where sharing data across depart-
ments can make or break the efficiency in that organization. Products that imple-
ment open standards will help to ensure the long-term viability of applications you
build. Be warned, however, that some products claim to be interoperable yet stop
Figure 1-1. A personal map drawn by Ryan Mendenhall showing Chicago Heights, Illinois, U.S.A.;
this map is courtesy of Lori Napoleon’s maps project web site: http://www.subk.net/maps.html
25. This is the Title of the Book, eMatter Edition
4 | Chapter 1: Introduction to Digital Mapping
short of implementing the full standards. Some companies modify the standards for
their product, defeating the purpose of those standards. Interoperability standards
are also relatively young and in a state of flux.
Costs and capabilities may not be the main barrier for you. Maybe you want to cre-
ate your own maps but don’t know how. Maybe you don’t know what tools are
available. This book describes some of the free tools available to you, to get you
moving toward your end goal of map production.
Another barrier might be that you lack the technical know-how required for digital
mapping. While conventional mapping techniques cut out most of the population,
digital mapping techniques also prohibit people who aren’t very tech-savvy. This is
because installing and customizing software is beyond the scope of many computer
users. The good news is that those who are comfortable with the customization side
of computerized mapping can create easy-to-use tools for others. This provides great
freedom for both parties. Those who have mastered the computer skills involved
gain by helping fill other’s needs. New users gain by being able to view mapping
information with minimal effort through an existing mapping application.
Technological barriers exist, but for those who can use a computer and want to do
mapping with that computer, the possibilities are endless. The mapping tools described
here aren’t necessarily easy to use: they require a degree of technical skill. Web
Open Source Software
Open source software refers to a type of software product that has the programming
source code available. This may not seem important for nonprogrammers, but it has
very serious implications in today’s software industry. Programmers who decide to
release their work as open source choose an open source license to cover their program.
In most cases, these licenses help make the program freely available.
There are thousands of programmers and supporters of open source projects. They
come from government agencies, nonprofit groups, academia, and even private indus-
try. Some businesses make all their source code openly available, and their clients sim-
ply pay for them to make improvements to the code.
Public and private groups have been working on mapping or geographic information
system (GIS) projects and releasing them as open source. This means that the program
itself is free and, if you have the ability and desire, you can modify it to suit your needs.
The key to open source software is freedom—freedom to use and change a program as
required. This book focuses on open source mapping and GIS tools.
For more information on open source software see the following resources:
• Open Source Initiative web site: http://opensource.org/
• O’Reilly’s Open Sources: http://www.oreilly.com/catalog/opensources/
• Open Source Geospatial: http://www.osgeo.org
26. This is the Title of the Book, eMatter Edition
Different Kinds of Web Mapping | 5
mapping programs are more complicated than traditional desktop software. There are
often no simple, automated installation procedures, and some custom configuration is
required. But in general, once set up, the tools require minimal intervention.
Different Kinds of Web Mapping
One very effective way to make map information available to a group of nontechni-
cal end users is to make it available through a web page. Web mapping sites are
becoming increasingly popular. There are two broad kinds of web mapping applica-
tions: static and interactive.
Static maps displayed as an image on a web page are quite common. If you already
have a digital map (e.g., from scanning a document), you can be up and running very
quickly with a static map on your web page. Basic web design skills are all you need
for this because it is only a single image on a page.
This book doesn’t teach web design skills. O’Reilly has other books
that cover the topic of web design, from basic to advanced, including:
Learning Web Design, Web Design in a Nutshell, HTML and XHTML:
The Definitive Guide, and many more.
Interactive maps aren’t as commonly seen because they require specialized skills to
keep such sites up and running (not to mention the potential costs of buying off-the-
shelf software). The term interactive implies that the viewer can somehow interact
with the map. This can mean selecting different map data layers to view or zooming
into a particular part of the map that you are interested in. All this is done while
interacting with the web page and a map image that is repeatedly updated. For exam-
ple, MapQuest is an interactive web mapping program for finding street addresses
and driving directions. You can see it in action at http://www.mapquest.com.
Interactive maps that are accessed through web pages are referred to as web-based
maps or simply web maps. These maps can be very powerful, but as mentioned, they
can also be difficult to set up due to the technical skills required for maintaining a
web server, a mapping server/program and management of the underlying map data.
As you can see, these types of maps are fundamentally different from static maps
because they are really a type of web-based program or application. Figure 1-2 shows
a basic diagram of how an end user requests a map through a web mapping site and
what happens behind the scenes. A user requests a map from the web server, and the
server passes the request to the web mapping server, who then pulls together all the
data. The map is passed all the way back to the end user’s web browser.
27. This is the Title of the Book, eMatter Edition
6 | Chapter 1: Introduction to Digital Mapping
Web Map Users
Generally speaking, there are two types of people who use web maps: service provid-
ers and end users.
For instance, I am a service provider because I have put together a web site that has an
interactive mapping component. One of the maps available to my end users shows the
locations of several hurricanes. I’m safely tucked away between the Rocky and Coastal
mountain ranges in western Canada, so I wouldn’t consider myself a user of the hurri-
cane portion of the site. It is simply a service for others who are interested.
An end user might be someone who is curious about where the hurricanes are, or it
may be a critical part of a person’s business to know. For example, they may just
wonder how close a hurricane is to a friend’s house or they may need to get an idea
of which clients were affected by a particular hurricane. This is a good example of
how interactive mapping can be broadly applicable yet specifically useful.
End-user needs can vary greatly. You might seek out a web mapping site that pro-
vides driving directions to a particular address. Someone else might want to see an
aerial photo and topographic map for an upcoming hiking trip. Some end users have
a web mapping site created to meet their specific needs, while others just look on the
Internet for a site that has some capabilities they are interested in.
Figure 1-2. A diagram of how a mapping web site interacts with the end user and the back-end
programs running on the servers
Desktop computer
accessing a
mapping website
Web server pulling
together pages
with maps
Web mapping
server creating
maps
A server storing
mapping data
Requestmap
Receivemap
28. This is the Title of the Book, eMatter Edition
Different Kinds of Web Mapping | 7
Service providers can have completely different purposes in mind for providing a web
map. A service provider might be interested in off-loading some of the repetitive
tasks that come his way at the office. Implementing a web mapping site can be an
excellent way of taking previously inaccessible data and making it more broadly
available. If an organization isn’t ready to introduce staff to more traditional GIS
software (which can have a steep learning curve), having one technical expert main-
tain a web mapping site is a valuable service.
Another reason a service provider might make a web mapping site available is to
more broadly disseminate data without having to transfer the raw data to clients. A
good example of this is my provincial government, the Province of British Columbia,
Canada. They currently have some great aerial photography data and detailed base
maps, but if you want the digital data, you have to negotiate a data exchange agree-
ment or purchase the data from them. The other option is to use one of their web
mapping sites. They have a site available that basically turns mapping into a self-
serve, customizable resource; check it out at: http://maps.gov.bc.ca.
Web Sites with a Web Mapping Component
There are many web mapping sites available for you to use and explore. Table 1-1
lists a few that use software or apply similar principles to the software described in
this book.
Figures 1-3, 1-4, and 1-5 show the web pages of three such sites. They show how
diverse some MapServer applications can be, from street-level mapping to statewide
overviews.
Table 1-1. A few MapServer-based web sites that have interactive mapping
Web site Description
http://www.dmsolutions.ca/solutions/
tsunami.html
Tsunami disaster mapping site
http://topozone.com/ Portal to U.S. topographic, imagery, and street maps
http://www.dnr.state.mn.us/maps/ Various recreational and natural resource mapping applications for
the state of Minnesota, U.S.A.
http://wa.mapitout.com Mapping Project in Winnipeg
http://www.gommap.org/ PortaltoGulfofMaine(U.S.A.)mappingapplicationsandwebservices
http://www.mapsherpa.com/hawaii2/ Comprehensive atlas of Hawaii, U.S.A.
http://mesonet.tamu.edu/ Real-time U.S.A. weather maps
http://gallery.openlayers.org/
?tag=mapserver
OpenLayers web client gallery that use MapServer web services
29. This is the Title of the Book, eMatter Edition
8 | Chapter 1: Introduction to Digital Mapping
Figure 1-3. The MapServer-based restaurant mapping application from MapItOut
Figure 1-4. A MapServer-based tourism application for Hawaii from MapSherpa
30. This is the Title of the Book, eMatter Edition
Different Kinds of Web Mapping | 9
Of course, not all maps out there are built with MapServer; Table 1-2 lists other
mapping sites that you may want to look to for inspiration.
Figure 1-5. A web map for finding recreation sites in Minnesota, U.S.A.
Table 1-2. Some popular web mapping sites or resources, not built with MapServer
Web site Description
http://nationalatlas.gov U.S. portal to maps and mapping data
http://www.multimap.com/ Locate hotels, tourism, and street maps
http://www.
geographynetwork.com/
Portal to applications and data
http://mappoint.msn.com Search for a place; find an address
http://www.mapquest.com/ Find an address; plan a route
http://www.moximedia.com:
8080/imf-ows/imf.
jsp?site=ms_users
Maps showing the location of some MapServer users
http://davidrumsey.com/ Thousands of rare/antique maps
http://maps.yahoo.com/ Find an address; get driving directions, or check real-time traffic
http://maps.google.com/ Google maps that focus on North America and require Windows
http://toporama.cits.rncan.
gc.ca/
Canadian topographic maps and aerial photos
http://geodiscover.cgdi.ca/
http://geogratis.gc.ca/
http://atlas.gc.ca/
Canadian portals to geographic information and services; include premade maps
31. This is the Title of the Book, eMatter Edition
10 | Chapter 1: Introduction to Digital Mapping
Behind the web page
To some people, web mapping sites may appear quite simple, while to others, they
look like magic. The inner workings of a web mapping site can vary depending on
the software used, but there are some common general concepts:
• The web server takes care of web page requests and provides pages with images,
etc. included, back to the requestor.
• The web mapping server accepts requests relayed from the web server. The
request asks for a map with certain content and for a certain geographic area. It
may also make requests for analysis or query results in a tabular form. The web
mapping server program then creates the required map images (or tabular data)
and sends them back to the web server for relay back to the end user.
• The web mapping server needs to have access to the data sources required for
the mapping requests, as shown in Figure 1-2. This can include files located on
the same server or across an internal network. If web mapping standards are
used, data can also come from other web mapping servers through live requests.
More information on the process of web mapping services can be found in Chapters
4, 11, and 12: those chapters discuss MapServer in depth.
Making your own web mapping site
This book will teach about several of the components necessary to build your web
mapping site, as well as general map data management. To give you an overview of
the kinds of technology involved, here are some of the basic requirements of a web
mapping site. Only the web mapping server and mapping data components from this
list are discussed in this book.
A computer
This should be a given, but it’s worth noting that the more intensive the web
mapping application you intend to host, the more powerful the computer you
will want to have. Larger and more complex maps take longer to process; a
faster processor completes requests faster. Internet hosting options are often too
simplistic to handle web mapping sites, since you need more access to the under-
lying operating system and web server. Hosting services specifically for web
mapping may also be available. The computer’s operating system can be a bar-
rier to running some applications. In general, Windows and Linux operating sys-
tems are best supported, whereas Mac OS X and other Unix-based systems are
less so.
An Internet connection
It is conceivable that you would have a web mapping site running just for you or
for an internal (i.e., corporate) network, but if you want to share it with the pub-
lic, you need a publicly accessible network connection. Some personal Internet
accounts limit your ability to host these types of services, requiring additional
32. This is the Title of the Book, eMatter Edition
Different Kinds of Web Mapping | 11
business class accounts that carry a heavier price tag. Performance of a web map-
ping site largely depends on the bandwidth of the Internet connection. If, for
example, you produce large images (that have larger file sizes), though they run
instantaneously on your computer, such images may take seconds to relay to an
end user.
A web server
A web server is needed to handle the high-level communications between the
end user (who is using a web browser to access your mapping site) and the
underlying mapping services on your computer. It presents a web page contain-
ing maps and map-related tools to the end user. Two such servers are Apache
HTTP Server (http://httpd.apache.org/) and Microsoft Internet Information Ser-
vices (IIS) (http://www.microsoft.com/WindowsServer2003/iis/default.mspx). If
you use an Internet service provider to host your web server, you may not be
able to access the required underlying configuration settings for the software.
A web mapping server
The web mapping server is the engine behind the maps you see on a web page.
The mapping server or web mapping program needs to be configured to commu-
nicate between the web server and assemble data layers into an appropriate image.
This book focuses on MapServer, but there are many choices available.
Mapping data
A map isn’t possible without some sort of mapping information for display. This
can be satellite imagery, database connections, GIS software files, text files with
lists of map coordinates, or other web mapping servers over the Internet. Map-
ping data is often referred to as spatial or geospatial data and can be used in an
array of desktop mapping programs or web mapping servers.
Mapping metadata
This isn’t a basic requirement, but I mentioned it here because it will emerge as a
major requirement in the future. Metadata is data about data. It often describes
where the mapping data came from, how it can be used, what it contains, and
who to contact with questions. As more and more mapping data becomes avail-
able over the Internet, the need for cataloging the information is essential. Ser-
vices already exist that search out and catalog online data sources so others can
find them easily.
Over the course of this book, you’ll learn to assemble these components into your
own interactive mapping service.
33. This is the Title of the Book, eMatter Edition
12
Chapter 2
CHAPTER 2
Digital Mapping Tasks and Tools
Maps can be beautiful. Some antique maps, found today in prints, writing paper, and
even greeting cards, are appreciated more for their aesthetic value than their original
cartographic use. The aspiring map maker can be intimidated by these masterpieces
of science and art. Fortunately, the mapping process doesn’t need to be intimidating
or mystical.
Before you begin, you should know that all maps serve a specific purpose. If you
understand that purpose, you’ve decoded the most important piece of a mapping
project. This is true regardless of how the map is made. Traditional tools were pen
and ink, not magic. Digital maps are just a drawing made up of points strung
together into lines and shapes, or a mosaic of colored squares.
The purpose and fundamentals of digital mapping are no different and no more com-
plex than traditional mapping. In the past, a cartographer would sit down, pull out
some paper, and sketch a map. Of course, this took skill, knowledge, and a great
deal of patience. Using digital tools, the computer is the canvas, and software tools
do the drawing using geographic data as the knowledge base. Not only do digital
tools make more mapping possible, in most cases digital solutions make the work
ridiculously easy.
This chapter explores the common tasks, pitfalls, and issues involved in creating
maps using computerized methods. This includes an overview of the types of tasks
involved with digital mapping—the communication of information using a variety of
powerful media including maps, images, and other sophisticated graphics. The goals
of digital mapping are no different than that of traditional mapping: they present geo-
graphic or location-based information to a particular audience for a particular pur-
pose. Perhaps your job requires you to map out a proposed subdivision. Maybe you
want to show where the good fishing spots are in the lake by your summer cabin.
Different reasons yield the same desired goal: a map.
34. This is the Title of the Book, eMatter Edition
Common Mapping Tasks | 13
For the most part, the terms geographic information and maps can be used inter-
changeably, but maps usually refer to the output (printed or digital) of the mapping
process. Geographic information refers to digital data stored in files on a computer
that’s used for a variety of purposes.
When the end product of a field survey is a hardcopy map, the whole process results
in a paper map and nothing more. The map might be altered and appended as more
information becomes available, but the hardcopy map is the final product with a sin-
gle purpose.
Digital mapping can do this and more. Computerized tools help collect and interact
with the map data. This data is used to make maps, but it can also be analyzed to
create new data or produce statistical summaries. The same geographic data can be
applied to several different mapping projects. The ability to render the same informa-
tion without compiling new field notes or tracing a paper copy makes digital map-
ping more efficient and more fun.
Digital mapping applies computer-assisted techniques to a wide range of tasks that tra-
ditionally required large amounts of manual labor. The tasks that were performed are
no different than those of the modern map maker, though the approach and tools vary
greatly. Figure 2-1 shows a conceptual diagram of the digital mapping process.
Common Mapping Tasks
The process that produces a map requires three basic tasks: quantifying observa-
tions, locating the position of your observations, and visualizing the locations on a
map. Digital tools have made these tasks more efficient and more accurate.
Quantifying observations
Measuring equipment such as laser range finders or imaging satellites provide
discrete measurements that are less affected by personal interpretations. Tradi-
tional observations, such as manual photo interpretation or drawing features by
hand, tend to introduce a biased view of the subject.
Figure 2-1. Digital maps are made using a mapping program that accesses mapping data and gives
the resulting map back to the user
Map data source Mapping program Map product
35. This is the Title of the Book, eMatter Edition
14 | Chapter 2: Digital Mapping Tasks and Tools
Locating positions of observations
Geographic referencing tools such as GPS receivers link on-the-earth locations to
common mapping coordinate systems such as latitude and longitude. They cal-
culate the receiver’s location using satellite-based signals that help the GPS
receiver calculate its location relative to satellites whose positions are well
known. They act as a type of digital benchmark rather than using traditional sur-
vey or map referencing (best guess) methods. Traditional astronomical measure-
ments or ground-based surveying techniques were useful but we now have
common, consistent, and unbiased methods for calculating location.
Visualizing these locations on a map
Desktop mapping programs allow the user to compare location information with
digital base map data. Traditional hand-drawn paper maps can’t compete with
the speed and flexibility of digital desktop mapping programs. Of course, digital
mapping data is needed to do the job, but once data is available, infinite rendi-
tions of maps using the same base data is possible.
If a tool described here isn’t effective, other tasks are affected. For example, poor
recording of observations can still produce a map, but its accuracy is questionable.
The end goal of mapping is to present information about our observations of the
world. The better that can be done, the better the goal has been met. When these
tools are working together, the cartographic process can be very efficient.
Common Pitfalls, Deadends, and Irritations
Many maps can now be created in the safety of a home or office without the need to
sail the seas to chart new territories. The traditional, nondigital methods of survey-
ing to produce maps held certain dangers that are quite different from those of today.
However, digital mapping has its own problems and irritations. The pitfalls today
may not involve physical danger but instead involve poor quality, inappropriate data,
or restricted access to the right kind of information.
Finding Good Source Data
A bad map isn’t much better than a blank map. This book doesn’t discuss good map
design (the art of cartography), but an equally important factor plays into digital
mapping: the quality of source data. Because maps are based on some sort of source
data, it is imperative to have good quality information at the beginning. The maxim
garbage in, garbage out definitely applies; bad data makes for bad maps and analysis.
This is discussed in more detail in Chapter 5.
36. This is the Title of the Book, eMatter Edition
Common Pitfalls, Deadends, and Irritations | 15
Dependency on Digital Tools
With the advent of digital mapping has come the loss of many traditional mapping
skills. While digital tools can make maps, there are some traditional skills that are
helpful. You might think that training in digital mapping would include the theory
and techniques of traditional mapping processes, but it often doesn’t. Today, many
who do digital mapping are trained to use only a specific piece of software. Take
away that software or introduce a large theoretical problem, and they may be lost.
Map projection problems are a good example. If you don’t understand how projec-
tions work, you can severely degrade the quality of your data when reprojecting and
merging datasets as described in Chapter 8 and discussed in Appendix A.
Another example would be the ignorance of geometric computations. It was quite
humiliating to realize that I didn’t know how to calculate the area of an irregular
polygon; nor was it even common knowledge to my most esteemed GIS colleagues.
Figure 2-2 shows a range of common shapes and the formulae used to calculate their
area.
Many of the calculations were taught in elementary school but not for the irregular
polygon. It doesn’t use a simple formula, and there are multiple ways to calculate the
area. One method is to triangulate all the vertices that make up the polygon bound-
ary and then calculate and sum the area of all those triangles. You can see why we let
the computer do this kind of task!
Figure 2-2. How to calculate the area of common shapes, including a square, circle, triangle, and
the infamous irregular polygon
LengthxHeight
1/2(LengthxHeight) ?
x Radius2
37. This is the Title of the Book, eMatter Edition
16 | Chapter 2: Digital Mapping Tasks and Tools
It was rather amusing to realize that we used digital tools to calculate areas of poly-
gons all the time but had little or no idea of how it was done. On the other hand it
was disconcerting to see how much of our thinking was relegated to the computer.
Most of us could not even verify computed answers if we wanted to!
Digital mapping and GIS need to become more than just a tool for getting to the end
goal. More theory and practice of manual skills would better enable the map maker
and analyst to use digital tools in a wise manner. It goes without saying that our
dependency on digital tools doesn’t necessarily make us smarter. Because this book
doesn’t teach cartographic theory, I recommend you find other texts that do. There
are many available, including:
• M.J. Kraak and F.J. Ormeling. Cartography: Visualization of Spatial Data. Lon-
don: Longman. 1996.
• Alan M. MacEachren. Some Truth with Maps. Washington: Penn State. 1994.
Understanding Data Formats
There are many different mapping data formats in use today. In order to use map
data effectively you must understand what format your data is in, and you must
know what data format you need. If the current format isn’t suitable, you must be
able to convert it to an intermediate format or store it in a different manner.
The range of different software and data formats is confusing. Many
different vendors have created their own proprietary data formats.
This has left users tied to a format as long as they use that product.
Vendors are starting to work together to develop some independent
standards, which will help those using data with their products.
Make sure you understand what task you are going to need the source data for. Will
you be printing a customized map and combining it with other pieces of data, or will
you simply view it on the screen? Will you need to edit the data or merge it with
other data for analysis? Your answers to these questions will help you choose the
appropriate formats and storage methods for your tasks.
Using the Right Tools
There are numerous digital mapping tools available. This makes the choice of any
given tool difficult. Some think that the biggest, most expensive tools are the only
way to go. They may secretly believe that the product is more stable or better sup-
ported (when, in fact, it may just be slick marketing). Choosing the right tool for the
job is very difficult when you have so many (seemingly) comparable choices. For
example, sometimes GIS tools are used when a simple drawing program may have
38. This is the Title of the Book, eMatter Edition
Identifying the Types of Tasks for a Project | 17
been more effective, but this was never considered because the users were thinking in
terms of a GIS software package.
Examples of extreme oversimplification and extreme complexity are frequently
found when using mapping and GIS software. You can see the best example of this
problem when comparing computer-aided design (CAD) technicians and GIS ana-
lysts. GIS analysts often maintain very modular, relatively simple pieces of data
requiring a fair bit of work to make a nice visual product. CAD users have a lot of
options for graphical quality, but often lack easy-to-use analytical tools. The com-
plexity of trying to understand how to style, move, or edit lines, etc., makes many
CAD programs difficult to use. Likewise, the complexities of data management and
analytical tools make some GIS software daunting.
Identifying the Types of Tasks for a Project
Just like carpenters, map makers know the value of using the right tool for the job.
The digital map maker has a variety of tools to choose from, and each tool is
designed for a certain task. Many tools can do one or two tasks well, and other tasks
moderately well or not at all. There are five different types of tools used in digital
mapping and its related disciplines. These are general categories which often overlap.
Viewing and Mapping
Viewing and mapping data aren’t necessarily the same thing. Some applications are
intended only for visualizing data, while others target map production. Map produc-
tion is more focused on a high-quality visual product intended for print. In the case
of this book, viewing tools are used for visually gathering information about the map
data—how the data is laid out, where (geographically) the data covers, comparing it
to other data, etc.
Mapping tools are used to publish data to the Internet through web mapping applica-
tions or web services. They can also be used to print a paper map. The concepts of
viewing and mapping can be grouped together because they both involve a graphic
output/product. They tend to be the final product after the activities in the following
categories are completed.
Analysis
Just viewing maps or images isn’t usually the final goal of a project. Certain types of
analysis are often required to make data visualization more understandable or pre-
sentable. This includes data classification (where similar features are grouped
together into categories), spatial proximity calculations (features within a certain dis-
tance of another), and statistical summary (grouping data using statistical functions
39. This is the Title of the Book, eMatter Edition
18 | Chapter 2: Digital Mapping Tasks and Tools
such as average or sum). Analysis tends to summarize information temporarily,
whereas manipulating data can change or create new data.
Creating and Manipulating
This category can include creating features, which uses a process often referred to as
digitizing. These features may be created as a result of some sort of analysis. For
example, you might keep features that are within a certain study area.
You can manipulate data with a variety of tools from command-line programs to
drag and drop–style graphical manipulation. Many viewing applications can’t edit
features. Those that can edit often create new data only by drawing on screen (a.k.a.
digitizing) or moving features. Some products have the ability to do more, such as
performing buffering and overlap analysis or grouping features into fewer, larger
pieces. Though these are common in many commercial products, open source desk-
top GIS products with these capabilities are just starting to appear.
Conversion
Certain applications require data to be in certain file or database formats. This is par-
ticularly the case in the commercial world where most vendors support their own
proprietary formats with marginal support for others. This use of proprietary data
formats has led to a historic dependency upon a vendor’s product. Fortunately,
recent advances in the geomatics software industry have led to cross-application sup-
port for more competitor formats. This, in turn, has led to interoperable vendor-neu-
tral standards through cooperative organizations such as the Open Geospatial
Consortium (OGC). The purpose of the OGC and their specifications are discussed
in more detail in Chapter 12.
Source data isn’t always in the format required by viewing or manipulating applica-
tions. If you receive data from someone who uses a different mapping system, it’s
more than likely that conversion will be necessary. Output data that may be created
by manipulation processes isn’t always in the format that an end user or client may
require. Enter the role of data conversion tools that convert one format into another.
Data conversion programs help make data available in a variety of formats. There are
some excellent tools available, and there are also support libraries for applications,
making data conversion unnecessary. Data access libraries allow an application to
access data directly instead of converting the data before using it with the application.
Some examples of these libraries are discussed later in this chapter. For an excellent
commercial conversion tool, see Safe Software’s Feature Manipulation Engine (FME)
at http://safe.com.
40. This is the Title of the Book, eMatter Edition
Identifying the Types of Tasks for a Project | 19
Sharing
You are probably reading this book because you desire to share maps and mapping
data. There is a certain pleasure in creating and publishing a map of your own.
Because of the variety of free tools and data now available, this is no longer just a
dream.
This book addresses two aspects of that sharing. First, sharing maps (static or inter-
active) through web applications and second, using web service specifications for
sharing data between applications.
The term web mapping covers a wide range of applications and processes. It can
mean a simple web page that shows a satellite image or a Flash-based application
with high levels of interaction, animations, and even sound effects. But, for the most
part, web mapping implies a web page that has some sort of interactive map compo-
nent. The web page may present a list of layers to the user who can turn them on or
off, changing the map as he sees fit. The page may also have viewing tools that allow
a user to zoom in to the map and view more detail.
The use of Open Geospatial Consortium (OGC) web services (OWS) standards
allow different web mapping applications to share data with each other or with other
applications. In this case, an application can be web-enabled but have no graphical
mapping interface component riding on top of it. Instead, using Internet communi-
cation standards other applications can make a request for data from the remote web
service. This interoperability enables different pieces of software to talk to each other
without needing to know what kind of server is providing the information. These
abilities are still in their infancy, particularly with commercial vendors, but several
organizations are already depending on them. Standardized web services allows orga-
nizations to avoid building massive central repositories, as well as access data from
the source. They also have more freedom when purchasing software, with many
more options to choose from. OWS is an open standard for sharing and accessing
information; therefore organizations are no longer tied to a particular vendor’s data
format. The software needs only to support OWS. For example, Figure 2-3 shows a
map created from multiple data sources. Several layers are from a copy of map data
that the mapping program accesses directly. The other two layers are from OWS
data sources: one from a company in The Netherlands (elevation shading), and the
other (weather radar imagery) from a university in the United States.
41. This is the Title of the Book, eMatter Edition
20 | Chapter 2: Digital Mapping Tasks and Tools
Figure 2-3. A map made from multiple remote servers using an OWS specification
Final map Local data files
http://www.demis.nl/ http://mesonet.agron.iastate.edu/
42. This is the Title of the Book, eMatter Edition
21
Chapter 3
CHAPTER 3
Converting and Viewing Maps
While presenting maps on the Web is fantastic, the data for those maps has to come
from somewhere. You’ll also want to have a toolkit for creating or modifying maps
to fit your needs, especially if you’re developing in an environment that isn’t already
GIS-oriented. This chapter introduces end-user applications for viewing and sharing
data as well as low-level tools for data access and conversion.
While many other open source GIS and mapping tools exist, this chapter covers the
small selection used throughout the remainder of this book. While many other excel-
lent options exist, the sample of tools described here are robust enough for profes-
sional use. These free and open source GIS/mapping products are successfully used
throughout industry, government, and academia.
For more general information and links to other tools, see the following reference
web sites:
http://freegis.org
http://opensourcegis.org
http://maptools.org
If you have the funds or already have the tools, you can, of course, use proprietary
GIS software to create the data you’ll be presenting with open source software. One
of the best features of the open source tools is their ability to work with data created
by proprietary applications and stored in proprietary formats.
Raster and Vector
The terms raster and vector are used throughout this chapter. They both refer to spe-
cific types of data. Raster data is organized as a matrix or grid that has rows and col-
umns; each row/column intersection is a cell or pixel. Each cell has a value, for
example, an elevation. Images and digital elevation models are rasters. They are a
specific number of pixels high and wide, with each pixel representing a certain size
43. This is the Title of the Book, eMatter Edition
22 | Chapter 3: Converting and Viewing Maps
on the ground; for example, Landsat satellite images are 185 × 185 km in size. Each
pixel is 30 × 30 m in size.
Vector data is represented as coordinates that define points or points that are strung
together to make lines and polygons. This data often has an associated table of infor-
mation, one for every feature (point, line, or polygon) in the dataset. Keeping these dis-
tinctions in mind will help you better understand the remaining parts of this chapter.
OpenEV
OpenEV is a powerful open source desktop viewer. It allows users to explore data in
any of the image and vector data formats supported by the Geospatial Data Abstrac-
tion Library (GDAL/OGR), which will be introduced later in the chapter. OpenEV
can be used for custom image analysis as well as drawing simple maps and creating
new data. OpenEV comes as part of the FWTools package, available at http://fwtools.
maptools.org.
Many users overlook OpenEV’s ability to view and navigate in real time through
images draped over 3D landscapes. Figure 3-1 shows an example of an image being
viewed with OpenEV, and Figure 3-2 shows the same image but modified with one
of the OpenEV image enhancement tools.
OpenEV is a good example of how GDAL/OGR capabilities can be accessed through
other programming languages. OpenEV is built using Python, which makes OpenEV
extensible and powerful because it has the flexibility of that language running behind
it. The most powerful feature of OpenEV may be its ability to use Python capabili-
ties within OpenEV; this allows access to GDAL/OGR functions and to any other
Python module you need.
MapServer
MapServer is the primary open source web mapping tool used in this book. The
main MapServer site is at http://mapserver.gis.umn.edu. The web site will eventually
move to http://mapserver.osgeo.org and some URLs in this book may change.
There are numerous reasons people decide to use MapServer. One is the ability to
make their mapping information broadly accessible to others, particularly over the
Internet. Many GIS and mapping analysts need to create custom mapping products
for those they support or work for; MapServer makes it possible for users to create
maps without needing particular tools installed or assistance from mapping analysts.
This in turn reduces the pressure on specialized staff.
Others come to MapServer because it is one of few solutions available for those with
diverse data formats. MapServer, through the use of libraries such as GDAL/OGR,
can access various data formats without data conversion.
44. This is the Title of the Book, eMatter Edition
MapServer | 23
Consider that you could have a collection of 10 different sets of mapping data, all of
which need to appear on the same map simultaneously without any of the data being
converted from its native format. The native formats can include those used by dif-
ferent commercial vendors. ESRI shapefiles, Intergraph Microstation design files
(DGN), MapInfo TAB files, and Oracle spatial databases can all be mapped together
without conversion. Other nonproprietary formats can be used as well, including the
OGC standards for Geography Markup Language (GML), Web Map Server (WMS),
Web Feature Server (WFS), and PostGIS and other databases. The ability to have
simultaneous access to diverse data formats on the fly without conversion makes
MapServer one of the only options for those who can’t (or won’t) do a wholesale
conversion to a specific format.
Figure 3-1. A raw Landsat satellite image being viewed with OpenEV
45. This is the Title of the Book, eMatter Edition
24 | Chapter 3: Converting and Viewing Maps
Data Access and Performance
MapServer supports a variety of formats. Some are native to the MapServer execut-
able, while others are accessed through the GDAL/OGR libraries. The latter
approach is necessary for formats not programmed directly into MapServer. Access
through the libraries adds an extra level of communication between MapServer and
the data source itself (which can cause poor performance in some cases).
In general, formats supported natively by MapServer should run faster than those
using GDAL/OGR. For example, the most basic format MapServer uses is the ESRI
shapefile or GeoTiff image. OGR supports the U.S. Census TIGER file format. The
performance difference between loading TIGER or shapefiles can be considerable.
Figure 3-2. A Landsat satellite image being viewed with OpenEV and an equalization enhancement
46. This is the Title of the Book, eMatter Edition
Geospatial Data Abstraction Library (GDAL) | 25
However, using GDAL/OGR may not be the problem. Further investigation shows
that the data formats are often the bottleneck. If the data in a file is structured in a
way that makes it difficult to access or requires numerous levels of interpretation, it
affects map drawing speed.
The general rule of thumb for best performance is to use ESRI shapefile format or Geo-
Tiff image format. Because gdal_translate and ogr2ogr can write into these formats,
most source data can be translated using these tools. If you access data across a net-
work, storing data in the PostGIS database may be the best option. Because PostGIS
processes your queries for data directly on the server, only the desired results are sent
back over the network. With file-based data, more data has to be passed around, even
before MapServer decides which pieces it needs. Server-side processing in a PostGIS
database can significantly improve the performance of MapServer applications.
Wholesale conversions aren’t always possible, but when tweaking performance,
these general rules may be helpful.
Portability
MapServer and its supporting tools are available for many hardware and operating
systems. Furthermore, MapServer functionality can be accessed through a variety of
programming language interfaces, making it possible to integrate MapServer func-
tionality into custom programs. MapServer can be used in custom environments
where other web mapping servers may not run.
Because MapServer is open source, developers can improve, fix, and customize the
actual code behind MapServer and port it to new operating systems or platforms. In
fact, if you require a new feature, a developer can be hired to add it, and everyone in
the community can benefit from the work.
MapServer is primarily a viewing and mapping application; users access maps
through a web browser or other Internet data sharing protocols. This allows for
visual sharing of mapping information and real-time data sharing with other applica-
tions using the OGC specifications. MapServer can perform pseudo data conversion
by reading in various formats and providing access to another server or application
using common protocols. MapServer isn’t an analysis tool, but it can present map-
ping information using different cartographic techniques to visualize the results.
Geospatial Data Abstraction Library (GDAL)
GDAL is part of the FWTools package available at http://fwtools.maptools.org.
GDAL’s home page (http://www.gdal.org) describes the project as:
...a translator library for raster geospatial data formats... As a library, it presents a sin-
gle abstract data model to the calling application for all supported formats.
47. This is the Title of the Book, eMatter Edition
26 | Chapter 3: Converting and Viewing Maps
GDAL (often pronounced goodle) has three important features. First, it supports over
40 different raster formats. Second, it is available for other applications to use. Any
application using the GDAL libraries can access all its supported formats, making
custom programming for every desired format unnecessary. Third, prebuilt utilities
help you use the functionality of the GDAL programming libraries without having to
write your own program.
These three features offer a powerhouse of capability: imagine not worrying about
what format an image is in. With GDAL supporting dozens of formats, the odds are
that the formats you use are covered. Whether you need to do data conversion, dis-
play images in your custom program, or write a new driver for a custom image for-
mat, GDAL has programming interfaces or utilities available to help.
Raster Formats Supported by GDAL
GDAL supports dozens of raster formats. This list is taken from the GDAL web site
formats list page found at http://www.gdal.org/formats_list.html.
Arc/Info Binary Grid (.adf)
Microsoft Windows Device Independent Bitmap (.bmp)
BSB Nautical Chart Format (.kap)
VTP Binary Terrain Format (.bt)
CEOS (Spot, for instance)
First Generation USGS DOQ (.doq)
New Labelled USGS DOQ (.doq)
Military Elevation Data (.dt0, .dt1)
ERMapper Compressed Wavelets (.ecw)
ESRI .hdr labeled
ENVI .hdr labeled Raster
Envisat Image Product (.n1)
EOSAT FAST Format
FITS (.fits)
Graphics Interchange Format (.gif)
Arc/Info Binary Grid (.adf)
GRASS Rasters
TIFF/GeoTIFF (.tif)
Hierarchical Data Format Release 4 (HDF4)
Erdas Imagine (.img)
Atlantis MFF2e
Japanese DEM (.mem)
JPEG, JFIF (.jpg)
JPEG2000 (.jp2, .j2k)
NOAA Polar Orbiter Level 1b Data Set (AVHRR)
Erdas 7.x .LAN and .GIS
48. This is the Title of the Book, eMatter Edition
Geospatial Data Abstraction Library (GDAL) | 27
In Memory Raster
Atlantis MFF
Multi-resolution Seamless Image database
NITF
NetCDF
OGDI Bridge
PCI .aux labeled
PCI Geomatics database file
Portable Network Graphics (.png)
Netpbm (.ppm, .pgm)
USGS SDTS DEM (*CATD.DDF)
SAR CEOS
USGS ASCII DEM (.dem)
X11 Pixmap (.xpm)
This list is comprehensive but certainly not static. If a format you need isn’t listed,
you are encouraged to contact the developers. Sometimes only a small change is
required to meet your needs. Other times it may mean your request is on a future
enhancement waiting list. If you have a paying project or client with a particular
need, hiring the developer can make your request a higher priority. Either way, this is
one of the great features of open source software development—direct communica-
tion with the people in charge of development.
All these formats can be read, but GDAL can’t write to or create new files in all these
formats. The web page shown earlier lists which ones GDAL can create.
Programming Libraries
As mentioned earlier, an important feature of GDAL is its availability as a set of pro-
gramming libraries. Developers using various languages can take advantage of
GDAL’s capabilities, giving them more time to focus on other tasks. Custom pro-
gramming to support formats already available through GDAL isn’t necessary: reus-
ability is a key strength of GDAL.
GDAL’s application programming interface (API) tutorial shows parallel examples of
how to access raster data using C, C++, and Python. You can also use the Simplified
Wrapper and Interface Generator (SWIG) to create interfaces for other program-
ming languages such as Perl, Java, C#, and more. See http://www.swig.org/ for more
information on SWIG.
The ability to directly link to GDAL libraries has helped add features to an array of
GIS and visualization programs both commercial and open source. The GDAL web-
site lists several projects that use GDAL, including FME, MapServer, GRASS, Quan-
tum GIS, Cadcorp SIS, and Virtual Terrain Project.
49. This is the Title of the Book, eMatter Edition
28 | Chapter 3: Converting and Viewing Maps
GDAL Utilities
GDAL also has some powerful utilities. Several command-line data access/manipula-
tion utilities are available. All use the GDAL libraries for tasks such as the following:
gdalinfo
Interrogates a raster/image file and gives information about the file. This com-
mand, when given a raster file/data source name, provides a listing of various
statistics about the data, as shown in the following code:
# gdalinfo vancouver.tif
Driver: GTiff/GeoTIFF
Size is 1236, 1028
Coordinate System is:
PROJCS["NAD83 / UTM zone 10N",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010042,
AUTHORITY["EPSG","7019"]],
AUTHORITY["EPSG","6269"]],
PRIMEM["Greenwich",0],
UNIT["degree (supplier to define representation)",0.01745329251994328],
AUTHORITY["EPSG","4269"]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-123],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AUTHORITY["EPSG","26910"]]
Origin = (480223.000000,5462627.000000)
Pixel Size = (15.00000000,-15.00000000)
Corner Coordinates:
Upper Left ( 480223.000, 5462627.000) (123d16'19.62"W, 49d18'57.81"N)
Lower Left ( 480223.000, 5447207.000) (123d16'16.88"W, 49d10'38.47"N)
Upper Right ( 498763.000, 5462627.000) (123d 1'1.27"W, 49d18'58.96"N)
Lower Right ( 498763.000, 5447207.000) (123d 1'1.10"W, 49d10'39.61"N)
Center ( 489493.000, 5454917.000) (123d 8'39.72"W, 49d14'48.97"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Various pieces of important information are shown here: image format, size,
map projection used (if any), geographic extent, number of colors, and pixel
size. All these pieces of information can be very useful when working with data,
particularly data that is from an external source about which little is known.
gdal_translate
Translates a raster/image between formats. It has numerous powerful functions
such as image resizing, adding ground control points for geo-referencing, and
50. This is the Title of the Book, eMatter Edition
Geospatial Data Abstraction Library (GDAL) | 29
taking subsets of data. This tool can also manipulate any supported format for
other purposes, such as web or graphic design. This is particularly useful when
images are very large and not easily handled by other software.
gdaladdo
Adds overview levels to a file. This feature improves application performance
viewing a file. Applications that are able to read these overviews can then request
appropriate resolutions for the display and map scale without loading the full
resolution of the file into memory. Instead, portions of an image at reduced reso-
lution are quickly provided.
gdalwarp
Takes a source image and reprojects it into a new image, warping the image to fit
the output coordinate system. This is very useful when source data isn’t in the
required coordinate spatial reference system. For example, a geo-referenced sat-
ellite image may be projected into UTM projection with meter units, but the
application requires it to be unprojected in geographic coordinates (latitude/lon-
gitude) measured in degrees.
gdal_merge.py
A very powerful tool that takes multiple input images and stitches them together
into a single output image. It is a Python script that requires the Python inter-
preter software to be installed on your system and the GDAL Python module to
be loaded. This is a good example of how powerful programs can be built on top
of GDAL using higher-level languages such as Python. See http://python.org/ for
more information about the programming language. Recent download packages
of FWTools include GDAL and Python as well. See http://fwtools.maptools.org/.
gdaltindex
Creates or appends the bounds of an image into an index shapefile. You run
gdaltindex with image names as a parameter. GDAL checks the geographic
extents of the image and creates a rectangular shape. The shape and the name of
the image files are then saved to the output shapefile. This image index can be
used by MapServer to define a single layer that is actually made up of more than
one image. It works as a virtual image data source and helps MapServer find the
right image efficiently.
In general, GDAL aids in accessing, converting, and manipulating rasters/images.
When further programming is done using languages such as Python, GDAL can also
serve as a powerful analysis tool. In one sense GDAL can also be used as a rough
viewing tool because it allows conversion into commonly viewable formats (e.g.,
JPEG) for which many non-GIS users may have viewing software.
If you use the GDAL utilities that come with FWTools for Windows,
you will have a desktop icon called FWTools Shell. This launches a
command window for running these utilities.
51. This is the Title of the Book, eMatter Edition
30 | Chapter 3: Converting and Viewing Maps
OGR Simple Features Library
OGR is part of the FWTools package that’s available at http://fwtools.maptools.org.
The OGR project home page (http://www.gdal.org/ogr) describes OGR as:
... a C++ open source library (and command line tools) providing read (and some-
times write) access to a variety of vector file formats including ESRI Shapefiles, S-57,
SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats.
The historical definition of the acronym OGR is irrelevant today, but
it’s used throughout the code base, making it difficult to change.
OGR supports more than 16 different vector formats and has utilities similar to
GDAL’s raster utilities.
Vector Formats Supported by OGR
The following list of the vector data formats supported by OGR was taken from the
OGR formats web page at http://www.gdal.org/ogr/ogr_formats.html. The web page
also shows which formats can be written or only read by OGR.
Arc/Info Binary Coverage
ESRI shapefile
DODS/OPeNDAP
FMEObjects Gateway
GML
IHO S-57 (ENC)
Mapinfo file
Microstation DGN
OGDI vectors
ODBC
Oracle Spatial
PostgreSQL
SDTS
UK .NTF
U.S. Census TIGER/Line
VRT: Virtual Datasource
OGR is part of the GDAL/OGR project and is packaged with GDAL. GDAL deals
with raster or image data, and OGR deals with vector data. GDAL is to painting as
OGR is to connect-the-dot drawings. These data access and conversion libraries
cover the breadth of mapping data.
52. This is the Title of the Book, eMatter Edition
OGR Simple Features Library | 31
OGR Utilities and Examples
Like GDAL, OGR consists of a set of libraries that can be used in applications. It also
comes with some powerful utilities:
ogrinfo
Interrogates a vector dataset and gives information about the features. This can
be done with any format supported by OGR. The following code shows ogrinfo
being used to show information about a shapefile:
# ogrinfo -summary placept.shp placept
Had to open data source read-only.
INFO: Open of `placept.shp'
using driver `ESRI Shapefile' successful.
Layer name: placept
Geometry: Point
Feature Count: 497
Extent: (-140.873489, 42.053455) - (-52.808067, 82.431976)
Layer SRS WKT:
(unknown)
AREA: Real (12.3)
PERIMETER: Real (12.3)
PACEL_: Integer (10.0)
PACEL_ID: Integer (10.0)
UNIQUE_KEY: String (5.0)
NAME: String (50.0)
NAME_E: String (50.0)
NAME_F: String (50.0)
UNIQUE_KEY: String (5.0)
UNIQUE_KEY: String (5.0)
REG_CODE: Integer (2.0)
NTS50: String (7.0)
POP91: Integer (7.0)
SGC_CODE: Integer (7.0)
CAPITAL: Integer (3.0)
POP_RANGE: Integer (3.0)
This example shows many vital pieces of information including geographic
extent of features, a list of the attributes, their types, and how many features are
in the file. Additional parameters can be added that help access desired informa-
tion more specifically.
Running it in different modes (the example shows summary mode) will reveal
more or less detail. A complete listing of all the values and geographic locations
of the features is possible if you remove the -summary option. You can also spec-
ify criteria using standard database query statements (SQL), as shown in the fol-
lowing code. This is a very powerful feature that provides access to spatial data
using a common database querying language. Even file-based OGR data sources
can be queried using SQL statements. This function isn’t limited to database
53. This is the Title of the Book, eMatter Edition
32 | Chapter 3: Converting and Viewing Maps
data sources. For more information on OGR’s SQL query capabilities, see http://
www.gdal.org/ogr/ogr_sql.html.
# ogrinfo placept.shp -sql "select NAME, NTS50, LAT, LONG, POP91 from placept
where NAME = 'Williams Lake'"
OGRFeature(placept):389
NAME (String) = Williams Lake
NTS50 (String) = 093B01
POP91 (Integer) = 10395
POINT (-122.16555023 52.16541672)
ogr2ogr
Takes an input OGR-supported dataset, and converts it to another format. It can
also be used to reproject the data while converting into the output format. Addi-
tional actions such as filtering remove certain features and retain only desired
attributes. The following code shows a simple conversion of a shapefile into
GML format.
# ogr2ogr -f "GML" places.gml placept.shp
This code takes an ESRI shapefile and easily converts it to GML format or from/
into any of the other formats that OGR supports writing to. The power of these
capabilities is surpassed by few commercially available packages, most notably
SAFE Software’s Feature Manipulation Engine (FME).
Note that the syntax for ogr2ogr puts the destination/output filename
first, then the source/input filename. This order can be confusing
when first using the tool. Many command-line tools specify input and
then output.
OGR, like GDAL, aids in accessing, converting, and manipulating data, specifically
vector data. OGR can also be used with scripting languages, allowing programmatic
manipulation of data. GDAL/OGR packages typically come with OGR modules for
Python. In addition to Python bindings, Java and C# support for GDAL/OGR are in
development as of Spring 2005. Perl and PHP support may also be available in the
future.
A PHP extension for OGR is available but isn’t supported or actively
developed. It was developed independent of the main GDAL/OGR
project and is available at: http://dl.maptools.org/dl/php_ogr/. If you
can’t wait for official PHP support through the GDAL/OGR project,
give this one a try.
PostGIS
PostgreSQL is a powerful enterprise-level relational database that is free and open
source but also has commercial support options. It is the backbone of data
54. This is the Title of the Book, eMatter Edition
PostGIS | 33
repositories for many applications and web sites. Refractions Research (http://www.
refractions.net) has created a product called PostGIS that extends PostgreSQL, allow-
ing it to store several types of geographic data. The result is a robust and feature-rich
database for storing and managing tabular and geographic data together. Having this
ability makes PostgreSQL a spatial database, one in which the shapes of features are
stored just like other tabular data.
PostgreSQL also has several native geometry data types, but according
to Refractions, these aren’t advanced enough for the kind of GIS data
storage they needed. The PostGIS functions handle the PostGIS geom-
etry types and not the native PostgreSQL geometry types.
This description is only part of the story. PostGIS isn’t merely a geographic data stor-
age extension. It has capabilities from other projects that allow it to manipulate geo-
graphic data directly in the database. The ability to manipulate data using simple
SQL sets it ahead of many commercial alternatives that act only as proprietary data
stores. Their geographic data is encoded so that only their proprietary tools can
access and manipulate the data.
The more advanced PostGIS functions rely on an underlying set of
libraries. These come from a Refraction project called Geometry Engine
Open Source (GEOS). GEOS is a C++ library that meets the OGC spec-
ification for Simple Features for SQL. GEOS libraries can be used in cus-
tom applications and were not designed solely for use with PostGIS. For
more information on GEOS, see http://geos.refractions.net/.
GIS Analysis with SQL
PostGIS allows you to use SQL statements to manipulate and create geographic
data—for example, to buffer points and create circles. This is just the tip of the ice-
berg. PostGIS can be a GIS in and of itself while at the same time, all the power of
PostgreSQL as a tabular database is available. GIS overlays, projecting and reproject-
ing of features into other coordinate systems, and spatial proximity queries are all
possible using PostGIS. It is possible to have all the standard GIS overlay and data
manipulation processes available in a server-side database solution. Example 3-1
illustrates the marriage of SQL and GIS capabilities by selecting points contained by
another shape. More examples are shown in Chapter 13.
Example 3-1. An SQL command that takes a polygon shape from one table and finds all the points
that are within a feature in another table
> SELECT town_name
FROM towns, ontario
WHERE Contains(ontario_polygon,#first feature
town_points); #containing the others
56. läjähtävän eräänä iltapäivänä; muutenkin he ihan ilmeisesti olivat
riitaantuneet, sillä Lantier ei puhunut hänelle halaistua sanaakaan
kahteen viikkoon; sitten hän taas alkoi käydä hänen luonaan, ja
entinen elämä näytti alkavan uudestaan, ikäänkuin ei mitään olisi
tapahtunut. Pesijätär katsoi parhaaksi tyytyä asemaansa, sillä häntä
ei haluttanut ruveta tukkanuottasille ja siten yhä enemmän
katkeroittaa elämäänsä. Hän ei ollutkaan enää kaksikymmenvuotias
eikä enää välittänyt miehistä siihen määrään, että olisi tahtonut
antaa kilpailijoilleen selkään heidän kauniiden silmiensä tähden, itse
mahdollisesti joutuakseen putkaan. Tämänkin hän vain laski yhteen
muiden nöyryytystensä kanssa.
Coupeau ilkkui. Tämä mukava aviomies, joka ei ollut ottanut
kuulevaan korvaansakaan perkeleen parkunaa omassa kodissaan,
piti hirmuista ilvettä Poissonin sarvista. Kun asia koski häntä itseään
ei hän siitä ollut millänsäkään, mutta toisten perheessä se oli
hänestä hassunkurista, ja hän oli hyvin kärkäs urkkimaan sellaisia
tapauksia, missä naapurien akat petkuttivat miestään. Voi mikä
nahjus se Poisson oli! Ja semmoinen vehnänen kantaa vielä miekkaa
ja tohtii tyrkkiä ihmisiä katukäytävällä! Coupeau meni
hävyttömyydessään niin pitkälle, että rupesi pilkkaamaan Gervaiseä.
Ei ollut paha! Hänen rakastajansa oli koreasti hylännyt hänet!
Hänellä oli huono onni. Ensin olivat hänen hankkeensa seppiin
nähden jääneet onnistumatta, sitten hän sai matkapassin
hatuntekijöiltä. Hän olikin kääntynyt kovin huikentelevaisten
ammattikuntien puoleen. Minkä tähden hän ei ottanut muuraria,
miestä, johon voi luottaa, ja joka on tottunut tekemään tukevaa
työtä? Tosin hän puhui näistä asioista leikkisään tapaansa, mutta
Gervaise kävi yhtä kaikki vallan vihreäksi, sillä hänen miehensä
katsoi häneen pienillä juomarin silmillään niin tuikeasti, ikäänkuin
hän olisi tahtonut kaivaa sanansa häneen vintilällä. Kun hän otti
57. puheeksi nämä roskaiset asiat, ei Gervaise koskaan tiennyt, puhuiko
hän piloillaan vai tosissaan. Mies, joka on humalassa vuoden
umpeen, ei ole enää oman päänsä herra, ja sellaisia aviomiehiä on
kosolta, jotka kahdenkymmenen vanhoina ovat hyvin
mustasukkaisia, mutta jotka juominen tekee kolmenkymmenen
vanhoina hyvin välinpitämättömäksi aviolliseen uskollisuuteen
nähden.
Kannatti tosiaankin nähdä, miten Coupeau mahtaili Goutte-d'Or'in
kadulla! Hän sanoi Poissonia parkunan perkeleeksi. Se tukki suun
kielikelloilta! Hän ei ollutkaan enää itse ihmisten hampaissa. Hän
tiesi kyllä, mitä hän tiesi. Jos hän ei ollut aikoinaan ollut kuulevinaan,
mitä hänestä puhuttiin, niin siihen oli ollut luonnollisena syynä se,
että hän halveksi juoruja. Tietäähän jokainen omat kotoiset asiansa,
ja se koira älähtää, johon kalikka sattuu. Häneen se ei sattunut: ei
suinkaan hän silloin voinut ruveta vain ihmisten mieliksi älisemään?
Mutta mitäs poliisi teki? Tokkos hänkään älähti? Tällä kertaa
kumminkin kalikka osui oikeaan. Rakastavaiset oli nähty yhdessä. Se
ei ollutkaan siis enää tyhjää kulkupuhetta. Ja hän suuttui, hän ei
käsittänyt, kuinka mies, lisäksi vielä valtion virkamies, suvaitsi
kotonaan sellaista häväistystä. Mutta poliisi täisikin pitää toisten
tähteistä. Mutta se ei estänyt Coupeauta, kun hänelle iltasin tuli
ikävä yksin vaimonsa kanssa ullakkolokerossaan, menemästä alas
hakemaan Lantier'ta ja tuomasta häntä mukanaan väkisin. Siitä asti
kuin toveri oli ollut poissa, ei hän enää ollut viihtynyt kotonaan. Jos
hän näki Lantier'n ja vaimonsa välin kylmenneen, koetti hän sovittaa
heitä. Piru vie! Mitä heidän tarvitsi välittää ihmisistä? Eikö heillä
muka ollut lupa huvitella niin kuin parhaaksi näkivät? Ja hän nauroi,
hänen räpyttelevistä juopon silmistään loisti rajaton alttius, halu
jakaa kaikki hatuntekijän kanssa siten sulostuttaakseen elämäänsä.
58. Ja varsinkaan sellaisina iltoina ei Gervaise enää tiennyt, puhuiko hän
leikillään vai tosissaan.
Keskellä näitä juoruja Lantier esiintyi hyvin rehtevästi. Hän kohteli
toisia isällisesti ja arvokkaasti. Kolme eri kertaa oli hän saanut
estetyksi Coupeaulaisten ja Poissonilaisten välit rikkoutumasta.
Molempain perheiden hyvä sopu kuului näet hänen hyvinvointinsa
ehtoihin. Hellällä ja lujalla huolella valvoen Gervaiseä ja Virginietä
hän sai heidät aina osottamaan toisilleen mitä hartainta ystävyyttä.
Valliten kumpaakin tyynesti kuin turkkilainen pasha hän vain lihoi
omasta oveluudestaan. Tämä juupeli sulatteli vielä vatsassaan
Coupeaulaisia, kun hän jo pureskeli Poissonilaisia. Se ei haitannut
häntä ensinkään! Kun yksi puoti oli syöty tyhjäksi, alotti hän toista.
Hänenlaisensa miehetpähän ne menestyvätkin parhaiten.
Sinä vuonna, kesäkuussa pääsi Nana ensi kerran ripille. Hän oli jo
kolmannellatoista, pitkä ja hoikka kuin parsaheinä ja hyvin
räikenemättömän näköinen; edellisenä vuonna hänet oli erotettu
rippikoulusta huonon käytöksensä tähden; ja jos pappi hänet päästi
ripille tällä kertaa, niin sen hän teki vain pelosta, että tyttö ei sen
koommin näyttäytyisi hänelle, ja hän siten tulisi päästäneeksi yhden
pakanan lisää bulevardin katukiviä kuluttamaan. Nana tanssi ilosta
ajatellessaan valkoista pukuaan. Lorilleux'n puolisot olivat hänen
kummeinaan luvanneet puvun, ja kerskailivat tästä lahjastaan kaikille
talon asukkaille. Rouva Lerat'n piti antaa huntu ja myssy, Virginien
kukkaro ja Lantier'n virsikirja. Siten voivat Coupeaulaiset jokseenkin
huolettomina odottaa tätä juhlallista toimitusta. Sen lisäksi vielä
Poissonilaiset, jotka tahtoivat pitää tuliaiskutsut tuttavilleen, valitsivat
juuri tämän tilaisuuden, epäilemättä hatuntekijän neuvosta. He
kutsuivat Coupeaulaiset ja Bochelaiset, joiden tytär myös silloin pääsi
59. ensi kerran ripille. Päivälliseksi he lupasivat tarjota lammaspaistia ja
jotakin sen ympärillä.
Juuri edellisenä iltana, kun Nana ihastuksissaan katseli piirongin
päälle leviteltyjä lahjojaan, palasi Coupeau kotiin vallan kamalassa
tilassa. Pariisin ilma alkoi taas vaikuttaa häneen. Ja juovuspäissään
hän haukkui vaimoaan ja lastaan käyttäen niin ruokottomia sanoja,
että ne olivat ihan sopimattomia sellaisessa tilaisuudessa. Muuten
Nana itsekin tuli löyhäsuiseksi, kun aina vain kuuli rivoja puheita.
Äitiäänkin hän saattoi haukkua kameeliksi ja lehmäksi, kun tämä
hänelle riiteli.
— Leipää! karjui levyseppä. Ja keitto pöytään, sanon minä!… Aina
noilla akoilla on noita helvetin hetaleitaan! Mutta minä heitän
hornaan koko teidän hökötyksenne, jos en heti saa keittoani!
— Sit' on koko kiusankappale, kun hän on pätkässä! murisi
Gervaise kärsimättömästi. Sitten hän kääntyi hänen puoleensa ja
sanoi.
— Se on tulella, älä siinä joutavaa intoa!
Nana tekeytyi kainoksi, sillä hänestä se kuului päivän vaatimaan
kilttiyteen. Hän katseli yhä vielä lahjojaan painaen silmänsä alas eikä
ollut ymmärtävinään isänsä rumia puheita. Mutta levyseppä oli
kovasti kiusanteon haluinen ollessaan pöhnässä. Hän huusi ihan
hänen korvansa takana:
— Piru sinut periköön valkoisine mekkoinesi! Vai aiotko sinä taas
tunkea paperitukkoja täytteeksi liivisi alle niinkuin tässä eräänä
pyhänä?… Jaa. jaa, mutta odotahan! Kyllä minä näen, miten sinä
kieputtelet takapuoltasi. Ne sinua kutkuttavat, nuo koreat ryysysi.
60. Mikä sinä luulet olevasi?… Tokko korjaat siitä luitasi, kirottu kakara!
Älä niitä siinä hypistele, vain paiskaa ne piirongin laatikkoon, taikka
minä näytän sinulle, mikä on mikä!
Nana seisoi pää kumarassa, eikä vieläkään vastannut mitään. Hän
oli ottanut pienen tyllimyssyn ja kysyi äidiltään, paljonko semmoinen
maksoi. Ja kun Coupeau ojensi kättään reväistäkseen sen häneltä,
niin Gervaise survasi hänet syrjään huutaen:
— Jätä toki lapsi rauhaan! Hänhän on kiltti eikä tee mitään pahaa.
Silloin levyseppä päästi koko kiukkunsa valloilleen.
— Te sen helvetin hutsut! Yhdellaisia olette kumpikin, sekä äiti
että tytär, kaunis pari! Ja se on siivoa peliä, kun tuommoinen kutale,
jonka silmät vain pälyvät miehiin, lähtee syömään Herran ruumista!
Uskallappas vain väittää vastaan, saastainen sikiö! Minä puen sinut
säkkiin, niin saadaanpas nähdä, vieläkö nahkaasi syyhyttää. Niin,
säkin minä panen sinun päällesi, jotta se inhottaa sinua itseäsi ja
pappejasi. Se muka vielä on tarpeen, että hekin sinua turmelevat,
saatanat! Kuulkaa molemmat, mitä minä sanon!
Ja siinä paikassa kääntyi Nana hurjistuneena ympäri. Gervaisen
täytyi levittää kätensä suojellakseen tavaroita, joita Coupeau uhkasi
repiä rikki. Lapsi katsoi tuikeasti isäänsä ja unohtaen nöyryyden,
johon häntä rippi-isä oli kehottanut, sanoi hän hammasta purren:
— Sika!
Heti kun levyseppä oli syönyt keittonsa, alkoi hän kuorsata.
Seuraavana aamuna hän heräsi hyvin hyvällä tuulella. Edellisen illan
hutikasta oli hänellä vielä parhaiksi tuntumusta, joka vaikutti, että
61. hän nyt oli hauskimmillaan. Hän oli katsomassa, kun tyttöä puettiin,
ja oli ihastunut hänen valkoiseen mekkoonsa, kummastellen,
mitenkä niin vähäinen seikka voi tehdä tuommoisen räkänokan ihan
oikean mampselin näköiseksi. Kuten hän itse sanoikin, oli aivan
luonnollista, että isä sellaisena päivänä oli ylpeä tyttärestään. Ja
kelpasipa Nanata katsoakin. Hän oli kerrassa siron näköinen liian
lyhyessä mekossaan, ja hän hymyili ujosti kuin vihille vietävä
morsian. Kun mentiin alas ja hän näki porttikamarin kynnyksellä
Paulinen, joka oli puettu samoin kuin hänkin, pysähtyi hän ja loi
häneen terävän silmäyksen, mutta huomattuaan, että toisen puku ei
ollut yhtä sievä kuin hänen ja istui huonommin, herkesi hän hänelle
hyvin ystävälliseksi. Molemmat perheet lähtivät yhtenä kirkkoon.
Nana ja Pauline astuivat edeltä, virsikirja kädessä, pitäen kiinni
hunnusta, jota tuuli hulmutteli; he eivät puhelleet keskenään, mutta
olivat ylen mielissään nähdessään ihmisten tulevan ulos puodeista
heitä katsomaan ja asettivat naamansa hartaan näköisiksi
kuullakseen ohikulkijain sanovan, että he olivat hyvin sieviä. Rouva
Boche ja rouva Lorilleux jättäytyivät muista jäljelle saadakseen
kertoa toisilleen mietteitään Nilkuttajasta ja hänen
tuhlaavaisuudestaan. Ihan varmaan hänen tyttärensä ei olisi koskaan
päässyt ripille, elleivät sukulaiset olisi antaneet hänelle kaikkea. Niin,
ihan kaikki, vieläpä uusi paitakin oli hänelle annettu kunnioituksesta
pyhää pöytää kohtaan. Rouva Lorilleux'n huolen esineenä oli
varsinkin valkoinen hame, hänen oma antamansa lahja; ja joka
kerran kun lapsi meni liian lähelle seinää ja sai pölyä mekolleen,
julmistui hän ja sanoi Nanata nokitontuksi.
Kirkossa Coupeau itki kaiken aikaa. Se oli typerää, mutta hän ei
voinut pidättäytyä. Häntä liikutti niin, kun pappi ojensi pitkät
käsivartensa ja pienet, enkelien kaltaiset tytöt kulkivat hänen
62. editsensä kädet ristissä; ja urkujen soitto ellosteli hänen vatsaansa,
ja pyhän savun hyvä haju pani hänet aivastelemaan, niinkuin olisi
tuotu kukkavihko hänen nokkansa alle. Hän oli sanalla sanoen aivan
haltioissaan, sydänjuuriaan myöten heltyneenä. Erittäinkin ihana oli
hänestä eräs virsi, jota veisattiin tyttöjen ollessa syömässä Herran
ruumista; se kävi suloisena väristyksenä niskasta lähtien pitkin koko
hänen selkäpiitään. Muuten, hänen ympärillään oli koko joukko
muitakin herkkätuntoisia ihmisiä, joilta nenäliinat kastuivat. Se oli
tosiaankin ihana päivä, kaunein koko hänen elämässään. Mutta kun
hän kirkosta tultua meni juomaan lasin viiniä Lorilleux'n kanssa,
jonka silmät olivat pysyneet vallan kuivina, ja joka teki ivaa hänen
itkustaan, niin hän suuttui, ja sanoi, että se oli pappien syy, jotka
polttivat kirkossaan perkeleen yrttejä pehmitelläkseen ihmisiä. Mutta
sittenkään ei hän tahtonut sitä salata, vaan tunnusti vilpittömästi,
että hänen silmistään oli vuotanut kyyneleitä, sehän todisti vain, että
hänen sydämensä ei ollut kivestä. Ja hän tilasi vielä toiset lasit.
Poissonilaisten tulijaispäivälliset olivat hyvin hauskat. Ystävyys
vallitsi ilman vähintäkään soraääntä aterian alusta loppuun. Kun
pahat päivät koittavat sattuu siten tilaisuuksia, jolloin sellaisetkin
ihmiset, jotka muuten vihaavat toisiansa, viettävät muutamia hetkiä
rakkaassa rauhassa. Lantier, jolla oli vasemmalla puolellaan Gervaise
ja oikealla Virginie, oli yhtä rakastettavan kohtelias kummallekin
tuhlaillen heille hellyydenosotuksia kuin kukko, joka tahtoo yllä pitää
rauhaa kanatarhassaan. Vastapäätä häntä istui Poisson tapansa
mukaan tyynen ja miettiväisen mutta ankaran näköisenä, kuten
poliisi konsanaan, joka pitkien vahtivuorojensa aikana kaduilla on
tottunut olemaan mitään ajattelematta ja katsomaan mitään
näkemättä. Mutta juhlan kuningattaria olivat molemmat pikku tytöt,
Nana ja Pauline, joiden oli annettu pitää juhlavaatteet päällään; he
istuivat jäykkinä peläten tahraavansa valkoiset mekkonsa, ja heitä
63. varotettiin joka suupalalla ja neuvottiin, miten piti syödä siististi. Siitä
tuskastuneena Nana viimein kaataa höläytti koko viinilasinsa
päällensä. Syntyi yleinen hämminki, häneltä riisuttiin mekko päältä ja
viinitahra pestiin heti vesilasissa.
Jälkiruokaa syödessä keskusteltiin sitten vakavasti lasten
tulevaisuudesta. Rouva Boche oli jo tehnyt valintansa. Paulinen piti
mennä koruompeluverstaaseen, kulta- ja hopeaompeluksilla voi
ansaita viisi, kuusi francia päivässä. Gervaise ei ollut vielä päättänyt
Nanasta, sillä tytöllä ei ollut taipumusta mihinkään. Laukkaamaan
pitkin katuja hän kyllä osotti taipumusta, mutta muuhun hänestä ei
ollut ensinkään.
— Jos minä olisin teidän sijassanne, sanoi rouva Lerat, niin minä
panisin hänet kukantekijän oppiin. Se on siistiä ja hauskaa työtä.
— Vai kukantekijäksi, murahti Lorilleux, nehän ovat kaikki mitä
kevytmielisintä joukkiota.
— Entä minä sitten? huudahti pitkä leski huuliaan mutistaen.
Olettepa te kohtelias. Tietäkää, että minä en olekaan mikään narttu,
minä en kellahdakaan selälleni, kun kuka vain viheltää!
Mutta koko seura käski häntä vaikenemaan.
— Rouva Lerat, hyi! rouva Lerat!
Ja hänelle silmää iskien viitattiin molempiin rippilapsiin, jotka
pistivät nenänsä lasiinsa, etteivät purskahtaisi nauruun. Heidän
tähtensä olivat miehetkin siihen asti karttaneet sopimattomia sanoja.
Mutta rouva Lerat ei pitänytkään hyvänään nuhdetta. Sen, mitä hän
oli sanonut, oli hän kuullut hienoimmissakin seurapiireissä. Sitäpaitsi
64. hän kyllä osasi käyttää kieltään; häntä oli usein kehuttu siitä tavasta,
jolla hän puhui kaikesta, vieläpä lastenkin läsnäollessa, koskaan
loukkaamatta sopivaisuuden vaatimuksia.
— Kukantekijäin joukossa on hyvin kunniallisia naisia, tietäkää se!
huusi hän. He ovat luodut samallaisiksi kuin muutkin naiset, eikä
heilläkään ole nahkaa joka paikassa, se on selvä. Mutta he osaavat
pitää puolensa ja valita maulla silloinkin kun he hairahtuvat… Ja
tämä hieno aisti tulee heille kukista. Se se on minutkin varjellut…
— Ka, eihän minulla ole mitään kukantekijän ammattia vastaan,
keskeytti Gervaise. Kunhan se vain miellyttää Nanata itseään; ei
lapsia saa vasten heidän tahtoaan pakottaa millekään alalle… Niin.
Nana, vastaappas nyt, äläkä tekeydy tyhmäksi. Tahdotko ruveta
kukantekijäksi.
Tyttö istui kumartuneena lautasensa yli, kasteli sormensa
suussaan ja keräsi sillä leivoksen murenia, joita hän siitä sitten
imeksi. Hän ei pitänyt kiirettä, vaan nauraa virnisteli.
— Kyllä, äiti, rupean toki mielellänikin, selitti hän viimein.
Silloin asia järjestettiin heti. Coupeau suostui siihen, että rouva
Lerat veisi lapsen verstaaseensa, Kairon kadulle jo seuraavana
päivänä. Nyt alettiin puhua vakavasti elämän velvollisuuksista. Boche
sanoi, että Nana ja Panline nyt olivat aikaihmisiä, kun olivat käyneet
ripillä. Poisson lisäsi, että heidän piti tästälähin osata laittaa ruokia,
parsia sukkia ja johtaa taloutta. Vieläpä heille puhuttiin heidän
naimisiin menostaankin ja lapsista, joita heille kerran maailmassa
kasvaisi. Tytöt kuuntelivat pidätellen naurun tirskuntaansa ja nykivät
toisiaan, samalla kertaa hyvillään ja hämillään siitä, että he nyt olivat
täysiä naisia ja heidän kasvonsa hohtivat tulipunaisina valkoisten
65. mekkojen rinnalla. Mutta enimmästi heitä kutkutti, kun Lantier
piloillaan kysyi heiltä, eikö heillä jo ollut tiedossa sulhasia. Nana
pantiin väkisin tunnustamaan, että hän piti paljon Victor
Fauconnier'sta, äitinsä työnantajan pojasta.
— Hän on kyllä meidän ristityttömme, sanoi rouva Lorilleux
Bochelaisille, kun lähdettiin pois, mutta siitä hetkestä, jona he
panevat hänet kukantekijän oppiin, me emme tahdo kuulla hänestä
puhuttavankaan. Siitä tulee taas yksi maleksija lisää bulevardeille…
Saadaanpa nähdä, niin ei mene kuutta kuukautta, ennenkuin hänelle
käy huonosti.
Palatessaan kotiinsa nukkumaan tunnustivat Coupeaulaiset, että
kaikki oli käynyt hyvin, ja että Poissonilaiset eivät olleet häjyjä
ihmisiä Gervaisestä oli puotikin hyvin siististi sisustettu. Hän oli
odottanut, että hänestä tuntuisi kiusalliselta viettää siten kokonainen
ilta entisessä asunnossaan, jossa toiset nyt rehentelivät, ja
ihmeekseen huomasi hän nyt, että se ei ollut häntä harmittanut
hetkeäkään. Riisuessaan päältään kysyi Nana äidiltään, oliko toisessa
kerroksessa asuvalla neidillä, jonka häitä oli vietetty edellisellä
viikolla, myöskin ollut musliinihame niinkuin hänelläkin.
Mutta tämä olikin perheen viimeinen ilon päivä. Kului kaksi vuotta,
joiden aikana he vajosivat yhä syvemmälle. Talvet varsinkin panivat
heidät puti puhtaaksi. Jos he hyvän sään aikana vielä söivätkin
leipää, niin sateen ja kylmien ilmojen kanssa saapui nälkä, joka
opetti heitä syömään päivällistä ulkomuistista tässä huonepahasessa,
jossa vallitsi oikea siperialainen pakkanen. Joulukuu, se heittiö,
tunkeutui sisälle oven raosta ja toi tullessaan kaiken maailman
kärsimykset, seisauksen kaikilla työaloilla ja siitä johtuvan velton
toimettomuuden ynnä kylmän ja kostean vuodenajan koko mustan
66. kurjuuden. Ensimäisenä talvena he vielä joskus tekivät tulta
kamiiniin ja kytristäytyivät sen ympärille lämmittelemään, nauttien
mieluummin lämmöstä kuin ravinnosta. Mutta toisena talvena jäi
kamiini rauhassa ruostumaan, jäätävän kylmänä törrötti se
nurkassaan murheellisen näköisenä kuin rautainen rajapyykki. Ja
kaiken muun lisäksi tuli vielä hyyryn maksu. Se näännytti heidät
lopen. Voi sitä tammikuun hyyrynmaksupäivää, kun talossa ei ollut
rediisiäkään ja Boche tuli esittämään kuittia! Silloin puhalsi
huoneeseen entistä purevampi viima, oikea Pohjolan myrsky. Ja
seuraavana lauvantaina saapui itse herra Marescot, paksu, lämmin
palttoo päällä ja villaiset sormikkaat kädessä; ja aina hän uhkasi
häätämisellä juuri silloin, kun ulkona lumituisku oli rajuimmillaan ja
valmisti heille katukäytävälle vuoteen valkoisine lakanoineen.
Maksaakseen hyyrynsä he olisivat myöneet vaikka omaa lihaansa.
Hyyrynmaksu se tyhjensi sekä ruokakaapin että kamiinin. Muuten
sama valitushuuto kaikui koko talosta. Kaikissa kerroksissa itkettiin,
kovan onnen konsertti soi pitkin portaita ja käytäviä. Vaikka
jokaisesta kodista olisi joku kuollut, ei siitä olisi syntynyt yhtä
kamalaa urkujen parkunaa. Se oli kuin tuomiopasuunain soittoa
viimeisellä tuomiolla, jolloin kaikki elämä loppuu ja kurja ihmiskunta
murskaantuu tomuksi. Eräs kolmannessa kerroksessa asuva vaimo
kävi viikon ajan joka ilta kaupittelemassa itseään katujen kulmissa.
Muudan työmies, viidennessä kerroksessa asuva muurari, oli
varastanut isännältään.
Coupeaulaisten olisi luonnollisesti pitänyt käsittää, että he olivat
itse syypäät koko kurjuuteensa. Olkoon toimeentulo kuinka tiukalla
tahansa, niin aina siitä selviää, kun taloudessaan noudattaa
järjestystä ja säästäväisyyttä. Se nähtiin Lorilleux'läisistä, jotka
maksoivat säännöllisesti hyyrynsä, likaisiin paperipalasiin käärittynä;
mutta nämä viettivät tosiaankin samallaista elämää kuin laiha
67. hämähäkki sopessaan; heidän esimerkkinsä sai toisenkin työtä
inhoamaan. Nana ei ansainnut vielä mitään tekokukillaan, vieläpä
hänen elatuksensakin maksoi sievoiset summat. Rouva Fauconnier'n
pesulaitoksessa joutui Gervaise lopulta huonoihin kirjoihin, hänen
taitonsa meni yhä vain alaspäin ja hän oli työssään siihen määrään
huolimaton, että rouva Fauconnier oli alentanut hänen palkkansa
neljäänkymmeneen souhun, minkä hän maksoi kaikkein
kelvottomimmille hutiluksille. Sen lisäksi hän oli hyvin ylpeä ja ärtyisä
ja toi aina esille sen seikan, että hän oli ollut itsenäinen
liikkeenharjottaja. Hän oli poissa työstä kokonaisia päiviä ja lähti
pesulaitoksesta, milloin hänen päähänsä pisti. Niinpä hän kerrankin,
kun rouva Fauconnier oli ottanut työhönsä rouva Putois'n ja hän
siten oli joutunut tekemään työtä vierekkäin entisen apulaisensa
kanssa, oli suuttunut siitä niin, ettei ollut tullut takaisin kahteen
viikkoon. Tällaisten äksyilemisten perästä otettiin hänet takaisin
säälistä, mikä katkeroitti häntä yhä enemmän. Viikon lopussa ei
tietysti palkkaakaan ollut paljoa nostettavana, ja kaippa vielä kävi
niinkin, kuten hän itse sanoi katkerasti, että hän jonakin lauvantaina
jäi velkaan pesulaitoksen emännälle. Mitä Coupeauhon tuli, niin
kenties hän teki työtäkin, mutta silloin hän varmaankin teki työnsä
ilmaiseksi; sillä siitä asti kun hän oli ollut työssä Etampes'issa, ei
Gervaise ollut nähnyt vilahdukseltakaan hänen rahojaan.
Palkanmaksupäivinä hän ei enää viitsinyt edes katsoa hänen
käsiinsä, kun hän tuli kotiin. Hän tuli tyhjin käsin, eikä taskuissakaan
ollut mitään, usein ei edes nenäliinaakaan. Arvatenkin hän oli sen
kadottanut tai joku toveri lurjus sen häneltä pimittänyt. Ensi kerroilla
hän oli tekevinään tiliä rahoistaan keksaisten jos jonkillaisia valheita:
milloin oli hän pannut kymmenen francia johonkin keräyslistaan;
milloin oli kaksikymmentä francia pudonnut hänen taskustaan
reiästä, jota hän näytti, tai viisikymmentä francia mennyt vanhojen
68. velkojen lyhennykseksi. Mutta sitten hän ei enää viitsinyt kainostella.
Rahat haihtuivat ja sillä hyvä! Ne eivät olleet enää hänen
taskussaan, vaan hänen vatsassaan. Eipä sekään ollut hullumpi tapa
tuoda niitä kotiin eukolleen. Rouva Bochen neuvosta kävi pesijätär
tosin toisinaan tavottamassa miestään hänen työmaalta lähtiessään
ottaakseen häneltä rahat pois, ennenkun hän ennättäisi niitä
hävittää; mutta siitä hän ei paljoakaan hyötynyt; aina oli joku toveri
varottamassa Coupeauta, ja rahat luistivat saappaaseen tai vieläkin
siivottomampaan talletuspaikkaan. Rouva Boche oli tämmöisissä
asioissa hyvin ovela, sillä Boche koetti piilottaa häneltä
kymmenfrancisia, joilla hän aikoi pitää kekkereitä rakastettavien
naistuttaviensa hauskutukseksi; mutta hänen akkansa tutki visusti
hänen vaatteensa pienempiäkin poimuja myöten ja löysikin
tavallisesti kaipaamansa rahan lakin lipasta, nahan ja vaatteen
välistä. Levyseppä sitä vastoin ei kätkenyt kultarahoja ryysyihinsä.
Hän pani ne parempaan talteen, oman nahkansa alle. Gervaise ei
kumminkaan voinut ottaa hänen saksejaan ja ratkoa auki hänen
vatsanahkaansa.
Niin, se oli Coupeaulaisten oma syy, että he vaipuivat yhä
syvemmälle lokaan vuosi vuodelta. Mutta sellaisia asioita ihminen ei
tahdo koskaan tunnustaa edes itselleen, varsinkin kun jo on joutunut
rappiolle. He syyttivät kovaa onneaan ja väittivät, että Jumalan viha
oli kääntynyt heitä vastaan. Heidän kotinsa oli nykyään oikea riidan
pesä. Koko päivän he ottelivat keskenään. Kumminkaan ei vielä
tapeltu. Ainoastaan kiistan ollessa kuumimmillaan saattoi joku
yksinäinen isku läiskähtää. Mutta surullisinta oli, että he olivat
avanneet ystävyyden häkin ja päästäneet kaikki paremmat tunteet
lentoon kuin aljolinnut, Se suloinen lämmin, joka vallitsee kodeissa,
missä isät, äidit ja lapset puristautuvat toisiaan vastaan ja
pysyttäytyvät yhdessä rykämässä, haihtui tuuleen jättäen heidän
69. huoneensa kylmilleen ja sen asukkaat värjöttämään kunkin omassa
nurkassaan. Kaikki kolme, Coupeau, Gervaise ja Nana elivät kuin
kissat ja koirat, äsähtivät toisilleen vähimmästäkin sanasta ja viha
paloi heidän silmissään. Heiltä näytti jotakin särkyneen, oli kuin se
perusjänne olisi katkennut, se koneisto murtunut, joka onnellisissa
perheissä panee sydämet sykkimään samassa tahdissa. Gervaiseä ei
enää pelottanut, kuten ennen, kun hän näki Coupeaun räystään
reunalla, kahdentoista, viidentoista metrin korkeudella kadusta. Tosin
hän ei olisi itse tahtonut häntä survaista, mutta jos hän olisi
pudonnut itsestään, niin ei totisesti olisi ollut suurtakaan vahinkoa,
jos semmoinen tyhjäntoimittaja olisi hävinnyt maan pinnalta.
Toraillessansa Coupeaun kanssa huusi Gervaise usein, että tokkohan
hänelle enää milloinkaan oli koittava se onnen päivä, että Coupeau
kannettaisiin kotiin paarilla. Sitä hän toivoi kuin onnensa palaamista.
Mitä hyötyä oli semmoisesta juoposta? Hän vain itketti häntä, söi
kaikki, mitä hän irti sai, ja syöksi hänetkin kurjuuteen. Sellaiset
miehet, joista ei ollut sen enempää hyötyä, olisivat joutaneet, mitä
pikemmin, sen parempi, heitettäviksi maan rakoon, ja heidän
haudallaan olisi tanssittu oikeaa vapautuksen polkkaa. Ja vielä
säälimättömämpi kuin äiti oli tytär. Kun äiti sanoi: Lyö! niin tytär
siihen säesti: Lyö kuoliaaksi. Nana luki sanomalehdestä tapaturmista
liittäen niihin omia, luonnottoman tyttären mietteitään. Hänen
isällään oli sellainen onni, että vaikka omnibussi oli sysännyt hänet
kumoon, hän ei ollut edes selvinnyt humalastaan. Voi, kunpa se
rutjake olisi kerrankin heittänyt henkensä!
Keskellä tätä kurjuuden katkeroittamaa elämäänsä kärsi Gervaise
vielä lisäksi toistenkin nälästä, jota hän kuuli ympärillänsä
ruikutettavan. Tällä kulmalla taloa asuivat kaikkein viheliäisimmät
perheet, joilla oli yhteisenä tunnussanana jokapäiväisen leivän
puute. Vaikka ovet avautuivatkin, niin ei niistä vain ruuan hajua
70. löyhähtänyt vastaan. Pitkin käytävää vallitsi nälkäkuoleman
hiljaisuus, seinät kumisivat ontosti kuin tyhjät vatsat. Toisinaan vain
syntyi aika mellakoita, kun naiset itkivät ja nälkäiset lapset
mankuivat leipää ja perheet tahtoivat syödä toisensa pettääkseen
vatsaansa. Kaikkien kurkkua kouristi nälkä, turhaan siinä suu auki
huohotettiin, rinta vain painui kokoon tätä tyhjää ilmaa hengittäessä,
jossa eivät edes hyttysetkään olisi voineet elää ravinnon puutteessa.
Mutta enimmästi säälitti Gervaiseä ukko Bru loukossaan pienten
portaiden alla. Hän vetäytyi sinne kuin murmelieläin ja painautui
käppyrään, jotta ei olisi niin kylmä; päiväkausia makasi hän siellä
liikahtamatta olkikasalla. Ei edes nälkäkään saanut häntä enään
liikkeelle, sillä suottahan olisi ollut lähteä ulos hankkimaan
ruokahalua, kun ei kukaan ollut kutsunut häntä päivällisille. Kun
häntä ei näkynyt kolmeen, neljään päivään, niin naapurit avasivat
hänen ovensa katsoakseen, eikö hänestä henki jo ollut lähtenyt. Ei,
sitä oli vielä kipene jäljellä, ei paljoa, hän eli vielä hiukkasen, toisella
silmällään. Kuolemakin näytti hänet unohtaneen! Kun Gervaisellä
sattui olemaan leipää, heitti hän kuoret ukolle. Jos kohta hän oli
käynytkin häjyksi ja vihasi ihmisiä miehensä tähden, niin hän sääli
kumminkin vilpittömästi eläimiä; ja ukko Bru, tämä vanhus parka,
jonka annettiin kuolla nälkään ja viluun, kun hän ei enää kyennyt
pitämään työkaluja käsissään, oli hänestä kuin virkaheitto koira, jota
rakkaritkaan eivät viitsineet korjata edes nahan ja rasvan vuoksi.
Siitä oli hänellä alituinen paino sydämmellään, kun hän tiesi hänen
olevan siellä, käytävän toisella puolen, Jumalan ja ihmisten
hylkäämänä, ja saavan ravintonsa yksinomaan omasta ruumiistaan,
joka kutistui takaisin lapsen vartalon kokoiseksi rypistyen ja
kuivettuen kuin uunin reunalle kuivamaan pantu appelsiini joka
näivettyy jo viimein käy kovaksi kaperoksi.
71. Samoin tuotti pesijättärelle paljon kärsimystä ukko Bazougen
läheisyys. Yksinkertainen, ohut lautaseinä erotti heidän huoneensa.
Ukko ei voinut panna sormeakaan suuhunsa Gervaisen kuulematta.
Kun ruumiinkantaja illalla palasi kotiinsa, täytyi pesijättären, tahtoipa
hän tai oli tahtomatta, seurata kaikkia hänen toimiansa, miten hän
heitti mustan nahkahattunsa piirongin päälle, niin että se kopsahti
kuin lapiollinen multaa ruumiskirstulle, miten hän ripusti naulaan
mustan viittansa, joka kahisi seinää vasten kuin yölinnun siipi olisi
siihen koskenut, ja miten hän paiskasi hujan hajan keskelle lattiaa
kaikki mustat sururyysynsä. Gervaise kuuli hänen tepastelevan, oli
levoton hänen vähimmästäkin liikkeestään ja säpsähti joka kerran,
kun hän kolhasi jotakin huonekalua tai kalisteli astioitaan. Tämä
juoppo ukko rahjus oli aina hänen ajatuksissaan täyttäen hänen
mielensä kammottavan pelon sekaisella tiedonhalulla. Hän oli aina
hyvällä päällä ja joka päivä täydessä seilissä, hän ryki, syljeksi, lauleli
iloisia lauluja ja puhui roskaa, ja pää kolmantena jalkana hän ryömi
huoneessaan ja tappeli kaikkia neljää seinää vastaan, ennenkun löysi
sänkynsä. Ja Gervaise oli aivan kalpeana ihmetellen itsekseen, mitä
ukolla mahtoi olla tekeillä, hän kuvitteli mielessään mitä kauheimpia
asioita. Muun muassa hän oli saanut päähänsä, että ukko Bazouge
oli tuonut huoneeseensa ruumiin ja kätkenyt sen sänkynsä alle.
Olivathan sanomalehdet kertoneet eräästä hautaustoimiston
virkamiehestä, joka keräsi kotiinsa lasten ruumiskirstuja päästäkseen
vähemmällä vaivalla viemällä ne kaikki yhdellä kertaa hautausmaalle,
ihan varmaan tuntui lautaseinän läpi ruumiin hajua aina kun
Bazouge tuli kotiinsa. Olisi luullut asuvansa aivan Père-Lachaisen
hautausmaan ääressä, keskellä myyrien valtakuntaa. Hän oli
hirvittävä, tuo mies, joka aina nauroi yksinään, ikäänkuin hänen
ammattinsa olisi tuottanut hänelle iloa. Vieläpä sittenkin kun hän oli
lopettanut elämöimisensä ja kellahtanut selälleen, kuorsasi hän niin
72. eriskummallisesti, ettei pesijätär tohtinut hengittääkkään. Tuntikausia
istui hän sydän kurkussa ja korvat höröllä, luullen että ruumissaatto
toisensa perästä kulki naapurin huoneessa.
Mutta pahinta oli, että Gervaise juuri pelkonsa hurmaamana tunsi
vastustamatonta vetämystä painamaan korvansa ihan naapurin
seinään kiinni saadakseen paremmin selkoa, mitä siellä tapahtui.
Bazouge teki häneen samallaisen vaikutuksen kuin kauniit miehet
tekevät kunniallisiin naisiin: he tahtoisivat koskea heihin, mutta eivät
uskalla; hyvä kasvatus pidättää heitä siitä. Samoin olisi Gervaisekin,
jos ei pelko olisi häntä pidättänyt, tahtonut koetella kuolemaa,
nähdä, millainen se oli miehiään. Toisinaan oli hän niin kummallinen
kuunnellessaan henkeään pidättäen niin tarkkaavasti, kuin jos hän
olisi odottanut saavansa ilmi salaisuuden syntysanat jostakin
Bazougen liikkeestä, että Coupeau piloillaan kysyi häneltä, oliko hän
pikeentynyt ruumiinkantajaan. Silloin Gervaise suuttui ja uhkasi
muuttaa pois, sillä niin häntä tämä naapuruus kammotti. Mutta niin
pian kuin ukko tuli kotiinsa tuoden muassaan hautausmaan tuoksua,
vaipui Gervaise taas mietteisiinsä ja kävi kiihtyneen ja pelokkaan
näköiseksi kuin aviovaimo, joka on aikeissa pistää puukolla reiän
vihkimäkontrahtiinsa. Eikös ruumiinkantaja ollut jo kahdesti
tarjoutunut pakkaamaan häntä laatikkoonsa ja viemään häntä
jonnekin, sellaiselle makuusijalle, jossa uni maistaa niin makealta,
että siitä nauttiessaan heti unohtaa kaikki kärsimykset. Ehkäpä se
todellakin oli hyvin suloista. Vähitellen kasvoi hänen halunsa yhä
kiihkeämmäksi päästä sitä maistamaan. Hän olisi tahtonut kokeeksi
nukahtaa pariksi viikoksi, kuukaudeksikin. Voi, kun hän olisi saanut
nukkua kuukauden, varsinkin talvella, hyyrynmaksukuukauden,
jolloin elämän vastoinkäymiset olivat musertaa hänet! Mutta se ei
ollut mahdollista, jos kerran rupesi nukkumaan tunniksikaan, niin
nukkumista täytyi jatkaa ijän kaiken; ja tämä ajatus sai hänen
73. verensä jäätymään, hänen kuoleman kaihonsa haihtui sen ijäisen ja
ankaran ystävyyden edessä, jota maa vaatii niiltä, jotka se kätkee
povelleen.
Yhtä kaikki hän eräänä lauvantai-iltana löi molemmilla nyrkillään
lautaseinään. Hän oli viettänyt kauhean viikon kaikkien vieromana;
rahat olivat lopussa ja rohkeus samaten. Sinä iltana hän ei ollut
terve, kuume värisytti häntä ja liekehti hänen silmissään. Silloin hän,
sen sijaan että olisi heittäytynyt ulos ikkunasta, niinkuin hänen ensin
oli tehnyt mielensä, alkoikin kolkuttaa seinään ja huutaa:
— Isä Bazouge! isä Bazouge!
Ruumiinkantaja oli heittämässä kenkiään jalastaan ja lauloi: Kolme
neittä kaunokaista. Työtä oli tainnut olla kosolta sinä päivänä, sillä
hän tuntui olevan vielä tavallistakin enemmän liikutettu.
— Isä Bazouge! isä Bazouge! huusi Gervaise korottaen ääntään.
Eikö hän siis kuullut? Gervaise oli heti valmis antautumaan hänelle,
hän sai tulla ottamaan hänet selkäänsä ja viedä hänet sinne, minne
hän vei toisetkin naisensa, sekä rikkaat että köyhät, joita hän
lohdutti. Gervaiseä vaivasi hänen laulunsa: Kolme neittä kaunokaista,
sillä hänestä oli siinä sellaisen miehen halveksumista, jolla on liian
paljon rakastajattaria.
— Mitä nyt? mitä nyt? änkytti Bazouge, kuka on sairaana?… Kyllä
tullaan, pikku muori!
Mutta kuullessaan hänen käheän äänensä heräsi Gervaise kuin
painajaisesta. Mitä oli hän tehnyt? Hän oli varmaankin koputtanut
seinään. Silloin hänestä tuntui kuin hän olisi saanut kepin iskun
74. pitkin selkärankaansa; pelästyneenä peräytyi hän ollen näkevinään
ruumiinkantajan ojentavan isot kätensä lautaseinän läpi ottaakseen
häntä kiinni tukasta. Ei, ei, hän ei tahtonut, hän ei ollut valmis. Jos
hän oli kolkuttanut, niin hän oli kai kääntyessään aivan tietämättänsä
kolhaissut seinään kyynäspäällään. Ja kauhun tunne, joka nousi
polvista aina hartioihin asti, valtasi hänet, kun hän
mielikuvituksessaan näki ukon laahaavan häntä sylissään ihan
jäykkänä ja kasvot valkeina kuin posliinilautanen.
— Ka, eikö siellä ole enää ketään? kysyi Bazouge uudestaan, kun
ei enää kuulunut mitään. Odottakaahan, pitäähän toki olla kohtelias
naisille.
— Ei mitään, ei täällä ole mitään hätää, sanoi pesijätär viimein
tukahdutetulla äänellä. En minä tarvitse mitään. Kiitoksia vain.
Ruumiinkantaja murisi vielä itsekseen kunnes nukkui. Sill'aikaa
Gervaise kuunteli tuskallisessa odotuksessa uskaltamatta
hievahtaakkaan, peläten, että ukko voisi olla kuulevinaan hänen
koputtavan uudestaan. Hän päätti lujasti olla varoillaan. Vaikka hän
olisi henkitoreissaan, niin hän ei pyytäisi apua naapurilta. Ja hän
sanoi tämän rauhoittaakseen itseään, sillä toisin ajoin hän pelostaan
huolimatta tunsi yhä vielä kauhunsekaista kuoleman kaihoaan.
Tässä kurjuuden pesässä, keskellä toisten ja omia huoliaan löysi
Gervaise kuitenkin kauniin esimerkin rohkeudesta pikku Lalie
Bijardïssa. Tämä kahdeksanvuotias, peukalon kokoinen tyttö hoiti
talouttaan siististi kuin aikaihminen; ja se oli raskas tehtävä, hänen
hoidettavinaan olivat molemmat pienokaiset, hänen veljensä Jules ja
hänen sisarensa Henriette, toinen neljän ja toinen viiden vuoden
vanha, joita hänen täytyi katsoa kaiken päivää, vieläpä
lakaistessaankin ja astioita pestessään. Sen jälkeen kun ukko Bijard
75. oli tappanut vaimonsa potkaisemalla häntä vatsaan, oli Lalie
ruvennut lapsukaisten äidiksi. Mitään virkkamatta, aivan itsestään oli
hän astunut vainajan sijalle ja täytti sen siihen määrään, että hänen
petomainen isänsä, kai täydentääkseen yhtäläisyyttä, rusikoi nyt
tytärtään, samoin kuin hän ennen oli rusikoinut äitiä. Kun hän tuli
kotiin juovuksissa, täytyi hänellä olla naisia rääkättävänä. Hän ei
edes huomannutkaan, että Lalie oli vallan pieni. Hän ei olisi voinut
lyödä kovemmin vanhaa huoraa. Yksi ainut isku peitti kokonaan
tytön kasvot, ja hänen ihonsa oli vielä niin hento, että isän sormien
jäljet näkyivät siinä vielä kaksi päivää. Se oli törkeää pahoinpitelyä;
ilman vähintäkään syytä sai lapsi parka selkäänsä. Kuin raivostunut
susi hyökkäsi isä tyttärensä päälle, joka arkana ja pelokkaana, kuin
laiha kissanpoika nurkumatta otti vastaan hänen iskunsa nöyrästi
katsoen kauniilla silmillään. Lalie ei koskaan vastustanut isäänsä.
Hän kumarsi vain hiukan päätään suojellakseen kasvojaan: eikä hän
huutanutkaan, etteivät muut talon asukkaat kuulisi. Kun sitten isä oli
väsynyt lennättämään häntä potkuillaan nurkasta nurkkaan, odotti
lapsi kunnes jaksoi nousta ylös ryhtyäkseen uudestaan työhön. Hän
pesi lapsensa, keitti ruuan eikä jättänyt tomuhituistakaan
huonekaluille. Selkään saanti tuli kuulumaan hänen jokapäiväiseen
päiväjärjestykseensä.
Gervaise oli tullut hyväksi ystäväksi naapurinsa kanssa. Hän
kohteli Lalieta vertaisenaan, ikäihmisenä, jolla on elämänkokemusta.
Laliella olikin kalpeissa ja vakavissa kasvoissaan ennen aikojaan
vanhenneen lapsen ilme. Häntä olisi luullut kolmekymmenvuotiseksi
vanhaksi piiaksi, kun kuuli hänen puhelevan. Hän osasi vallan hyvin
käydä ostoksilla, paikata vaatteita ja pitää kotiansa kunnossa ja
puhui lapsista ikäänkuin hän olisi jo pari kolme kertaa eläessään ollut
lapsivuoteessa. Kahdeksanvuotiaan puheeksi sellainen ensin nauratti
ihmisiä, mutta sitten tuntui kurkussa sellaista ahdistusta, että täytyi
76. kiireesti lähteä pois, ettei itku pääsisi. Gervaise koetti niin paljon kuin
mahdollista vetää häntä puoleensa ja antoi hänelle kaikkea, mitä
suinkin voi, ruokaa ja vanhoja vaatteita. Eräänä päivänä, kun hän
koetti hänen päälleen vanhaa Nanan röijyä, säikähti hän kovasti
nähdessään hänen selkänsä täynnä mustelmia, kyynäspään
vereslihalla ja koko ruumiin, jossa ei ollut kuin luuta ja nahkaa,
julmasti rääkättynä. Totisesti, ukko Bazouge sai varata kirstunsa jo
valmiiksi, sillä sitä menoa ei voinut pitkälti kestää. Mutta lapsi oli
pyytänyt pesijätärtä olemaan siitä puhumatta. Hän ei tahtonut, että
hänen isälleen koituisi ikävyyksiä hänen tähtensä. Hän puolusti häntä
vakuuttaen, että hän ei olisi ollut paha, ellei hän olisi juonut. Hän oli
hullu eikä tiennyt, mitä teki. Voi, hän antoi niin mielellään isälleen
anteeksi, sillä pitäähän hulluille kaikki antaa anteeksi.
Siitä lähtien Gervaise piti aina varalla, milloin ukko Bijard tuli
kotiin, ja niin pian kuin hän kuuli hänen nousevan portaita, koetti
hän tulla Lalieta auttamaan. Mutta useimmiten hän siitä hyvästä sai
vain itse muutaman korvapuustin. Kun hän päivällä kävi katsomassa
Lalieta, tapasi hän hänet usein sidottuna kiinni rautasängyn jalkaan.
Sepällä oli näet sellaisia päähänpistoja, että hän aamulla, ennen
kotoa lähtöään köytti tytön jaloista ja vatsan kohdalta kiinni paksulla
nuoralla, ilman mitään ymmärrettävää syytä. Se oli viinan
villitsemäin aivojen keksintö, jolla hän nähtävästi poissa ollessaankin
tahtoi rääkätä lasta. Jäykkänä kuin seiväs seisoi Lalie
kaakinpuussaan päiväkausia; hänen jalkojaan pisteli ja poltti,
ikäänkuin hän olisi seisonut muurahaispesässä, kerran jäi hän
yöksikin, kun Bijard ei ollut muistanut tulla kotiin. Kun Gervaise
moisesta julmuudesta suuttuneena aikoi päästää hänet irti, pyysi
Lalie häntä olemaan koskematta nuoriin, sillä hänen isänsä raivostui,
elleivät solmut hänen palatessaan olleet aivan samallaiset kuin hän
itse oli ne tehnyt. Hänen ei todellakaan ollut paha olla, saihan hän
77. levätä siinä; ja sen hän sanoi hymysuin, vaikka hänen lyhyet, hennot
säärensä olivat turvonneet ja kuoleutuneet. Se häntä vain suretti,
että työt eivät edistyneet, kun niinikään täytyi olla sänkyyn
kytkettynä katselemassa talon epäjärjestystä. Hänen isänsä olisi
pitänyt keksiä jotakin muuta. Hän piti yhtä kaikki silmällä lapsiaan,
sai heidät tottelemaan ja kutsui Henrietten ja Julesin luokseen
niistääkseen heidän nenänsä. Kun hänellä oli kädet vapaina, neuloi
hän sukkaa odottaessaan vapauttamistaan, ettei aika menisi
kokonaan hukkaan. Kipeimmästi koski häneen silloin, kun Bijard
päästeli irti nuoria; hän kieriskeli maassa hyvästikin neljännestunnin,
ennenkun jalat rupesivat kannattamaan, sillä verenkierto oli niistä
kokonaan pysähtynyt.
Lukkoseppä oli keksinyt myöskin toisen pikku leikin. Hän kuumensi
soun rahoja tulipesässä ja asetti ne uunin reunalle. Sitten hän kutsui
Lalieta ja käski hänen mennä ostamaan kaksi naulaa leipää. Tyttö
sieppasi pahaa aavistamatta rahat, mutta ne polttivat hänen
hyppysiään, häneltä pääsi huuto, ja rahat kirposivat lattialle. Silloin
isä raivostui. Mikä tyttöä riivasi! Vai sillä tavalla hän rahoja viskeli! Ja
hän uhkasi antaa häntä selkään, ellei hän heti nostanut ylös rahaa.
Kun tyttö epäröi, sai hän ensimäiseksi varotukseksi sellaisen
korvapuustin, että hänen silmänsä iskivät tulta. Ääneti, pari isoa
kyyneltä silmän kulmissa, hän otti sout lattialta ja lähti menemään
hypittäen niitä kämmenellään jotta ne pikemmin jäähtyisivät.
Sitä ei voi aavistaakkaan, mitä julmia päähänpistoja saattaa syntyä
juomarin aivoissa. Eräänä iltapäivänä esimerkiksi oli Lalie saatuaan
kaikki paikat järjestykseen ruvennut leikkimään lastensa kanssa.
Ikkuna oli auki ja siitä käyvä veto tärähytteli hienostaan ovea.
78. — Se on herra Uskalias, sanoi tyttö. Käykääpä sisälle herra
Uskalias.
Olkaa hyvä ja astukaa peremmäksi.
Ja hän niiaili oven edessä tervehtien tuulta. Henriette ja Jules
niiailivat ja kumartelivat myös hänen takanaan, ihastuneina tähän
leikkiin ja nauroivat katketakseen, ihan kuin jos heitä olisi kutkuteltu.
Lalie innostui itsekin nähdessään, miten he iloitsivat sydämensä
pohjasta, ja hän nautti leikistä omastakin puolestaan, mikä tapahtui
kuudentenaneljättä päivänä joka kuussa.
— Päivää, herra Uskalias. Kuinkas voitte?
Mutta ovi paukahti auki ja ukko Bijard astui sisälle. Silloin siitä tuli
toinen leikki. Henriette ja Jules lensivät istualleen seinän viereen.
Lalie sitä vastoin jäi kuin kivettyneenä liikkumattomaksi keskellä
niiausta. Lukkosepällä oli kädessään pitkä, ihan uusi ajurin piiska,
jonka valkoisesta puuvarresta jatkuva nahkasiima päästä oheni
hienoksi rihmaksi. Hän asetti piiskan sängyn nurkkaan, eikä tällä
kertaa antanutkaan tytölle tavallista potkua, jota tämä jo varustautui
ottamaan vastaan. Hän irvisti niin että mustat hampaat näkyivät, ja
oli hyvin iloisella päällä ja kovasti juovuksissa. Hänen loistavasta
naamastaan näkyi, että hänellä oli lysti tuuma mielessä.
— Vai laiskottelet sinä sen retkale! Minä kuulin jo alas asti, miten
sinä täällä tanssit … käyppäs tänne! Vielä lähemmäksi, ihan minun
eteeni! Mitä sinä siinä murjotat? Sinähän vapiset kuin haavanlehti,
vaikka minä en ole sinuun kajonnutkaan… Vedä minulta kengät
jalasta.
Kun Lalie ei saanutkaan selkäänsä kuten tavallisesti, kävi hän
pelosta vallan kalpeaksi. Hän riisui kengät isältään. Tämä oli istunut
79. sängyn reunalle ja heittäytyi nyt vaatteet päällä pitkälleen jääden
silmät auki seuraamaan tytön liikkeitä hänen puuhaillessaan
huoneessa. Tämän katseen vaivaamana lapsi parka ihan typertyi,
hänet valtasi vähitellen niin tuskallinen pelko, että hän hädissään
särki kupin. Silloin hänen isänsä, viitsimättä nousta ylös, otti
nurkasta piiskan ja näytti sitä hänelle.
— Kuuleppas, pikku vasikka, katsoppas tätä; tämän olen tuonut
sinulle lahjaksi. Niin siihen meni taas viisikymmentä souta sinun
tähtesi… Kun minulla on tämä leikkikalu, niin minun ei enää tarvitse
juosta sinun perästäsi, ja sinä saat kyyristäytyä vaikka mihinkä
nurkkaan. Tahdotkos koettaa?… Vai säret sinä astioita!… Hih hei!
Alappas tanssia! Niiaileppas nyt herra Uskaliaalle!
Maaten selällään, pää korvatyynyllä, hän huitoi piiskallaan ympäri
huonetta läiskytellen sitä kuin kuorma-ajuri, joka kiihottaa
hevosiaan. Sitten hän laski käsivartensa alemmaksi ja huiskautti
piiskaansa, niin että sen siima kiertyi Lalien keskiruumiin ympäri, ja
kun hän sen kiskaisi irti, pyöri lapsi kuin hyrrä. Hän kaatui ja koetti
paeta nelin ryömin, mutta isä kietoi uudestaan piiskansa hänen
ympärilleen ja tempasi hänet sillä taas jaloilleen.
— Hih hei! hihkui hän. Näin sitä villikissaa pyöritetään!… Tämäpä
vasta hauskaa on talvisina aamuina; minä saan maata sängyssäni,
enkä vilustuta itseäni, kun ei tarvitse kelteisillään lähteä keikkumaan,
vaan saan sinut ilmankin kiinni. Siihen nurkkaan minun piiskani kyllä
ulottuu, ja siihen nurkkaan myös, ja vielä siihenkin! Jaha! Jos sinä
ryömit sängyn alle, niin minä kolhaisen sinua piiskan varrella… Hop!
hop! hei vain!
Vaahtoa ilmestyi hänen huulilleen, ja hänen keltaiset silmänsä
pullistuivat mustista kuopistaan. Lalie huusi kuin hullu ja hyppi
80. Welcome to our website – the perfect destination for book lovers and
knowledge seekers. We believe that every book holds a new world,
offering opportunities for learning, discovery, and personal growth.
That’s why we are dedicated to bringing you a diverse collection of
books, ranging from classic literature and specialized publications to
self-development guides and children's books.
More than just a book-buying platform, we strive to be a bridge
connecting you with timeless cultural and intellectual values. With an
elegant, user-friendly interface and a smart search system, you can
quickly find the books that best suit your interests. Additionally,
our special promotions and home delivery services help you save time
and fully enjoy the joy of reading.
Join us on a journey of knowledge exploration, passion nurturing, and
personal growth every day!
ebookbell.com