Skip to content

Commit f24baa2

Browse files
committed
esri description
1 parent cff5f3f commit f24baa2

File tree

1 file changed

+103
-0
lines changed

1 file changed

+103
-0
lines changed

Chapters/ESRIASCII/esriascii.pillar

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
!! A parser for ESRI ASCII Raster
2+
3+
!!! What is ESRI ASCII
4+
5+
The ESRI ASCII raster format can be used to transfer information to or from other cell-based or raster systems. When an existing raster is output to an ESRI ASCII-format raster, the file will begin with header information that defines the properties of the raster such as the cell size, the number of rows and columns, and the coordinates of the origin of the raster. The header information is followed by cell value information specified in space-delimited row-major order, with each row separated by a carriage return.
6+
7+
!!!! Example ASCII raster
8+
9+
[[[
10+
ncols 480
11+
nrows 450
12+
xllcorner 378923
13+
yllcorner 4072345
14+
cellsize 30
15+
nodata_value -32768
16+
43 2 45 7 3 56 2 5 23 65 34 6 32 54 57 34 2 2 54 6
17+
35 45 65 34 2 6 78 4 2 6 89 3 2 7 45 23 5 8 4 1 62 ...
18+
]]]
19+
20+
21+
To convert an ASCII file to a raster, the data must be in this same format. The parameters in the header part of the file must match correctly with the structure of the data values.
22+
The basic structure of the ESRI ASCII raster has the header information at the beginning of the file followed by the cell value data:
23+
The basic structure of the ESRI ASCII raster has the header information at the beginning of the file followed by the cell value data. The spatial location of the raster is specified by the location of the lower left cell, and either by:
24+
The center of the lower left cell
25+
26+
[[[
27+
NCOLS xxx
28+
NROWS xxx
29+
XLLCENTER xxx
30+
YLLCENTER xxx
31+
CELLSIZE xxx
32+
NODATA_VALUE xxx
33+
row 1
34+
row 2
35+
...
36+
row n
37+
]]]
38+
39+
The lower left corner of the lower left cell
40+
41+
[[[
42+
NCOLS xxx
43+
NROWS xxx
44+
XLLCORNER xxx
45+
YLLCORNER xxx
46+
CELLSIZE xxx
47+
NODATA_VALUE xxx
48+
row 1
49+
row 2
50+
...
51+
row n
52+
]]]
53+
54+
Row 1 of the data is at the top of the raster, row 2 is just under row 1, and so on.
55+
56+
!!!! Header format
57+
The syntax of the header information is a keyword paired with the value of that keyword. These are the definitions of the keywords:
58+
Parameter
59+
Description
60+
Requirements
61+
NCOLS
62+
63+
Number of cell columns
64+
65+
Integer greater than 0.
66+
67+
NROWS
68+
69+
Number of cell rows
70+
71+
Integer greater than 0.
72+
73+
XLLCENTER or XLLCORNER
74+
75+
X-coordinate of the origin (by center or lower left corner of the cell)
76+
77+
Match with y-coordinate type.
78+
79+
YLLCENTER or YLLCORNER
80+
81+
Y-coordinate of the origin (by center or lower left corner of the cell)
82+
83+
Match with x-coordinate type.
84+
85+
CELLSIZE
86+
87+
Cell size
88+
89+
Greater than 0.
90+
91+
NODATA_VALUE
92+
93+
The input values to be NoData in the output raster
94+
95+
Optional. Default is -9999.
96+
97+
ASCII header information
98+
Data format
99+
The data component of the ESRI ASCII raster follows the header information.
100+
Cell values should be delimited by spaces.
101+
No carriage returns are necessary at the end of each row in the raster. The number of columns in the header determines when a new row begins.
102+
Row 1 of the data is at the top of the raster, row 2 is just under row 1, and so on.
103+

0 commit comments

Comments
 (0)