Conventions
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "The dataset, an instance of gdal.Dataset
, represents a file containing raster-format data."
A block of code is set as follows:
import pyproj lat1,long1 = (37.8101274,-122.4104622) lat2,long2 = (37.80237485,-122.405832766082) geod = pyproj.Geod(ellps="WGS84") angle1,angle2,distance = geod.inv(long1, lat1, long2, lat2) print("Distance is {:0.2f} meters".format(distance))
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
for value in values:
if value != band.GetNoDataValue():
try:
histogram[value] += 1
except KeyError:
histogram[value] = 1
Any command-line input or output is written as follows:
% python calcBoundingBoxes.py Afghanistan (AFG) lat=29.4061..38.4721, long=60.5042..74.9157 Albania (ALB) lat=39.6447..42.6619, long=19.2825..21.0542 Algeria (DZA) lat=18.9764..37.0914, long=-8.6672..11.9865 ...
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Click on the Download Domestic Names hyperlink".
Note
Warnings or important notes appear in a box like this.
Tip
Tips and tricks appear like this.