GIS for Web Developers Adding Where to Your Web Applications 1st Edition Scott Davis pdf download
GIS for Web Developers Adding Where to Your Web Applications 1st Edition Scott Davis pdf download
https://ebookultra.com/download/gis-for-web-developers-adding-
where-to-your-web-applications-1st-edition-scott-davis/
https://ebookultra.com/download/wordpress-for-web-developers-an-
introduction-for-web-professionals-2nd-edition-stephanie-leary/
https://ebookultra.com/download/getting-to-know-web-gis-1st-edition-
pinde-fu/
https://ebookultra.com/download/professional-javascript-for-web-
developers-3rd-edition-nicholas-c-zakas/
https://ebookultra.com/download/professional-javascript-for-web-
developers-2nd-ed-edition-nicholas-c-zakas/
Build Your Own AJAX Web Applications 1st Edition Matthew
Eernisse
https://ebookultra.com/download/build-your-own-ajax-web-
applications-1st-edition-matthew-eernisse/
https://ebookultra.com/download/the-tangled-web-a-guide-to-securing-
modern-web-applications-1st-edition-michal-zalewski/
https://ebookultra.com/download/build-your-own-ruby-on-rails-web-
applications-1st-edition-patrick-lenz/
https://ebookultra.com/download/performance-testing-guidance-for-web-
applications-1st-edition-microsoft-corporation/
https://ebookultra.com/download/flask-web-development-developing-web-
applications-with-python-2nd-edition-miguel-grinberg/
GIS for Web Developers Adding Where to Your Web
Applications 1st Edition Scott Davis Digital Instant
Download
Author(s): Scott Davis
ISBN(s): 9780974514093, 0974514098
Edition: 1
File Details: PDF, 3.61 MB
Year: 2007
Language: english
GIS for Web Developers
Adding Where to Your Web Applications
Scott Davis
Every precaution was taken in the preparation of this book. However, the publisher
assumes no responsibility for errors or omissions, or for damages that may result from
the use of information (including program listings) contained herein.
Our Pragmatic courses, workshops, and other products can help you and your team
create better software and have more fun. For more information, as well as the latest
Pragmatic titles, please visit us at
http://www.pragmaticprogrammer.com
ISBN-10: 0-9745140-9-8
ISBN-13: 978-0-9745140-9-3
Contents
Preface 10
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1 Introduction 13
1.1 Demystifying GIS . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Finding Free Data Sources and Applications . . . . . . 14
1.3 Becoming a GIS Programmer . . . . . . . . . . . . . . . 16
1.4 What Are You Getting Yourself Into? . . . . . . . . . . . 16
2 Vectors 19
2.1 Raw Materials . . . . . . . . . . . . . . . . . . . . . . . . 19
2.2 Raster Data . . . . . . . . . . . . . . . . . . . . . . . . . 20
2.3 Vector Data . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.4 Types of Vector Data . . . . . . . . . . . . . . . . . . . . 24
2.5 What Data Is Available? . . . . . . . . . . . . . . . . . . 29
2.6 Know Your File Formats . . . . . . . . . . . . . . . . . . 31
2.7 Anatomy of a Shapefile . . . . . . . . . . . . . . . . . . . 32
2.8 The Downloadable States of America . . . . . . . . . . . 32
2.9 Downloading a Viewer . . . . . . . . . . . . . . . . . . . 34
2.10 Styling Your Layers . . . . . . . . . . . . . . . . . . . . . 37
2.11 Viewing Multiple Basemap Layers . . . . . . . . . . . . 38
2.12 More Data, Please . . . . . . . . . . . . . . . . . . . . . . 40
2.13 More International Data, Please . . . . . . . . . . . . . 40
2.14 When Good Data Goes Bad . . . . . . . . . . . . . . . . 41
2.15 Saving Your Map in ArcExplorer . . . . . . . . . . . . . 42
2.16 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3 Projections 45
3.1 The Round Earth . . . . . . . . . . . . . . . . . . . . . . 45
3.2 Cartesian Planes . . . . . . . . . . . . . . . . . . . . . . 48
3.3 What Is a Projection? . . . . . . . . . . . . . . . . . . . . 52
3.4 Changing Projections in ArcExplorer . . . . . . . . . . . 54
CONTENTS 8
4 Rasters 71
4.1 Getting Started with Raster Data . . . . . . . . . . . . . 71
4.2 Terraserver-USA: Another Source of Free Raster Imagery 74
4.3 Mosaics and Tessellation . . . . . . . . . . . . . . . . . 76
4.4 Temporal Analysis . . . . . . . . . . . . . . . . . . . . . 78
4.5 Panchromatic vs. Multispectral . . . . . . . . . . . . . . 81
4.6 Scale and Resolution . . . . . . . . . . . . . . . . . . . . 86
4.7 Orthorectification . . . . . . . . . . . . . . . . . . . . . . 90
4.8 Downloading Free Rasters . . . . . . . . . . . . . . . . . 93
4.9 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Index 253
Preface
We are on the edge of the next big wave of technology, and it has
GIS written all over it. Soon every new cell phone will have GPS (or
some form of location-based services) built in as a standard feature.
Nearly every major database vendor now includes native geographic
data types. Free sources of geographic data and free applications are
just waiting for you to pull them together and do something clever. You
might create a simple digital version of the pushpin map, or you might
write the next Google Maps killer.
All of our lives we’ve asked “Where am I?” and “How do I get from here
to there?”
You start by rolling over, then crawling, and then walking. You walked
to school or were driven or took the bus. Maybe you eventually drove
yourself. When you got older, you joined a society of people who use
different modes of transportation every day. We ride subways to work.
We take airplane flights to far-off places. We visit client locations. We
attend conferences or night classes. We go shopping. We eat out at
restaurants. Unless you spend your days physically tied to something
large, heavy, and immobile, you probably spend a significant portion of
your time thinking about how to get from here to there and back again.
And how does traditional geography make that easier? It offers you vec-
tor and raster data, orthographically rectified and portrayed in the Uni-
versal Transverse Mercator projection. (Don’t you feel better already?)
Even asking a simple question like “What is your current latitude and
longitude?” will likely cause most people to back away slowly, hands
up, muttering, “That’s OK—I’ll ask someone else for directions.”
In GIS for Web Developers we’ll talk about GIS in simple terms and
demonstrate its real-world uses.
A CKNOWLEDGMENTS 11
Acknowledgments
Big thanks go to Dave Thomas and Andy Hunt for creating the Prag-
matic Bookshelf. It is truly a company that is “of the developer, by
the developer, and for the developer.” You have no idea how happy it
makes me writing my prose in TextMate, using make to build the book,
and using Subversion to keep track of the revisions. Or maybe you do,
which is exactly my point.
Thanks also go to Daniel Steinberg, my editor, and all of the rest of the
PragProggers who copy edited, indexed, and did all of the other behind-
the-scenes machinations necessary to get this book from bits to atoms.
The crack team of tech reviewers went to extraordinary lengths to beat
my factual and stylistic errors into submission: Schuyler Erle, Jody
1. http://news.nationalgeographic.com/news/2006/04/0425_060425_map_blogs.html
A CKNOWLEDGMENTS 12
Introduction
Developing geographic applications is far more complicated than it
should be. I have several goals for this book. The first is to demystify
geographic information systems (GIS) and teach you a bit of the lingo.
The second goal is to help you download some free data and learn a
programmatic API or two. These lead to the final goal of turning you
into a GIS developer.
1. http://www.mapquest.com
2. http://maps.google.com
3. http://maps.yahoo.com
4. http://maps.msn.com
F INDING F REE D ATA S OURCES AND A PPLICATIONS 14
Chapter 2—Vectors
This chapter offers you your first taste of assembling maps from the
freely available geodata out there. Vector maps are line maps (as op-
posed to maps that use satellite or aerial imagery). We’ll pull down
vector data from a variety of different sources, learn some basic file
formats, and pull them all together in a free viewer.
Chapter 3—Projections
The previous chapter ends on a bit of a cliff-hanger: sometimes map
data gathered from disparate sources just snaps together; other times
it doesn’t. The main culprit for “snap-together failure” is when the base
layers are in different projections. This chapter explains what projec-
tions are, covers why data ends up in different projections in the first
place, and shows you how to reproject your data layers to restore the
“snap-together” magic that you were promised in the previous chapter.
Chapter 4—Rasters
Once you get comfortable with vector data, you might be interested
in adding some photographic data layers to your map as well. In this
chapter, you see the ins and outs of dealing with raster (photographic)
data, including where to find it, how to view it, and, most important,
how to get at the hidden metadata that moves it from being simply
pretty pixels to true geographic data.
Chapter 5—Spatial Databases
You’re probably going to want to store your geodata in a database for
all of the same reasons you typically store your plain old nonmapping
data in a database: speed, security, queries, and remote users. In some
cases, your database supports geodata natively. Other times you have
to spatially enable it. This chapter shows you how to take PostgreSQL—
a popular open source database—and spatially enable it using PostGIS
so that you can centralize the storage of all of your newfound vector
data.
Chapter 6—Creating OGC Web Services
Whether you’re interested in publishing a finished map in a web brow-
ser or want to provide access to the raw data via a web service, there
is no denying that putting your geodata on a web server is the quick-
est way to reach the broadest audience. This chapter introduces the
standard interfaces provided by the Open Geospatial Consortium (OGC)
that allow you to do both.
W HAT A RE Y OU G ETTING Y OURSELF I NTO ? 18
Vectors
In this chapter we talk about getting your hands on vector basemap
data. Prepare yourself for a bit of a scavenger hunt—there isn’t a single
place where you can download everything you need. Once you have it,
you’ll probably want to see it as well. We download a free viewer so that
you can gaze lovingly at the hard-earned results of your work.
How and when the ancestors of the Cebidæ and Hapalidæ entered
the South American continent, it is less easy to conceive. The only
rays of light we yet have on the subject are, the supposed affinities
of the fossil Cænopithecus of the Swiss, and the Lemuravidæ of the
North American Eocene, with both Cebidæ and Lemuroids, and the
fact that in Miocene or Eocene times a mild climate prevailed up to
the Arctic circle. The discovery of an undoubted Lemuroid in the
Eocene of Europe, indicates that the great Northern Continent was
probably the birthplace of this low type of mammal, and the source
whence Africa and Southern Asia were peopled with them, as it was,
at a later period, with the higher forms of monkeys and apes.
Order II.—CHIROPTERA.
General Distribution.
The genera of bats are exceedingly numerous, but they are in a very
unsettled state, and the synonymy is exceedingly confused. The
details of their distribution cannot therefore be usefully entered into
here. The Pteropidæ differ so much from all other bats, that they are
considered to form a distinct suborder of Chiroptera, and by some
naturalists even a distinct order of Mammalia.
General Distribution.
——— ——— 1. 2. 3. 1. 2. 3. 1. 2. 3. 1. 2. —
— — 4 4 4 —
The genera Nycteris and Megaderma, which range over the Ethiopian
and Oriental regions to the Moluccas, are considered by Dr. Peters to
form a distinct family, Megadermidæ; and Mr. Dobson in his recent
arrangement (published after our first volume was printed) adopts
the same family under the name of Nycteridæ. The curious Indian
genus Rhinopoma, which, following Dr. J. E. Gray, we have classed in
this family, is considered by Mr. Dobson to belong to the
Noctilionidæ.
1. 2. 3. 1. 2. 3. 1. 2. 3. 1. 2. 3. 1. 2. 3. 1. 2. 3.
4 4 4 4 4 4
Although the bats, from their great powers of flight, are not
amenable to the limitations which determine the distribution of other
terrestrial mammals, yet certain great facts of distribution come out
in a very striking manner. The speciality of the Neotropical region is
well shown, not only by its exclusive possession of one large family
(Phyllostomidæ), but almost equally so by the total absence of two
others (Pteropidæ and Rhinolophidæ). The Nearctic region is also
unusually well marked, by the total absence of a family
(Rhinolophidæ) which is tolerably well represented in the Palæarctic.
The Pteropidæ well characterize the tropical regions of the Old World
and Australia; while the Vespertilionidæ are more characteristic of
the Palæarctic and Nearctic regions, which together possess about
60 species of this family.
The bats are a very difficult study, and it is quite uncertain how many
distinct species are really known. Schinz, in his Synopsis Mammalium
(1844) describes 330, while the list given by Mr. Andrew Murray in
his Geographical Distribution of Mammalia (1866), contains 400
species. A small number of new species have been since described,
but others have been sunk as synonyms, so that we can perhaps
hardly obtain a nearer approximation to the truth than the last
number. In Europe there are 35 species, and only 17 in North
America.
Fossil Chiroptera.—The fossil remains of bats that have yet been
discovered, being chiefly allied to forms still existing in the same
countries, throw no light on the origin or affinities of this remarkable
and isolated order of Mammalia; but as species very similar to those
now living were in existence so far back as Miocene or even Eocene
times, we may be sure the group is one of immense antiquity, and
that there has been ample time for the amount of variation and
extinction required to bring about the limitation of types, and the
peculiarities of distribution we now find to exist.
Order III.—INSECTIVORA.
General Distribution.
General Distribution.
General Distribution.
General Distribution.
General Distribution.
General Distribution.
General Distribution.
Neotropical Nearctic Palæarctic Ethiopian Oriental Australian
Sub-regions. Sub-regions. Sub-regions. Sub-regions. Sub-regions. Sub-regions.
General Distribution.
General Distribution.
——3 1. 2. 3. 1. 2. 3. 1. 2. 3. 1. 2. 3. ———
— 4 4 4 4 —
The fossil Insectivora do not throw much light on the early history of
the order, since even as far back as the Miocene period they consist
almost wholly of forms which can be referred to existing families. In
North America they go back to the Eocene period, if certain doubtful
remains have been rightly placed. The occurrence of fossil Centetidæ
in Europe, supports the view we have maintained in preceding
chapters, that the existing distribution of this family between
Madagascar and the Antilles, proves no direct connection between
those islands, but only shows us that the family once had an
extensive range.
Order IV—CARNIVORA.
General Distribution.
The Cats are very widely distributed over the earth—with the
exception of the Australian region and the island sub-region of
Madagascar and the Antilles—universally; ranging from the torrid
zone to the Arctic regions and the Straits of Magellan. They are so
uniform in their organization that many naturalists group them all
under one genus, Felis; but it is now more usual to class at least the
lynxes as a separate genus, while the hunting leopard, or cheetah,
forms another. Dr. J. E. Gray divides these again, and makes 17
generic groups; but as this subdivision is not generally adopted, and
does not bring out any special features of geographical distribution, I
shall not further notice it.
The genus Felis (56 species) has the same general range as the
whole family, except that it does not go so far north; the Amoor river
in Eastern Asia, and 55° N. Lat. in America, marking its limits. Lyncus
(10 species) is a more northern group, ranging to the polar regions
in Europe and Asia, and to Lat. 66° N. in America, but not going
further south than Northern Mexico and the European shores of the
Mediterranean, except the caracal, which may be another genus, and
which extends to Central India, Persia, North Africa and even the
Cape of Good Hope. The lynxes are thus almost wholly peculiar to
the Nearctic and Palæarctic regions. Cynælurus (1 species) the
hunting leopard, ranges from Southern and Western India through
Persia, Syria, Northern and Central Africa, to the Cape of Good Hope.
General Distribution.
General Distribution.
The following are the genera with their distribution as given by Dr. J.
E. Gray in his latest British Museum Catalogue:
General Distribution.
General Distribution.
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.
ebookultra.com