100% found this document useful (1 vote)
41 views

Download Introduction to GIS Programming and Fundamentals with Python and ArcGIS 1st Edition Chaowei Yang ebook All Chapters PDF

ArcGIS

Uploaded by

tsarevprimig
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
41 views

Download Introduction to GIS Programming and Fundamentals with Python and ArcGIS 1st Edition Chaowei Yang ebook All Chapters PDF

ArcGIS

Uploaded by

tsarevprimig
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Introduction to GIS Programming and Fundamentals


with Python and ArcGIS 1st Edition Chaowei Yang

https://textbookfull.com/product/introduction-to-gis-
programming-and-fundamentals-with-python-and-arcgis-1st-
edition-chaowei-yang/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Introduction to Scientific Programming with Python Joakim


Sundnes

https://textbookfull.com/product/introduction-to-scientific-
programming-with-python-joakim-sundnes/

textboxfull.com

Mastering ArcGIS Enterprise Administration: Install,


configure, and manage ArcGIS Enterprise to publish,
optimize, and secure GIS services 1st Edition Chad Cooper
https://textbookfull.com/product/mastering-arcgis-enterprise-
administration-install-configure-and-manage-arcgis-enterprise-to-
publish-optimize-and-secure-gis-services-1st-edition-chad-cooper/
textboxfull.com

Introduction to Computation and Programming Using Python


with Application to Understanding Data Guttag

https://textbookfull.com/product/introduction-to-computation-and-
programming-using-python-with-application-to-understanding-data-
guttag/
textboxfull.com

Discovering GIS and ArcGIS Pro, 3e 3rd Edition Bradley


Shellito

https://textbookfull.com/product/discovering-gis-and-arcgis-
pro-3e-3rd-edition-bradley-shellito/

textboxfull.com
Programming For Computations - Python: A Gentle
Introduction To Numerical Simulations With Python 3.6
Svein Linge
https://textbookfull.com/product/programming-for-computations-python-
a-gentle-introduction-to-numerical-simulations-with-python-3-6-svein-
linge/
textboxfull.com

Bite Size Python An Introduction to Python Programming 1st


Edition April Speight

https://textbookfull.com/product/bite-size-python-an-introduction-to-
python-programming-1st-edition-april-speight/

textboxfull.com

Introduction to Computation and Programming Using Python


With Application to Understanding Data Second Edition John
V. Guttag
https://textbookfull.com/product/introduction-to-computation-and-
programming-using-python-with-application-to-understanding-data-
second-edition-john-v-guttag/
textboxfull.com

Programming for beginners The fundamentals Basic


introduction to programming concepts with fractals Bjørn I
F Westerheim
https://textbookfull.com/product/programming-for-beginners-the-
fundamentals-basic-introduction-to-programming-concepts-with-fractals-
bjorn-i-f-westerheim/
textboxfull.com

Introduction to Computing and Programming in Python,


Global Edition Mark J. Guzdial

https://textbookfull.com/product/introduction-to-computing-and-
programming-in-python-global-edition-mark-j-guzdial/

textboxfull.com
Introduction to GIS
Programming and
Fundamentals with Python
and ArcGIS®
Introduction to GIS
Programming and
Fundamentals with Python
and ArcGIS®

Chaowei Yang
With the collaboration of
Manzhu Yu
Qunying Huang
Zhenlong Li
Min Sun
Kai Liu
Yongyao Jiang
Jizhe Xia
Fei Hu
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2017 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Printed on acid-free paper
International Standard Book Number-13: 978-1-4665-1008-1 (Hardback)
This book contains information obtained from authentic and highly regarded
sources. Reasonable efforts have been made to publish reliable data and
information, but the author and publisher cannot assume responsibility for the
validity of all materials or the consequences of their use. The authors and
publishers have attempted to trace the copyright holders of all material
reproduced in this publication and apologize to copyright holders if permission to
publish in this form has not been obtained. If any copyright material has not been
acknowledged please write and let us know so we may rectify in any future
reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be
reprinted, reproduced, transmitted, or utilized in any form by any electronic,
mechanical, or other means, now known or hereafter invented, including
photocopying, microfilming, and recording, or in any information storage or
retrieval system, without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please
access www.copyright.com (http://www.copyright.com/) or contact the Copyright
Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-
8400. CCC is a not-for-profit organization that provides licenses and registration
for a variety of users. For organizations that have been granted a photocopy
license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or
registered trademarks, and are used only for identification and explanation without
intent to infringe.

Library of Congress Cataloging-in-Publication Data

Names: Yang, Chaowei, author.


Title: Introduction to GIS programming and fundamentals with
Python and ArcGIS / Chaowei Yang.
Description: Boca Raton, FL : Taylor & Francis, 2017.
Identifiers: LCCN 2016047660| ISBN 9781466510081 (hardback :
alk. paper) | ISBN 9781466510098 (ebook)
Subjects: LCSH: Geographic information systems--Design. | Python
(Computer program language) | ArcGIS
Classification: LCC G70.212 .Y36 2017 | DDC 910.285/53--dc23
LC record available at https://lccn.loc.gov/2016047660

Visit the Taylor & Francis Web site at


http://www.taylorandfrancis.com

and the CRC Press Web site at


http://www.crcpress.com
For Chaowei Yang's parents, Chaoqing Yang and Mingju Tang,

for continually instilling curiosity and an exploring spirit


Contents

Preface
Acknowledgments
Editor
Contributors

Section I Overview

1. Introduction
1.1 Computer Hardware and Software
1.2 GIS and Programming
1.3 Python
1.4 Class and Object
1.5 GIS Data Models
1.6 UML
1.7 Hands-On Experience with Python
1.8 Chapter Summary
Problems

2. Object-Oriented Programming
2.1 Programming Language and Python
2.2 Class and Object
2.2.1 Defining Classes
2.2.2 Object Generation
2.2.3 Attributes
2.2.4 Inheritance
2.2.5 Composition
2.3 Point, Polyline, and Polygon
2.4 Hands-On Experience with Python
2.5 Chapter Summary
Problems

Section II Python Programming

3. Introduction to Python
3.1 Object-Oriented Support
3.2 Syntax
3.2.1 Case Sensitivity
3.2.2 Special Characters
3.2.3 Indentation
3.2.4 Keywords
3.2.5 Multiple Assignments
3.2.6 Namespace
3.2.7 Scope
3.3 Data Types
3.3.1 Basic Data Types
3.3.2 Composite Data Types
3.4 Miscellaneous
3.4.1 Variables
3.4.2 Code Style
3.5 Operators
3.6 Statements
3.7 Functions
3.8 Hands-On Experience with Python
3.9 Chapter Summary
Problems

4. Python Language Control Structure, File


Input/Output, and Exception Handling
4.1 Making Decisions
4.2 Loops
4.3 Other Control Structures
4.4 File Input/Output
4.5 Exceptions
4.6 Hands-On Experience with Python
4.6.1 Find the Longest Distance between Any Two
Points
4.6.2 Hands-On Experience: I/O, Create and Read a
File
4.6.3 Hands-On Experience: I/O, Flow Control, and
File
4.6.4 Hands-On Experience: Input GIS Point Data
from Text File
4.7 Chapter Summary
Problems

5. Programming Thinking and Vector Data Visualization


5.1 Problem: Visualizing GIS Data
5.2 Transforming Coordinate System
5.2.1 How to Determine Ratio Value?
5.3 Visualizing Vector Data
5.4 Point, Polyline, Polygon
5.5 Programming Thinking
5.5.1 Problem Analysis
5.5.2 Think in Programming
5.5.3 Match Programming Language Patterns and
Structure
5.5.4 Implement Program
5.6 Hands-On Experience with Python
5.6.1 Reading, Parsing, and Analyzing Text File Data
5.6.2 Create GIS Objects and Check Intersection
5.7 Chapter Summary
Problems

6. Shapefile Handling
6.1 Binary Data Manipulation
6.2 Shapefile Introduction
6.3 Shapefile Structure and Interpretation
6.3.1 Main File Structure of a Shapefile
6.3.1.1 Main File Header
6.3.1.2 Feature Record
6.3.2 Index File Structure (.shx)
6.3.3 The .dbf File
6.4 General Programming Sequence for Handling
Shapefiles
6.5 Hands-On Experience with Mini-GIS
6.5.1 Visualize Polylines and Polygons
6.5.2 Interpret Polyline Shapefiles
6.6 Chapter Summary
Problems

7. Python Programming Environment


7.1 General Python IDE
7.1.1 Python Programming Windows
7.1.1.1 Command-Line GUI
7.1.1.2 Interactive GUI
7.1.1.3 File-Based Programming
7.1.2 Python IDE Settings
7.1.2.1 Highlighting
7.1.2.2 General Setting of the Programming
Window
7.1.2.3 Fonts Setup for the Coding
7.1.3 Debugging
7.1.3.1 SyntaxError
7.1.3.2 Run-Time Exceptions
7.1.3.3 Handling Exceptions
7.1.3.4 Add Exception Handles and Clean-Up
Actions to File Read/Write
7.2 Python Modules
7.2.1 Module Introduction
7.2.2 Set Up Modules
7.2.3 System Built-In Modules
7.3 Package Management and Mini-GIS
7.3.1 Regular GIS Data Organization
7.3.2 Mini-GIS Package
7.4 Hands-On Experience with Mini-GIS
7.4.1 Package Management and Mini-GIS
7.4.2 Run and Practice the Mini-GIS Package
7.5 Chapter Summary
Problems

8. Vector Data Algorithms


8.1 Centroid
8.1.1 Centroid of a Triangle
8.1.2 Centroid of a Rectangle
8.1.3 Centroid of a Polygon
8.2 Area
8.2.1 Area of a Simple Polygon
8.2.2 Area of a Polygon with Hole(s)
8.3 Length
8.3.1 Length of a Straight Line Segment
8.3.2 Length of a Polyline
8.4 Line Intersection
8.4.1 Parallel Lines
8.4.2 Vertical Lines
8.5 Point in Polygon
8.5.1 A Special Scenario
8.6 Hands-On Experience with Python
8.6.1 Using Python to Draw a Polygon and Calculate
the Centroid
8.6.2 Using Python to Draw Polygon and Calculate
the Area of Polygon
8.6.3 Using Python to Draw Line Segments and
Calculate the Intersection
8.7 Chapter Summary
Problems
Section III Advanced GIS Algorithms and Their
Programming in ArcGIS

9. ArcGIS Programming
9.1 ArcGIS Programming
9.2 Introduction to ArcPy Package
9.2.1 ArcPy Functions, Classes, and Modules
9.2.2 Programming with ArcPy in ArcMap
9.2.3 Programming with ArcPy in Python Window
outside ArcMap
9.2.4 Using Help Documents
9.3 Automating ArcTools with Python
9.4 Accessing and Editing Data with Cursors
9.4.1 SearchCursor
9.4.2 UpdateCursor
9.4.3 InsertCursor
9.4.4 NumPy
9.5 Describing and Listing Objects
9.5.1 Describe
9.5.2 List
9.6 Manipulating Complex Objects
9.7 Automating Map Production
9.8 Creating ArcTools from Scripts
9.9 Handling Errors and Messages
9.10 External Document and Video Resources
9.11 Implementing Spatial Relationship Calculations Using
ArcGIS
9.12 Summary
9.13 Assignment

10. Raster Data Algorithm


10.1 Raster Data
10.2 Raster Storage and Compression
10.2.1 Run Length Coding
10.2.2 Quad Tree
10.3 Raster Data Formats
10.3.1 TIFF
10.3.2 GeoTIFF
10.3.3 IMG
10.3.4 NetCDF
10.3.5 BMP
10.3.6 SVG
10.3.7 JPEG
10.3.8 GIF
10.3.9 PNG
10.4 Color Representation and Raster Rendering
10.4.1 Color Representation
10.4.2 Raster Rendering
10.5 Raster Analysis
10.6 Hands-On Experience with ArcGIS
10.6.1 Hands-On Practice 10.1: Raster Color Renders
10.6.2 Hands-On Practice 10.2: Raster Data Analysis:
Find the Area with the Elevation Range between
60 and 100 and the Land Cover Type as
“Forest”
10.6.3 Hands-On Practice 10.3. Access the Attribute
Information of Raster Dataset and Calculate the
Area
10.7 Chapter Summary
Problems

11. Network Data Algorithms


11.1 Network Representation
11.1.1 Basics Network Representation
11.1.2 Directed and Undirected Networks
11.1.3 The Adjacency Matrix
11.1.4 Network Representation in GIS
11.2 Finding the Shortest Path
11.2.1 Problem Statement
11.2.2 A Brute Force Approach for the Shortest Path
Algorithm
11.2.3 Dijkstra Algorithm
11.3 Types of Network Analysis
11.3.1 Routing
11.3.2 Closest Facility
11.3.3 Service Areas
11.3.4 OD Cost Matrix
11.3.5 Vehicle Routing Problem
11.3.6 Location-Allocation
11.4 Hands-On Experience with ArcGIS
11.5 Chapter Summary
Problems

12. Surface Data Algorithms


12.1 3D Surface and Data Model
12.1.1 Surface Data
12.1.2 Surface Data Model
12.1.2.1 Discrete Data
12.1.2.2 Continuous Data
12.2 Create Surface Model Data
12.2.1 Create Grid Surface Model
12.2.2 Creating TIN Surface Model
12.2.3 Conversion between TIN and Raster Surface
Models
12.3 Surface Data Analysis
12.3.1 Elevation
12.3.2 Slope
12.3.3 Aspect
12.3.4 Hydrologic Analysis
12.4 Hands-On Experience with ArcGIS
12.4.1 Hands-On Practice 12.1: Conversion among
DEM, TIN, and Contours
12.4.2 Hands-On Practice 12.2: Generate Slope and
Aspect
12.4.3 Hands-On Practice 12.3: Flow Direction
12.5 Chapter Summary
Problems

Section IV Advanced Topics

13. Performance-Improving Techniques


13.1 Problems
13.2 Disk Access and Memory Management
13.2.1 File Management
13.2.2 Comprehensive Consideration
13.3 Parallel Processing and Multithreading
13.3.1 Sequential and Concurrent Execution
13.3.2 Multithreading
13.3.3 Load Multiple Shapefiles Concurrently Using
Multithreading
13.3.4 Parallel Processing and Cluster, Grid, and Cloud
Computing
13.4 Relationship Calculation and Spatial Index
13.4.1 Bounding Box in GIS
13.4.2 Spatial Index
13.5 Hands-On Experience with Mini-GIS
13.5.1 Data Loading with RAM as File Buffer
13.5.2 Data Loading with Multithreading
13.5.3 Bounding Box Checking to Speed Up
Intersection
13.5.4 Line Intersection Using R-Tree Index
13.6 Chapter Summary
Problems

14. Advanced Topics


14.1 Spatial Data Structure
14.1.1 Raster Data Structure in NetCDF/HDF
14.1.2 Application of NetCDF/HDF on Climate Study
14.2 GIS Algorithms and Modeling
14.2.1 Data
14.2.2 Density Analysis
14.2.3 Regression Analysis (OLS and GWR)
14.3 Distributed GIS
14.3.1 System Architecture
14.3.2 User Interface
14.4 Spatiotemporal Thinking and Computing
14.4.1 Problem: Dust Simulation and Computing
Challenges
14.4.2 Methodology 1: Utilizing High-Performance
Computing to Support Dust Simulation
14.4.3 Methodology 2: Utilizing Spatiotemporal
Thinking to Optimize High-Performance
Computing
14.4.3.1 Dust Storms’ Clustered Characteristics:
Scheduling Methods
14.4.3.2 Dust Storms’ Space–Time Continuity:
Decomposition Method
14.4.3.3 Dust Storm Events Are Isolated:
Nested Model
14.4.4 Methodology 3: Utilizing Cloud Computing to
Support Dust Storm Forecasting
14.5 Chapter Summary
Problems

References
Index
Preface

Why Another GIS Programming Text?


Geographical information system (GIS) has become a popular tool
underpinning many aspects of our daily life from routing for
transportation to finding a restaurant to responding to emergencies.
Convenient GIS tools are developed with different levels of
programming from scripting, using python for ArcGIS, to crafting
new suites of tools from scratch. How much programming is needed
for projects largely depends on the GIS software, types of
applications, and knowledge structure and background of the
application designer and developer. For example, simple scripting
integrates online mapping applications using Google maps.
Customized spatial analyses applications are routinely using ArcGIS
with minimum programming. Many develop an application leveraging
open-source software for managing big data, modeling complex
phenomena, or responding to concurrent users for popular online
systems. The best design and development of such applications
require designers and developers to have a thorough understanding
of GIS principles as well as the skill to choose between commercial
and open-source software options. For most GIS professionals, this
is a challenge because most are either GIS tool end users or
information technology (IT) professionals with a limited
understanding of GIS.
To fill this gap, over the last decade, Chaowei Yang launched an
introductory GIS programming course that was well received.
Enrollment continues to rise and students report positive feedback
once they are in the workplace and use knowledge developed from
the class. To benefit a broader spectrum of students and
professionals looking for training materials to build GIS programming
capabilities, this book is written to integrate and refine the authors’
knowledge accumulated through courses and associated research
projects.
The audience for this book is both IT professionals to learn the GIS
principles and GIS users to develop programming skills. On the one
hand, this book provides a bridge for GIS students and professionals
to learn and practice programming. On the other hand, it also helps
IT professionals with programming experience to acquire the
fundamentals of GIS to better hone their programming skills for GIS
development.
Rather than try to compete with the current GIS programming
literature, the authors endeavor to interpret GIS from a different
angle by integrating GIS algorithms and programming. As a result,
this book provides a practical knowledge that includes fundamental
GIS principles, basic programming skills, open-source GIS
development, ArcGIS development, and advanced topics. Structured
for developing GIS functions, applications, and systems, this book is
expected to help GIS/IT students and professionals to become more
competitive in the job market of GIS and IT industry with needed
programming skills.

What Is Included in the Text?


This book has four sections. Section I (Chapters 1 and 2) is an
overview of GIS programming and introduces computer and
programming from a practical perspective. Python (integral
programming language for ArcGIS) programming is extensively
presented in Section II (Chapters 3 through 8) in the context of
designing and developing a Mini-GIS using hands-on experience
following explanations of fundamental concepts of GIS. Section III
(Chapters 9 through 12) focuses on advanced GIS algorithms and
information on how to invoke them for programming in ArcGIS.
Advanced topics and performance optimization are introduced in
Section IV (Chapters 13 and 14) using the Mini-GIS developed.
Chapter 1 introduces computer, computer programming, and GIS.
In addition, the Unified Markup Language (UML) is discussed for
capturing GIS models implemented through simple Python
programming. Chapter 2 introduces object-oriented programming
and characteristics with examples of basic GIS vector data types of
Point, Polyline, and Polygon.
Chapter 3 introduces Python syntax, operators, statements,
miscellaneous features of functions, and Python support for object-
oriented programming. Using GIS examples, Chapter 4 introduces
Python language control structures, file input/output, and exception
handling. Chapter 5 presents programming thinking using the
visualization of vector data as an example of the workflow of this
critical process in programming. Chapter 6 introduces the Python
integrated programming environment (IDE), modules, package
management, and the Mini-GIS package. Chapter 7 discusses
shapefile formats and steps on how to handle shapefiles within the
Mini-GIS. Chapter 8 introduces vector data processing algorithms
and includes line intersection, centroid, area, length, and point in
polygon. This presentation includes how Mini-GIS/ArcGIS supports
these algorithms.
Chapter 9 bridges Sections II and III by introducing ArcGIS
programming in Python using ArcPy, ArcGIS programming
environment, automating tools, accessing data, describing objects,
and fixing errors. Chapter 10 introduces raster data algorithms,
including raster data format, storage, and compression with hands-
on experience using ArcGIS. Chapter 11 addresses network data
algorithms for representing networks and calculating the shortest
path in principles and using ArcGIS. Chapter 12 explores surface or
3D data representation of 3D data, converting data formats and 3D
analyses for elevation, slope, aspect, and flow direction with
examples in ArcGIS programming.
Chapter 13 introduces performance-improving techniques and
includes storage access and management, parallel processing and
multithreading, spatial index, and other techniques for accelerating
GIS as demonstrated in Mini-GIS. Advanced topics, including GIS
algorithms and modeling, spatial data structure, distributed GIS,
spatiotemporal thinking, and computing, are presented in Chapter
14.

Hands-On Experience
As a practical text for developing programming skills, this book
makes every effort to ensure the content is as functional as possible.
For every introduced GIS fundamental principle, algorithm and
element, an example is explored as a hands-on experience using
Mini-GIS and/or ArcGIS with Python. This learning workflow helps
build a thorough understanding of the fundamentals and naturally
maps to the fundamentals and programming skills.
For system and open-source development, a step-by-step
development of a python-based Mini-GIS is presented. For
application development, ArcGIS is adopted for illustration.
The Mini-GIS is an open-source software developed for this text
and can be adopted for building other GIS applications. ArcGIS, a
commercial product from ESRI, is used to experience state-of-the-art
commercial software. For learning purpose, ArcGIS is available for
free from ESRI.

Online Materials
This book comes with the following online materials:
• Instructional slides for instructors using this text for classroom
education and professionals to assist in learning GIS
programming.
• Python codes for class exercises and hands-on experiences and
structured and labeled by chapter to code the chapter’s
sequence.
• Mini-GIS as an open-source package for learning the GIS
fundamentals and for exemplifying GIS principles and
algorithms.
• Answers to problems for instructors to check their solutions.

The Audience for and How to Use This Text


This text serves two functions: a text for systematic building GIS
programming skills and a reference for identifying a python solution
for specific GIS algorithms or function from scratch and/or ArcGIS.
The text is intended to assist four categories of readers:
• Professors teaching GIS programming or GIS students learning
with a specific focus on hands-on experience in classroom
settings.
• Programmers wanting to learn GIS programming by scanning
through Section I and Chapters 3 and 4, followed by a step-
by-step study of the remaining chapters.
• GIS system designers most interested in algorithm
descriptions, algorithms implementation from both scratch and
ArcGIS to assemble a practical knowledge about GIS
programing to aid in GIS choice for future development.
• IT professionals with a curiosity of GIS for GIS principles but
skipping the programming exercises.
The intent of the authors for such a broad audience is based on the
desire to cultivate a competitive professional workforce in GIS
development, enhance the literature of GIS, and serve as a practical
introduction to GIS research.

How Did We Develop This Text?


The text material was first developed by Professor Chaowei Yang in
2004 and offered annually in a classroom setting during the past
decade. During that time span, many students developed and
advanced their programming skills. Some became professors and
lecturers in colleges and were invited to write specific book chapters.
Keeping the audience in mind, several professors who teach GIS
programming in different cultural backgrounds and university
settings were invited to review the book chapters.
The following is the book development workflow:

• Using his course materials, Professor Yang structured this book


with Irma Shagla’s help, and the text’s structure was
contracted to be published as a book. Assistant Professor
Qunying Huang, University of Wisconsin, Madison, explored
using the earlier versions of the text’s materials. Assistant
Professors Huang and Zhenlong Li, University of South
Carolina, developed Section II of the text in collaboration with
Professor Yang.
• Dr. Min Sun, Ms. Manzhu Yu, Mr. Yongyao Jiang, and Mr. Jizhe
Xia developed Section III in collaboration with Professor Yang.
• Professor Yang edited and revised all chapters to assure a
common structure and composition.
• Ms. Manzhu Yu and Professor Yang edited the course slides.
• Assistant Professor Li, Mr. Kai Liu, Mrs. Joseph George, and Ms.
Zifu Wang edited Mini-GIS as the software for the text.
• After the above text and course materials were completed,
four professors and two developers were invited to review the
text’s content.
• The assembled materials for the text were finally reviewed by
several professionals, including Ms. Alena Deveau, Mr. Rob
Culbertson, and Professor George Taylor.
• The text was formatted by Ms. Minni Song.
• Ms. Manzhu Yu and Professor Yang completed a final review of
the chapters, slides, codes, data, and all relevant materials.
Acknowledgments

This text is a long-term project evolving from the course


“Introduction to GIS Programming” developed and refined over the
past decade at George Mason University. Many students and
professors provided constructive suggestions about what to include,
how best to communicate and challenge the students, and who
should be considered as audience of the text.
The outcome reflects Professor Yang’s programming career since
his undergraduate theses at China’s Northeastern University under
the mentoring of Professor Jinxing Wang. Professor Yang was further
mentored in programming in the GIS domain by Professors Qi Li and
Jicheng Chen. His academic mentors in the United States, Professors
David Wong and Menas Kafatos, provided support over many
decades, giving him the chance to teach the course that eventually
led to this text.
Professor Yang thanks the brilliant and enthusiastic students in his
classes at George Mason University. Their questions and critiques
honed his teaching skills, improved the content, and prompted this
effort of developing a text.
Professor Yang thanks his beloved wife, Yan Xiang, and children—
Andrew, Christopher, and Hannah—for accommodating him when
stealing valuable family time to complete the text.
Ms. Manzhu Yu extends her gratitude to the many colleagues who
provided support, and read, wrote, commented, and assisted in the
editing, proofreading, and formatting of the text.
Assistant Professor Huang thanks her wonderful husband, Yunfeng
Jiang, and lovely daughter, Alica Jiang.
Dr. Min Sun thanks her PhD supervisor, Professor David Wong, for
educating her. She also thanks David Wynne, her supervisor in ESRI
where she worked as an intern, and her other coworkers who
collectively helped her gain a more complete understanding of
programming with ESRI products. Last but not least, she thanks her
parents and lovely dog who accompanied her when she was writing
the text.
Yongyao Jiang thank his wife Rui Dong, his daughter Laura, and his
parents Lixia Yao and Yanqing Jiang.
Editor

Chaowei Yang is a professor of geographic information science at


George Mason University (GMU). His research interest is on utilizing
spatiotemporal principles to optimize computing infrastructure to
support science discoveries. He founded the Center for Intelligent
Spatial Computing and the NSF Spatiotemporal Innovation Center.
He served as PI or Co-I for projects totaling more than $40 M and
funded by more than 15 agencies, organizations, and companies. He
has published 150+ articles and developed a number of GIS courses
and training programs. He has advised 20+ postdoctoral and PhD
students who serve as professors and scientists in highly acclaimed
U.S. and Chinese institutions. He received many national and
international awards, such as the U.S. Presidential Environment
Protection Stewardship Award in 2009. All his achievements are
based on his practical knowledge of GIS and geospatial information
systems. This book is a collection of such practical knowledge on
how to develop GIS tools from a programming perspective. The
content was offered in his programming and GIS algorithm classes
during the past 10+ years (2004–2016) and has been adopted by
his students and colleagues serving as professors at many
universities in the United States and internationally.
Contributors

Fei Hu is a PhD candidate at the NSF Spatiotemporal Innovation


Center, George Mason University. He is interested in utilizing high-
performance cloud computing technologies to manage and mine big
spatiotemporal data. More specifically, he has optimized the
distributed storage system (e.g., HDFS) and parallel computing
framework (e.g., Spark, MapReduce) to efficiently manage, query,
and analyze big multiple-dimensional array-based datasets (e.g.,
climate data and remote sensing data). He aims to provide scientists
with on-demand data analytical capabilities to relieve them from
time-consuming computational tasks.

Qunying Huang is an assistant professor in the Department of


Geography at the University of Wisconsin, Madison. Her fields of
expertise include geographic information science (GIScience), cyber
infrastructure, spatiotemporal big data mining, and large-scale
environmental modeling and simulation. She is very interested in
applying different computing models, such as cluster, grid, GPU,
citizen computing, and especially cloud computing, to address
contemporary big data and computing challenges in the GIScience.
Most recently, she is leveraging and mining social media data for
various applications, such as emergency response, disaster
mitigation, and human mobility. She has published more than 50
scientific articles and edited two books.

Yongyao Jiang is a PhD candidate in Earth systems and


geoinformation sciences at the NSF Spatiotemporal Innovation
Center, George Mason University. He earned an MS (2014) in
GIScience at Clark University and a BE (2012) in remote sensing at
Wuhan University. His research focuses on data discovery, data
mining, semantics, and cloud computing. Jiang has received the NSF
EarthCube Visiting Graduate Student Early-Career Scientist Award
(2016), the Microsoft Azure for Research Award (2015), and first
prize in the Robert Raskin CyberGIS Student Competition (2015). He
serves as the technical lead for MUDROD, a semantic discovery and
search engine project funded by NASA’s AIST Program.

Zhenlong Li is an assistant professor in the Department of


Geography at the University of South Carolina. Dr. Li’s research
focuses on spatial high-performance computing, big data
processing/mining, and geospatial cyberinfrastructure in the area of
data and computational intensive GISciences. Dr. Li’s research aims
to optimize spatial computing infrastructure by integrating cutting-
edge computing technologies and spatial principles to support
domain applications such as climate change and hazard
management.

Kai Liu is a graduate student in the Department of Geography and


GeoInformation Sciences (GGS) in the College of Science at George
Mason University. Previously, he was a visiting scholar at the Center
of Intelligent Spatial Computing for Water/Energy Science (CISC)
and worked for 4 years at Heilongjiang Bureau of Surveying and
mapping in China. He earned a BA in geographic information science
at Wuhan University, China. His research focuses on geospatial
semantics, geospatial metadata management, spatiotemporal cloud
computing, and citizen science.

Min Sun is a research assistant professor in the Department of


Geography and Geoinformation Science at George Mason University.
Her research interests include measuring attribute uncertainty in
spatial data, developing visual analytics to support data exploration,
WebGIS, and cloud computing. She is an expert in ArcGIS
programming and also serves as the assistant director for the U.S.
NSF Spatiotemporal Innovation Center.
Jizhe Xia is a research assistant professor at George Mason
University. He earned a PhD in Earth systems and geoinformation
sciences at the George Mason University in the spring of 2015. Dr.
Xia’s research interests are spatiotemporal computing, cloud
computing, and their applications in geographical sciences. He
proposed a variety of methods to utilize spatiotemporal patterns to
optimize big data access, service quality (QoS) evaluation, and cloud
computing application.

Manzhu Yu is a PhD candidate in the Department of Geography


and Geoinformation Science, George Mason University. Her research
interests include spatiotemporal methodology, pattern detection, and
spatiotemporal applications on natural disasters. She received a
Presidential Scholarship from 2012 to 2015. She has published
approximately 10 articles in renowned journals, such as PLoS ONE
and IJGIS, and contributed as a major author in several book
chapters.
Other documents randomly have
different content
Every part of the neighborhood of the city abounds with evidence
of the existence of volcanic fire, under ground. As I walked along the
road I found the smoke issuing from holes and clefts in the ground:
and on placing my hands in these fissures, I found them so hot that
one might roast eggs in them. Yet people build houses and pass
their lives upon these spots, without troubling themselves with the
reflection that they live on a thin crust of soil hanging over a
yawning gulf of fire! In my walk homeward I passed by a hill, about
the size of Bunker Hill, which some time ago rose up suddenly, in a
single night, from a level plain. It is now all overgrown with weeds
and bushes. If it were not for Mount Vesuvius, which affords a
breathing-place for these subterranean fires, it is highly probable
that the whole face of the country would be rent into fragments by
earthquakes and volcanic explosions. Vesuvius may be called the
safety valve of the country.
On my way home, I was stopped on the road by an immense
crowd. It was a funeral. A long train of monks and priests attended
the hearse, each one clad in a dress which resembled a loose white
sheet thrown over the head and falling down to the feet, with little
round holes cut for the eyes. They looked like a congregation of
spectres from the other world. The corpse was that of an army
officer. He lay not in a coffin, but exposed in full uniform upon a
crimson pall edged with gold. Everything accompanying the hearse
was pompous, showy and dazzling.
This indeed is the characteristic of the people; almost everything
in their manners and mode of life is calculated to strike the senses
and produce effect by dazzling and external display. Nothing can
surpass the splendor of their religious processions, the rich and
imposing decoration of their churches, and the pomp and parade
and showy display which attend the solemnization of all their public
festivals. The population of these countries are exceedingly sensitive
to the effect of all these exhibitions, and their lively and acute
feelings bring them under the influence of whatever is addressed
strongly to their outward senses. They are little guided by sound
reason and sober reflection, but are at the mercy of all the impulses
that arise from a keen sensibility and an excitable imagination.
Story of Philip Brusque.

chapter xi.

The meeting.—​Discussion.—​A government adopted.—​Conclusion for


the present.

The time for the meeting of the people to take measures for the
establishment of a government for the island of Fredonia, was fixed
for the day which followed the events narrated in the last chapter.
This meeting was looked forward to with intense interest, by all
parties. The men, who knew that there could be no peace or safety
in society, without government, regarded the event as likely to
decide whether the inhabitants of the island were to be happy or
miserable.
The women, who were perhaps not apt to reflect upon these
things, had also learned from their experience that a government,
establishing and enforcing laws, was indispensable to the quiet and
security of society: they saw that their own lives, their freedom, their
homes, were not secure, without the protection of law. Even the
children had found that government was necessary, and these as
well as the women, were now rejoicing at the prospect of having this
great blessing bestowed upon the little community of Fredonia.
The day for the meeting arrived, and the men of the island
assembled, agreeably to the appointment. First came the men of the
tent party, and then, those from the Outcast’s cave. The latter were
greeted by a shout of welcome, and mingling with the rest, a kind
shaking of hands took place between those, who so lately were
arrayed against each other in deadly conflict.
After a short time, Mr. Bonfils, being the oldest man of the
company, called the assembly to order, and he being chosen
chairman, went on to state the objects of the assembly, in the
following words:
“My dear friends; it has been the will of Providence to cast us
together upon this lonely, but beautiful island. It would seem that so
small a community, regulated by mutual respect and mutual good
will, might dwell together in peace and amity, without the restraints
of law, or the requisitions of government. But history has told us,
that in all lands, and in all ages, peace, order, justice, are only to be
secured by established laws, and the means of carrying them into
effect. There must be government, even in a family; there must be
some power to check error, to punish crime, to command obedience
to the rule of right. Where there is no government, there the violent,
the unjust, the selfish, have sway, and become tyrants over the rest
of the community. Our own unhappy experience teaches us this.
“Now we have met together, with a knowledge, a conviction of
these truths. We know, we feel, we see that law is necessary, and
that there must be a government to enforce it. Without this, there is
no peace, no security, no quiet fireside, no happy home, no pleasant
society. Without this, all is fear, anxiety, and anarchy.
“Let us then enter upon the duties of this occasion, with a proper
sense of the obligation that rests upon us; of the serious duty which
is imposed on every man present. We are about to decide questions
which are of vital interest, not only to each actor in this scene, but
to these wives and sisters and children, whom we see gathered at a
little distance, watching our proceedings, as if their very lives were
at stake.”
This speech was followed by a burst of applause; but soon a man
by the name of Maurice arose—one who had been a leading
supporter of Rogere—and addressed the assembly as follows:
“Mr. Chairman; it is well known that I am one of the persons who
have followed the opinions of that leader who lost his life in the
battle of the tents. I followed him from a conviction that his views
were right. The fact is, that I have seen so much selfishness in the
officers of the law, that I have learned to despise the law itself.
Perhaps, however, I have been wrong. I wish to ask two questions—
the first is this: Is not liberty a good thing? You will answer that it is.
It is admitted, all the world over, that liberty is one of the greatest
enjoyments of life. My second question then is—Why restrain liberty
by laws? Every law is a cord put around the limbs of liberty. If you
pass a law that I shall not steal, it is restraint of my freedom; it
limits my liberty; it takes away a part of that, which all agree is one
of the greatest benefits of life. And thus, as you proceed to pass one
law after another, do you not at last bind every member of society
by such a multiplied web of restraints, as to make him the slave of
law? And is not a member of a society where you have a system of
laws, like a fly in the hands of the spider, wound round and round by
a bondage that he cannot burst, and which only renders him a slave
of that power which has thus entangled him?”
When Maurice had done, Brusque arose, and spoke as follows:
“Mr. Chairman; I am happy that Mr. Maurice has thus stated a
difficulty which has arisen in my own mind: he has stated it fairly,
and it ought to be fairly answered. Liberty is certainly a good thing;
without it, man cannot enjoy the highest happiness of which he is
capable. All useless restraints of liberty are therefore wrong; all
unnecessary restraints of liberty are wrong. But the true state of the
case is this: we can enjoy no liberty, but by submitting to certain
restraints. It is true that every law is an abridgment of liberty; but it
is better to have some abridgment of it, than to lose it all.
“I wish to possess my life in safety; accordingly I submit to a law
which forbids murder: I wish to possess my property in security; and
therefore I submit to a law which forbids theft and violence: I wish
to possess my house without intrusion; I therefore submit to a law
which forbids one man to trespass upon the premises of another: I
wish to go and come, without hindrance, and without fear; I
therefore submit to a law which forbids highway robbery, and all
interference with a man’s pursuit of his lawful business.
“Now, if we reflect a little, we shall readily see that by submitting
to certain restraints, we do actually increase the amount of practical,
available, useful liberty. By submitting to laws, therefore, we get
more freedom than we lose. That this is the fact, may be easily
tested by observation. Go to any civilized country, where there is a
settled government and a complete system of laws, and you will
find, in general, that a man enjoys his house, his home, his lands,
his time, his thoughts, his property, without fear: whereas, if you go
to a savage land, where there is no government and no law, there
you will find your life, property, and liberty, exposed every moment
to destruction. Who, then, can fail to see that the very laws which
abridge liberty in some respects, actually increase the amount of
liberty enjoyed by the community.”
Maurice professed himself satisfied with this solution of his
difficulties; and the meeting proceeded to appoint a committee, to
go out and prepare some plan, to be submitted to the meeting. This
committee returned, and after a short space, brought in a resolution,
that Mr. Bonfils be for one year placed at the head of the little
community, with absolute power; and that, at the end of that period,
such plan of government as the people might decree, should be
established.
This resolution was adopted unanimously. The men threw up their
hats in joy, and the air rang with acclamations. The women and
children heard the cheerful sounds, and ran toward the men, who
met them half way. It was a scene of unmixed joy. Brusque and
Emilie met, and the tears of satisfaction fell down their cheeks.
François went to his aged mother, and even her dimmed eye was
lighted with pleasure at the joyful issue of the meeting.
We must now take leave of the island of Fredonia—at least for a
time—and whether we ever return to it, must depend upon the
wishes of our young readers. If they are anxious to see how the
people flourished under the reign of their aged old chief, and how
they proceeded in after years, perchance we may lift the curtain and
show them the scene that lies behind it. But I hope that our readers
have learnt, that not only men and women, but children, have an
interest in government, and therefore that it is a thing they should
try to understand.
The Tanrec.

This creature resembles the hedgehog, but is larger than that


animal, and is destitute of a tail. It does not roll itself into a ball, for
defence, like the former animal. It passes three of the warmest
months of the year in a state of torpor, differing in this respect from
other animals, which become torpid from extreme cold. Its legs are
very short, and it moves very slowly. It is fond of the water, and
loves to wallow in the mud. It moves about only by night. There are
three species, all found in the island of Madagascar.

Letter from a Correspondent.


Little Readers of the Museum:
I sometimes read Mr. Robert Merry’s Museum, and I like it
very much, as I presume all his little “blue-eyed and black-
eyed readers” do. He talks very much like good old Peter
Parley. I should think he had heard him tell many a story
while he rested his wooden leg on a chair, with a parcel of
little laughing girls and boys around him. Oh, how many times
I have longed to see him, and crawl up in his lap and hear his
stories! But Mr. Merry says he is dead, and I never can see
him. I am very—very sorry, for I hoped I should sometime
visit him, for I loved him very much, and I guess he would
have loved me some, for I like old people, and always mean
to treat them with respect. How cruel it was for others to
write books and pretend that Peter Parley wrote them!—for it
seems that this shortened his life. I am glad, however, that
Mr. Merry has his writings, for I think he loves his little friends
so well that he will frequently publish some of them. I said
that I loved Peter Parley, and I guess you will not think it
strange that I should, when I tell you what a useful little book
he once published, and how much pleasure I took in reading
it. He wrote a great many interesting pieces which I read and
studied, and they did me much good, I think. I hope that the
little readers of the Museum will learn a good deal from what
they read.
Peter Parley wrote a piece which told us how to make
pens. I read it over, and over again, and, finally, I thought I
would see if I could not make one. So I went to my little desk
and took out a quill, got my aunt’s knife and laid the book
before me and tried to do just as Peter Parley told me I must.
I succeeded very well, and my friends were quite pleased.
This encouraged me very much, and soon I made them so
well that my teachers made me no more pens. By-and-by my
little associates got me to make and mend theirs, and I loved
the business very much.
Well, a few years since, I went to a beautiful village to
attend school, where a splendid academy stands, around
which, are large green trees, under whose shade my little
readers would love to sit. There I staid two or three years.
Often did I walk out with the teachers, whom I loved, to
botanize, or ramble, with nimble step, over the beautiful hills
of that sweet place, and listen to the constant murmur of its
waterfalls, or gather the delicate flowers that grew so
plentifully there. But to my story. My teachers saw that I
made my own pens, and occasionally, when they were busy,
would bring me one to make for them. The students soon
found it out, and I had plenty of business. One day the
principal of the school came to me and offered to compensate
me by giving me my tuition one term, which was six dollars, if
I would make and mend pens. I did not accept the money of
course, though I cheerfully and gladly performed the small
service.
So you see, Peter Parley’s instruction has done me a great
deal of good, for how many persons there are who cannot
make a good pen, because they never learned how.
My little readers, I am now almost twenty years old, but I
still remember many other things which I read in Peter
Parley’s books when I was a little girl. Mr. Robert Merry talks
and writes just like him, almost, and I hope you will love to
read and study attentively Merry’s Museum, for it is a good
little work, and a pleasant one. Be assured, my young friends,
you can learn a great deal from it, if you read it carefully. I
should like to say much more to you, but I cannot now. I
have been sitting by the fire, in a rocking-chair, writing this on
a large book, with a pussy under it for a desk, but she has
just jumped from my lap, and refuses to be made a table of
any longer. So farewell.
Your young friend,
Laura.
Springfield, Jan. 6, 1842

Cookery Book.—“Has that cookery book any pictures?” said Miss C.


to a bookseller. “No, miss, none,” was the answer. “Why,” exclaimed
the witty young lady, “what is the use of telling us how to make a
good dinner, if they give us no plates?”
Names of different kinds of Type.

Great Primer I will now tell you something


English about printing. It may be useful to
Pica spend a few lines in giving you an idea of
Small Pica the names which are applied to the different sorts
Long Primer of type employed in the printing of books. This I shall
Bourgeois do by putting against each line of the present paragraph
the
Brevier name of the type in which it is printed. I shall not
attempt to
Minion explain the origin of these odd terms, but content myself
with giving
Nonpareil you a notion of the proportion which one type bears to
another; so as to enable
Pearl you, when you become author, to give instructions to
your printer as to the type you wish him to use.
Condensed And by way of enlarging your vocabulary of types, I will
Full-face add a few examples of fancy letters, adapted to the title-
Antique PAGES OF BOOKS, SHOW BILLS OF VARIOUS
Gothic Condensed KINDS, BUSINESS CARDS, VISITING CARDS, AND MANY
OTHER
Black purposes. If you will go to Mr. Dickinson’s printing-office,
Script No. 52 Washington Street, Boston, you will see a
Extended GREAT VARIETY
Gothic OF FANCY TYPE; AND YOU WILL
Gothic Outline ALSO SEE HOW THEY ARE SET
Tuscan Shade UP, AND HOW THEY ARE
Full-face (Capitals) PRINTED, WITH WHAT HE CALLS A
Phantom ROTARY PRESS.
Condensed (Capitals) YOU WILL ALSO SEE PRESSES WORKED BY STEAM, AND
EN-
Full-face Italic gaged in printing books, newspapers,
Extra Condensed PAMPHLETS, MAGAZINES, AND MANY
Shaded OTHER THINGS. IF YOU WILL
GO TO NO. 66 CONGRESS STREET,
Ornamented YOU WILL FIND WHERE
Title Letter MERRY’S MUSEUM
French Shade IS STEREOTYPED.
PETER PARLEY’S NEW STORIES.
No. II.

About the Three Sisters.

There were once three little girls, who went to see a balloon.
When they got to the place, they saw that it was a great bag of silk,
with a netting put over it, and to this netting, a little car was
attached.
There were a great many people around the place, anxious to see
the balloon rise and sail away in the air. There were several persons
very busy in filling the balloon with what is called hydrogen gas,
which is a kind of air, and so light that it rises upward and carries the
balloon with it.
Pretty soon there was considerable gas in the balloon, and it then
began to ascend a little; in a short time it rose more, and, after a
few minutes, it seemed in such a hurry to get away that several men
were obliged to take hold of the net-work, and restrain it till all was
ready.
Now a man by the name of Lauriat, who had made the balloon,
was going up with it. When all was prepared, he got into the little
car, holding in his lap a cat fastened in a cage, with a thing like an
umbrella, attached to it. In a few moments Mr. Lauriat called out, “all
right!”—and the men let go of the net-work, and up went the
balloon, and up went Mr. Lauriat in the little car hanging beneath it!
It was a beautiful sight, and the people were so delighted, that
the air rang with acclamations. The three little girls, whom we shall
call History, Poetry, and Romance, were as much pleased as
anybody, and shouted, with their little voices, as loud as they could.
What made it all more pleasant, was that the people could see Mr.
Lauriat, who waved a little flag, as he ascended; and though it was
almost frightful to see a man so high in the air, yet he appeared
quite at his ease and very much gratified.
When the balloon had risen to a great height, so as to look only
about as large as my wig, Mr. Lauriat let the cat and the cage fall;
but the thing like an umbrella, called a parachute, kept it from
coming down very swiftly. It was a beautiful sight to see! At first the
cage and parachute were hardly visible, but they grew more and
more distinct, and at last they came nearer and nearer, and finally
dropped down upon a distant hill. Some boys ran to the place, and
behold, puss was in the cage, a good deal frightened, but as safe as
ever. There are very few cats that have had such a ride as this!
At last the balloon looked no bigger than a fly, and then it entered
a cloud and was seen no more. The company separated and went to
their homes, all talking of the balloon, and Mr. Lauriat, and puss, and
the parachute. Our three little girls also returned to their homes,
and, rushing to their mother, they were each so anxious to tell the
story, that neither could be understood. At last their mother said to
them, “My dear children, I must hear you, one at a time. Let us all
sit down, and History, who is the oldest; shall tell the story first.
Then Poetry shall tell it, and then Romance shall tell it.”
To this they all agreed, and History began as follows: “We
reached the place about four o’clock in the afternoon. There were
already many people present, but as the time advanced, others
came, and soon about two thousand people were there.
“The balloon was enclosed in a fence, made of boards, and none
but the workmen and Mr. Lauriat were permitted to enter the
enclosure. There were six large casks around, in which they made
the hydrogen gas; this was conducted to the balloon by means of
tubes.
“The balloon was a large bag of silk, about forty feet long and
eighty feet in circumference. When full of gas, it was shaped like a
bell-pear, the stem downwards. The silk was oiled, so as to retain
the gas, which is lighter than the air, and floats upward in it, as a
piece of wood does in water. The balloon was enclosed in a net-
work, and beneath, a little car, or boat, was attached to it, and in
this, Mr. Lauriat sat, when he ascended.
“As the gas was conducted to the balloon, the latter gradually
swelled out, and when it was full, the men who held it down, let go;
and it ascended with Mr. Lauriat, into the air. He was cheered by the
voices of the people, and he waved a little flag back and forth, in
return. It was a pleasing scene, in which fear for the airy sailor, and
admiration of his skill and courage, were mingled.
“Mr. Lauriat had taken up with him a cat, enclosed in a cage, and
to this cage a parachute was attached. When he had risen to the
height of about a thousand feet, he let the cage go, and it came
gently down like a snow-flake, falling at last on a distant hill. The cat
was taken up unhurt. The balloon gradually grew less and less to the
vision, and finally it disappeared in a thick cloud, upon which the
rays of the evening sun were now falling.”
Such was the account given of the scene by History; and now
Poetry began:
“Oh mother, it was beautiful! The balloon went up like a soap-
bubble, and it sailed along on the air like a bird. I could hardly
believe that it was not alive, it glided in the air so gently, and so
gracefully! And Mr. Lauriat, he looked so happy! Oh it was wonderful
to see a man so high in the air, and to see him so much at his ease!
I felt afraid for him, and yet the scene pleased me the more. I
wished to be with him, though I knew I should have been
frightened. And yet it seemed so pleasing to go up in the air, and
look down upon so many people, and to know that they were all
looking at you, and that so many hearts were beating for you, and
that so many were admiring you! It would be beautiful!
“And, mother, you know that the balloon glided up and away so
softly, that it seemed like a dream, fading from the memory. And at
last, when it was like a mere insect in the vast blue sky, it stole into
a cloud, and hid itself, and then I had a feeling of sadness. Can you
tell me why, mother?”
Here there was a pause, and the blue-eyed girl, stood for a
moment, as if expecting an answer. But Romance was impatient to
begin, and her dark eye, shaded by the long black lashes, seemed to
grow larger and brighter as she spoke thus:
“History has told you, mother, all the events that occurred, and
she has accurately described them. Poetry has painted the scene,
and made it clear and bright by comparisons. But I must tell you of
the thoughts and feelings it awakened in my breast, and of the fairy
world in which I seemed to be, while I looked on the balloon.
“When the balloon went up, it seemed as if I went with it, into a
new scene. I think I have dreamed something like it, in my sleep,
when my thoughts seemed like wings, and all around was fair and
heavenly. As the balloon ascended, I seemed to ascend also. I did
not, at the moment, think how strange it was, but I went on
fancying myself with the balloon, and riding upon the air, in that little
boat. And I thought of the vast blue space around, and the earth
beneath, and the heaven above, and I felt as if I was something like
an angel, gifted with the power of rising upward, and seeing earth,
and sky, and heaven, as others could not see them. And I felt a sort
of happiness I cannot express.
“Well, as the balloon sailed farther and farther upon the airy sea,
and as it grew less and less to the sight, like a ship that glides away
upon the ocean—I began to think of the realms to which it seemed
hastening. And at last, when it flew into the cloud, I did not dream
that it had disappeared. My eye was still bent upon the spot, and I
still fancied that I was with it, and that I was sailing on and on, upon
the blue deep, and among regions where the happy and the lovely
only dwell.”
When Romance had got to this point of her story, the mother
smiled, and History tittered aloud. Poetry, however, drew nearer, and
seemed entranced with the tale of the dark-eyed girl. But Romance
was dashed at the ridicule she had excited, and was silent.
Now I suppose some of my waggish young readers, some of the
roguish Paul Pries, will laugh at me, as History did at Romance; and
think me not a little ridiculous, for telling such a rigmarole tale as
this. But old Peter knows what he is about! He has an object in view;
and now, as Mr. Lauriat let the cat out of the car, he will “let the cat
out of the bag.”
My purpose is to teach the meaning of the three words, History,
Poetry, and Romance. History is a true record of events; and,
accordingly, the little girl whom we call History, tells the exact story
of the balloon. Poetry is a display of fanciful thoughts, and deals
much in comparison; and so, our little Poetry gives a fanciful
description of the scene, embellishing her tale by many illustrations.
Romance is a picture of fantastic and extraordinary scenes and
feelings; and our dark-haired maiden, who deals in it, sets forth the
fairy world of visions and sentiments that is reflected in her own
breast.
I suppose all my readers have heard of the Nine Muses,
goddesses of ancient Greece. One was called Clio, the muse of
history; one was Erato, the muse of poetry. And I have sometimes
fancied that the idea of these goddesses, might have originated
among the fanciful Greeks, from perceiving the different ways in
which different persons notice the same scenes; one being apt to
remark things soberly and accurately, like our Miss History; another
being apt to see them fancifully, like our Miss Poetry; and another
apt to weave a world of fiction out of them, like our Miss Romance.
The Zephyr.

I must tell my young reader, in order to explain these lines, that in


ancient times, the Greeks used to think that the light summer wind
was a sort of goddess, whom they called Zephyr.
“Where have you been to-day?” said I
To a zephyr, as it flew by;
And thus it made reply.

“I have been upon the sea,


Where the waves were full of glee,
And they lov’d to dance with me.

“On the mountain I have strayed,


And with its green leaves played,
’Mid the sunshine and shade.

“I have been in the dell,


Where the wild flowers dwell,
And oh, I loved them well!

“I have been with the brook,


And its laughing ripples shook,
As my kisses they took.

“I have been with the flowers,


In their sweet-scented bowers,
And forgot the flight of hours.

“I have played with the hair


Of a girl, wild and fair—
And I loved to linger there!

“I have been with clouds on high,


As with pinions they do fly,
In many a glorious dye!”
To my Correspondents.

I am gratified to find, although it is now but about a year since I


began to be known to the public, that already I have some
thousands of black-eyed and blue-eyed acquaintances, in different
parts of the country. I receive many letters from young persons, and
they give me great pleasure, for they show that poor Bob Merry,
though he has a “timber toe,” is not destitute of friends. I was much
pleased with a bear story about his great-great-grandfather, sent me
by J. W. L. Cheseborough, of New London. I intend to make
something of it, one of these days. Two puzzles, received from other
correspondents, are given below. I must beg those who are anxious
to hear how I lost my leg—to wait a little while. It will all come out
in due season. Perhaps the leg will turn out as interesting as Peter
Parley’s great toe, that used to tickle the boys so! I have only one
thing to add, which is, that I desire all my friends to address their
letters to care of Bradbury & Soden.

Puzzles.
Portsmouth, Feb. 4, 1842.
Mr. Merry,—Sir: if you think the following worthy a place in your
valuable magazine, by inserting the same you will oblige a constant
reader.

I am a word of 18 letters.

My 1, 12, 17, 13, 5, 18, is an article of ladies’ dress.


My 18, 7, 6, 16, 5, is a number.
My 6, 2, 15, has been the ruination of many.
My 12, 3, 8, 12, 17, is a vegetable.
My 11, 8, 10, 4, is an article of food.
My 7, 12, 5, is much used by farmers.
My 18, 6, 12, 14, 18, is a kind of fish.
My 18, 8, 3, is a valuable ore.
My 9, 8, 15, 5, is a foreign fruit.
My whole is a great ornament to the country.

I am composed of 16 letters.

My 2, 1, 8, is a portion of water.
My 2, 12, 4, 15, 16, 8, has been the ruin of thousands.
My 16, 1, 15, 10, 8, is the most contemptible of all animals.
My 6, 14, 4, 15, is the name of a once celebrated tragedian.
My 3, 8, 15, 15, is the name of a town not far from Boston.
My 11, 12, 1, 15, 5, 9, is the name of a great country.
My 3, 4, 6, 7, is a sheet of water.
My 11, 13, 12, 9, is one of the elements.
My 1, 13, 12, is another.
My 11, 3, 8, is an insect.
My 15, 13, 3, 7, is the name of a river justly celebrated in
ancient and modern history.
C. B. F.
Boston, February 1, 1842.
MARCH—A SONG.
THE WORDS AND MUSIC COMPOSED FOR MERRY’S MUSEUM.

March is like a child,


Now gentle and now wild;
March is like a child,
Now gentle and now wild;

To-day, the soft winds blow,


To-morrow it doth snow,
To-day the soft winds blow,
To-morrow it doth snow.

March is like a rill,


Now roaring, and now still;
Today the blast is stinging,
To-morrow birds are singing.

March is like a cloud,


Now bright, and now a shroud;
To-day the warm rain falls,
To-morrow we have squalls.

March is like a bear,


With sharp claws and soft hair;
To-day ’tis rough and wild,
To-morrow, all is mild.
THE HARPY EAGLE.
MERRY’S MUSEUM.

V O L U M E I I I . — N o . 4 .

Montezuma.

Sketches of the Manners, Customs, &c., of the


Indians of America.

chapter xv.

Description of Mexico.—​Montezuma.—​Landing of Cortez.—​His


reception.—​Advances towards the Capitol.—​War with the
Tlascalans.
In the first part I have related, briefly, but with as much clearness
as possible, the history of the Indians of the West Indian Islands,
and of South America. I have described their customs and manners,
and traced the progress of the Spaniards and other Europeans from
the “Landing of Columbus,” till all the islands, and the greater part of
the southern continent were subjected to the invaders. We will now
turn to North America, and pursue the fortunes of the Red Man from
the burning clime of Darien to the cold regions of the Arctic sea.
At the time of the discovery of the New World, the region which is
at present known by the name of the Republic of Mexico, extending
from the Pacific to the Gulf of Mexico, and from the United States to
Guatemala, was called Anahuac. This vast country was inhabited by
several independent nations, of which the Mexicans were by far the
greatest and most civilized. Their capital city, Mexico, was situated
on a group of islands in the Lake of Texcuco, partly natural and
partly formed by the labor of the inhabitants. The lake of Texcuco
lay in a large and beautiful valley, called the Vale of Mexico, in the
central part of the country of Anahuac. From the shore, three great
dykes or causeways, formed of stone and earth, led to the city, the
appearance of which must have been magnificent, even to men of
enlightened Europe.
The houses of the common people were mostly low wooden
buildings, arranged with the greatest regularity. But the dwellings of
the nobility were of stone, and some of them spacious and
magnificent. The city was adorned with numerous temples, the
principal of which was the great temple of their god Mexitli, the Mars
of the Mexicans. This was an enormous four-sided pyramid, one
hundred and twenty feet high; on one side were steps to ascend to
the top, which was a square platform. On this were two small
temples, containing images of their gods and altars, on which,
(horrible to relate!) great numbers of human victims were sacrificed
every year, by this inhuman people.
The lake around was covered with vessels of all descriptions, and
numbers of floating gardens, filled with the most beautiful flowers.
Numerous canals were cut through the city, in which the boats of the
natives were constantly passing, as in the great towns of Holland.
But all this greatness and splendor was not, as might be
supposed, the growth of many ages of prosperity; from the
foundation of the city, according to the account of the natives, to its
capture by Cortez, in 1520, had elapsed a period of only one
hundred and ninety-five years. The ancient history of the Aztec or
Mexican nations, as given in their own annals, is as follows:—
“During the twelfth and thirteenth centuries after Christ, a great
number of nations or tribes arrived at Anahuac, from some country
to the north; they are supposed by many to have come, originally,
from Tartary, crossing over to America at Bhering’s straits; but of this
we have no certain proof. The first who arrived, found the country
entirely unoccupied, except by a few stragglers, the remnant of a
great and highly cultivated people, called Saltees, who formerly
possessed the country, and had been destroyed, or driven away by
famine and pestilence. To them are ascribed the pyramid of Cholula,
and many other works of power and skill; and to them the new
comers were indebted for their knowledge of many of the arts of
civilized life.
“The Aztecs or Mexicans were the last of the emigrating nations
who arrived in this country. For a long time they remained an
insignificant tribe, living in the most wretched condition, on the
borders of the lake of Tezcuco, often in a state of slavery to the
neighboring kings. At last, having regained their freedom, they
settled, in the year 1325, on a group of islands in the lake, and here
founded the city of Mexico.
“This city, after remaining for about twenty years a mere
collection of wretched huts, suddenly began to increase with
wonderful rapidity. By a long series of wars, undertaken partly
through desire of conquest and partly for the horrid purpose of
obtaining victims for their human, or, rather, inhuman sacrifices, the
Mexicans rendered themselves masters of nearly all the country of
Anahuac. A few states, however, among which was the brave little
republic of Tlascala, still maintained their independence, almost at
the gates of the capital.”
Such was the state of affairs at the time when Montezuma II.
mounted the throne, in the year 1502. Before, and for a short time
after his accession, he was esteemed a prince of a mild and humble
disposition, and of the greatest wisdom. But his real character soon
began to appear. He showed himself haughty, arrogant, and cruel,
and a merciless oppressor of the common people. At the same time,
he was liberal to those who faithfully served him, and a brave, and
successful warrior. He founded a hospital for his disabled soldiers,
built many magnificent edifices, and added much, by his conquests,
to the extent of his dominions.
In a war, however, with the brave republicans of Tlascala, he did
not meet with his usual success. The Tlascalans having sent an
embassy to the Mexican court, to complain of grievances which they
suffered from their neighbors, received for answer, that the king of
Mexico was lord of all the world, and all mortals were his vassals;
and that, as such, the Tlascalans should render him due obedience,
and acknowledge him by tribute; if they refused, they were to be
utterly destroyed, and their country given to another people.
To this arrogant demand, the Tlascalans returned a brave and
spirited refusal, and both nations immediately prepared for war. The
Mexicans were, by far, the most numerous, but they wanted the
courage which their enemies derived from the feeling that they
fought for life and liberty, for their homes and their country. The
Tlascalans were victorious in two pitched battles, and their
opponents were compelled to retire from the contest in disgrace.
With this exception, the first years of Montezuma’s reign were in
every respect prosperous. But suddenly a great reverse took place; a
large army of Mexicans, on an expedition to a distant country, after
suffering severely from a storm, were utterly destroyed by their
enemies. At the same time, a comet made its appearance, spreading
the greatest consternation throughout the nation; for, according to
their diviners, it portended the downfall of the empire.
While the king and his subjects were in this state of anxiety and
dread, news arrived, that a number of huge vessels, bearing men
speaking an unknown tongue, and clothed in glittering armor, had
arrived on the coast of his empire. These strangers, who so naturally
excited the admiration and awe of the natives, were no other than
Cortez and his companions.
On the second of April, 1519, this bold and enterprising Spaniard
entered the harbor of Saint Juan de Ulua, on the eastern coast of
Mexico, with eleven small vessels, containing only about six hundred
men; and of these, more than a hundred were sailors. With this
small force was he about to make war upon a monarch, whose
dominions were more extensive than all the kingdoms subject to the
Spanish crown. On the following day he landed his troops, and
having selected a suitable place for a camp, began to fortify it; in
which he was zealously assisted by the unsuspecting natives. Here
he was soon visited by the governors of the district. He received
them with many demonstrations of respect, and informed them that
he had come as ambassador from Don Carlos, of Spain, the greatest
king of the East, with proposals which he could only declare to their
monarch himself. He therefore demanded to be led immediately to
his presence.
The governors attempted to dissuade him from visiting the
capital, but at the same time laid before him a rich present of gold
and silver articles, which had only the effect of increasing his desire
to proceed. He therefore repeated his demand in a determined tone.
Seeing among his visiters several painters, who were busily engaged
in taking down, for the information of their sovereign, everything
remarkable in the appearance of the strangers, he resolved to give
them a specimen of his warlike power. He ordered his troops to be
drawn up in battle-array, and to go through the evolutions of a mock
battle. While the natives were gazing in astonishment at the
spectacle, the cannon, pointed towards the thick woods which
surrounded the camp, were suddenly fired, and made terrible havoc
among the trees. At the dreadful sound, some fled, others fell to the
ground, overcome by amazement and terror; and the painters had
now to exercise their ingenuity to invent figures and symbols by
which to represent the new and surprising things they had seen.
In a few days an answer was received from the emperor, refusing
an audience, and commanding the Spaniards to leave the country;
but, at the same time, directing that they should be supplied with all
things requisite for their voyage. Notwithstanding this prohibition,
Cortez resolved to proceed, and his followers eagerly joined in the
determination. They first set about founding a colony on the place
where they had landed, as this was one of the objects of the
expedition. The whole army labored with the utmost diligence; a
number of houses, or rather huts, were soon erected, and the whole
strongly fortified. The infant settlement received the name of “Villa
rica de la Vera Cruz;” “the rich town of the true cross.”
The next act of the troops appears deserving of mention as a
display of heroic and determined courage almost without a parallel.
Cortez, fearing lest, when their enthusiasm should subside, the
soldiers should be seized with a desire to return, by his arguments
and representations so wrought upon them, that, of their own
accord, to cut off all opportunity for retreat, they dragged the
vessels upon the beach, and burnt them to ashes.
They had now no choice but to proceed; and, accordingly, much
to the dismay and dissatisfaction of the Indians, who did not,
however, dare to oppose them by force, they set out on their march
towards the capital. On their way, they passed through the territories
of several caziques or chiefs, who bore with impatience the yoke of
their Mexican conquerors, and were glad to free themselves from it,
by transferring their allegiance to the king of Spain. Cortez eagerly
accepted their services, and artfully represented that he had been
deputed, by his sovereign, to redress the grievances which they had
suffered at the hands of the Mexicans. These new allies afterwards
proved extremely useful.
After proceeding for several days without obstruction, the
Spaniards arrived at the confines of Tlascala. Knowing the
implacable enmity of the inhabitants to the Mexicans, he expected
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like