shp 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +34 -0
- data/.travis.yml +4 -0
- data/Gemfile +3 -0
- data/LICENSE +28 -0
- data/README.md +30 -0
- data/Rakefile +23 -0
- data/ext/shp/base.hpp +113 -0
- data/ext/shp/dbf.cpp +381 -0
- data/ext/shp/dbf.hpp +44 -0
- data/ext/shp/extconf.rb +13 -0
- data/ext/shp/shape_object.cpp +58 -0
- data/ext/shp/shape_object.hpp +27 -0
- data/ext/shp/shapefile.cpp +299 -0
- data/ext/shp/shapefile.hpp +35 -0
- data/ext/shp/shapelib/.cvsignore +15 -0
- data/ext/shp/shapelib/ChangeLog +450 -0
- data/ext/shp/shapelib/HOWTO-RELEASE +16 -0
- data/ext/shp/shapelib/LICENSE.LGPL +483 -0
- data/ext/shp/shapelib/Makefile +113 -0
- data/ext/shp/shapelib/README +41 -0
- data/ext/shp/shapelib/README.tree +172 -0
- data/ext/shp/shapelib/contrib/.cvsignore +12 -0
- data/ext/shp/shapelib/contrib/Makefile +66 -0
- data/ext/shp/shapelib/contrib/ShapeFileII.pas +234 -0
- data/ext/shp/shapelib/contrib/Shape_PointInPoly.cpp +238 -0
- data/ext/shp/shapelib/contrib/Shape_PointInPoly_README.txt +59 -0
- data/ext/shp/shapelib/contrib/csv2shp.c +558 -0
- data/ext/shp/shapelib/contrib/dbfcat.c +166 -0
- data/ext/shp/shapelib/contrib/dbfinfo.c +106 -0
- data/ext/shp/shapelib/contrib/makefile.vc +34 -0
- data/ext/shp/shapelib/contrib/my_nan.h +46 -0
- data/ext/shp/shapelib/contrib/shpcat.c +100 -0
- data/ext/shp/shapelib/contrib/shpcentrd.c +159 -0
- data/ext/shp/shapelib/contrib/shpdata.c +129 -0
- data/ext/shp/shapelib/contrib/shpdxf.c +340 -0
- data/ext/shp/shapelib/contrib/shpfix.c +110 -0
- data/ext/shp/shapelib/contrib/shpgeo.c +1595 -0
- data/ext/shp/shapelib/contrib/shpgeo.h +154 -0
- data/ext/shp/shapelib/contrib/shpinfo.c +113 -0
- data/ext/shp/shapelib/contrib/shpproj.c +260 -0
- data/ext/shp/shapelib/contrib/shpsort.c +605 -0
- data/ext/shp/shapelib/contrib/shpsort.txt +44 -0
- data/ext/shp/shapelib/contrib/shpwkb.c +123 -0
- data/ext/shp/shapelib/contrib/tests/shpproj.sh +38 -0
- data/ext/shp/shapelib/dbfopen.c +2221 -0
- data/ext/shp/shapelib/makefile.vc +86 -0
- data/ext/shp/shapelib/makeshape.sh +21 -0
- data/ext/shp/shapelib/mkdist.sh +37 -0
- data/ext/shp/shapelib/mkinstalldirs +38 -0
- data/ext/shp/shapelib/mkrelease.sh +55 -0
- data/ext/shp/shapelib/safileio.c +286 -0
- data/ext/shp/shapelib/shapefil.h +647 -0
- data/ext/shp/shapelib/shapelib.def +46 -0
- data/ext/shp/shapelib/shpopen.c +2388 -0
- data/ext/shp/shapelib/shptree.c +1187 -0
- data/ext/shp/shapelib/shputils.c +1072 -0
- data/ext/shp/shapelib/stream1.out +1465 -0
- data/ext/shp/shapelib/stream1.sh +28 -0
- data/ext/shp/shapelib/stream2.out +530 -0
- data/ext/shp/shapelib/stream2.sh +11 -0
- data/ext/shp/shapelib/stream3.out +37 -0
- data/ext/shp/shapelib/web/.cvsignore +2 -0
- data/ext/shp/shapelib/web/codepage.html +403 -0
- data/ext/shp/shapelib/web/dbf_api.html +436 -0
- data/ext/shp/shapelib/web/index.html +235 -0
- data/ext/shp/shapelib/web/license.html +78 -0
- data/ext/shp/shapelib/web/manifest.html +87 -0
- data/ext/shp/shapelib/web/release.html +80 -0
- data/ext/shp/shapelib/web/shapelib-tools.html +352 -0
- data/ext/shp/shapelib/web/shp_api.html +376 -0
- data/ext/shp/shp.cpp +19 -0
- data/ext/shp/shp.hpp +47 -0
- data/lib/shp.rb +35 -0
- data/lib/shp/version.rb +3 -0
- data/shp.gemspec +23 -0
- data/spec/shp_spec.rb +127 -0
- metadata +176 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13; do
|
4
|
+
echo -----------------------------------------------------------------------
|
5
|
+
echo Test 2/$i
|
6
|
+
echo -----------------------------------------------------------------------
|
7
|
+
|
8
|
+
./shptest $i
|
9
|
+
./shpdump test${i}.shp
|
10
|
+
done
|
11
|
+
|
@@ -0,0 +1,37 @@
|
|
1
|
+
Shapefile Type: Polygon # of Shapes: 3
|
2
|
+
|
3
|
+
File Bounds: (0,0,0,0)
|
4
|
+
to (180,170,0,0)
|
5
|
+
|
6
|
+
Shape:0 (Polygon) nVertices=9, nParts=2
|
7
|
+
Bounds:(0,0, 0)
|
8
|
+
to (100,100, 0)
|
9
|
+
(0,0, 0) Ring
|
10
|
+
(100,0, 0)
|
11
|
+
(100,100, 0)
|
12
|
+
(0,100, 0)
|
13
|
+
(0,0, 0)
|
14
|
+
+ (20,20, 0) Ring
|
15
|
+
(20,30, 0)
|
16
|
+
(30,30, 0)
|
17
|
+
(20,20, 0)
|
18
|
+
|
19
|
+
Shape:1 (Polygon) nVertices=4, nParts=1
|
20
|
+
Bounds:(150,150, 0)
|
21
|
+
to (180,170, 0)
|
22
|
+
(150,150, 0) Ring
|
23
|
+
(160,150, 0)
|
24
|
+
(180,170, 0)
|
25
|
+
(150,150, 0)
|
26
|
+
|
27
|
+
Shape:2 (Polygon) nVertices=4, nParts=1
|
28
|
+
Bounds:(150,150, 0)
|
29
|
+
to (180,170, 0)
|
30
|
+
(150,150, 0) Ring
|
31
|
+
(160,150, 0)
|
32
|
+
(180,170, 0)
|
33
|
+
(150,150, 0)
|
34
|
+
Descriptio TestInt TestDouble
|
35
|
+
Square with triangle missing 1 2.50000
|
36
|
+
Smaller triangle 100 1000.25000
|
37
|
+
(NULL) (NULL) (NULL)
|
@@ -0,0 +1,403 @@
|
|
1
|
+
|
2
|
+
This table is derived from:<p>
|
3
|
+
|
4
|
+
<a href="http://www.autopark.ru/ASBProgrammerGuide/DBFSTRUC.HTM">http://www.autopark.ru/ASBProgrammerGuide/DBFSTRUC.HTM</a><p>
|
5
|
+
|
6
|
+
|
7
|
+
<table border="1" width="100%">
|
8
|
+
<tbody><tr>
|
9
|
+
<th colspan="2" align="left" bgcolor="#c0c0c0">ID</th>
|
10
|
+
<th align="left" bgcolor="#c0c0c0">Codepage</th>
|
11
|
+
<th align="left" bgcolor="#c0c0c0">Description</th>
|
12
|
+
</tr>
|
13
|
+
<tr>
|
14
|
+
<td>1</td>
|
15
|
+
<td>0x01</td>
|
16
|
+
<td>437</td>
|
17
|
+
<td>US MS-DOS</td>
|
18
|
+
</tr>
|
19
|
+
<tr>
|
20
|
+
<td>2</td>
|
21
|
+
<td>0x02</td>
|
22
|
+
<td>850</td>
|
23
|
+
<td>International MS-DOS</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td>3</td>
|
27
|
+
<td>0x03</td>
|
28
|
+
<td>1252</td>
|
29
|
+
<td>Windows ANSI Latin I</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td>4</td>
|
33
|
+
<td>0x04</td>
|
34
|
+
<td>10000</td>
|
35
|
+
<td>Standard Macintosh</td>
|
36
|
+
</tr>
|
37
|
+
<tr>
|
38
|
+
<td>8</td>
|
39
|
+
<td>0x08</td>
|
40
|
+
<td>865</td>
|
41
|
+
<td>Danish OEM</td>
|
42
|
+
</tr>
|
43
|
+
<tr>
|
44
|
+
<td>9</td>
|
45
|
+
<td>0x09</td>
|
46
|
+
<td>437</td>
|
47
|
+
<td>Dutch OEM</td>
|
48
|
+
</tr>
|
49
|
+
<tr>
|
50
|
+
<td>10</td>
|
51
|
+
<td>0x0A</td>
|
52
|
+
<td>850</td>
|
53
|
+
<td>Dutch OEM*</td>
|
54
|
+
</tr>
|
55
|
+
<tr>
|
56
|
+
<td>11</td>
|
57
|
+
<td>0x0B</td>
|
58
|
+
<td>437</td>
|
59
|
+
<td>Finnish OEM</td>
|
60
|
+
</tr>
|
61
|
+
<tr>
|
62
|
+
<td>13</td>
|
63
|
+
<td>0x0D</td>
|
64
|
+
<td>437</td>
|
65
|
+
<td>French OEM</td>
|
66
|
+
</tr>
|
67
|
+
<tr>
|
68
|
+
<td>14</td>
|
69
|
+
<td>0x0E</td>
|
70
|
+
<td>850</td>
|
71
|
+
<td>French OEM*</td>
|
72
|
+
</tr>
|
73
|
+
<tr>
|
74
|
+
<td>15</td>
|
75
|
+
<td>0x0F</td>
|
76
|
+
<td>437</td>
|
77
|
+
<td>German OEM</td>
|
78
|
+
</tr>
|
79
|
+
<tr>
|
80
|
+
<td>16</td>
|
81
|
+
<td>0x10</td>
|
82
|
+
<td>850</td>
|
83
|
+
<td>German OEM*</td>
|
84
|
+
</tr>
|
85
|
+
<tr>
|
86
|
+
<td>17</td>
|
87
|
+
<td>0x11</td>
|
88
|
+
<td>437</td>
|
89
|
+
<td>Italian OEM</td>
|
90
|
+
</tr>
|
91
|
+
<tr>
|
92
|
+
<td>18</td>
|
93
|
+
<td>0x12</td>
|
94
|
+
<td>850</td>
|
95
|
+
<td>Italian OEM*</td>
|
96
|
+
</tr>
|
97
|
+
<tr>
|
98
|
+
<td>19</td>
|
99
|
+
<td>0x13</td>
|
100
|
+
<td>932</td>
|
101
|
+
<td>Japanese Shift-JIS</td>
|
102
|
+
</tr>
|
103
|
+
<tr>
|
104
|
+
<td>20</td>
|
105
|
+
<td>0x14</td>
|
106
|
+
<td>850</td>
|
107
|
+
<td>Spanish OEM*</td>
|
108
|
+
</tr>
|
109
|
+
<tr>
|
110
|
+
<td>21</td>
|
111
|
+
<td>0x15</td>
|
112
|
+
<td>437</td>
|
113
|
+
<td>Swedish OEM</td>
|
114
|
+
</tr>
|
115
|
+
<tr>
|
116
|
+
<td>22</td>
|
117
|
+
<td>0x16</td>
|
118
|
+
<td>850</td>
|
119
|
+
<td>Swedish OEM*</td>
|
120
|
+
</tr>
|
121
|
+
<tr>
|
122
|
+
<td>23</td>
|
123
|
+
<td>0x17</td>
|
124
|
+
<td>865</td>
|
125
|
+
<td>Norwegian OEM</td>
|
126
|
+
</tr>
|
127
|
+
<tr>
|
128
|
+
<td>24</td>
|
129
|
+
<td>0x18</td>
|
130
|
+
<td>437</td>
|
131
|
+
<td>Spanish OEM</td>
|
132
|
+
</tr>
|
133
|
+
<tr>
|
134
|
+
<td>25</td>
|
135
|
+
<td>0x19</td>
|
136
|
+
<td>437</td>
|
137
|
+
<td>English OEM (Great Britain)</td>
|
138
|
+
</tr>
|
139
|
+
<tr>
|
140
|
+
<td>26</td>
|
141
|
+
<td>0x1A</td>
|
142
|
+
<td>850</td>
|
143
|
+
<td>English OEM (Great Britain)*</td>
|
144
|
+
</tr>
|
145
|
+
<tr>
|
146
|
+
<td>27</td>
|
147
|
+
<td>0x1B</td>
|
148
|
+
<td>437</td>
|
149
|
+
<td>English OEM (US)</td>
|
150
|
+
</tr>
|
151
|
+
<tr>
|
152
|
+
<td>28</td>
|
153
|
+
<td>0x1C</td>
|
154
|
+
<td>863</td>
|
155
|
+
<td>French OEM (Canada)</td>
|
156
|
+
</tr>
|
157
|
+
<tr>
|
158
|
+
<td>29</td>
|
159
|
+
<td>0x1D</td>
|
160
|
+
<td>850</td>
|
161
|
+
<td>French OEM*</td>
|
162
|
+
</tr>
|
163
|
+
<tr>
|
164
|
+
<td>31</td>
|
165
|
+
<td>0x1F</td>
|
166
|
+
<td>852</td>
|
167
|
+
<td>Czech OEM</td>
|
168
|
+
</tr>
|
169
|
+
<tr>
|
170
|
+
<td>34</td>
|
171
|
+
<td>0x22</td>
|
172
|
+
<td>852</td>
|
173
|
+
<td>Hungarian OEM</td>
|
174
|
+
</tr>
|
175
|
+
<tr>
|
176
|
+
<td>35</td>
|
177
|
+
<td>0x23</td>
|
178
|
+
<td>852</td>
|
179
|
+
<td>Polish OEM</td>
|
180
|
+
</tr>
|
181
|
+
<tr>
|
182
|
+
<td>36</td>
|
183
|
+
<td>0x24</td>
|
184
|
+
<td>860</td>
|
185
|
+
<td>Portuguese OEM</td>
|
186
|
+
</tr>
|
187
|
+
<tr>
|
188
|
+
<td>37</td>
|
189
|
+
<td>0x25</td>
|
190
|
+
<td>850</td>
|
191
|
+
<td>Portuguese OEM*</td>
|
192
|
+
</tr>
|
193
|
+
<tr>
|
194
|
+
<td>38</td>
|
195
|
+
<td>0x26</td>
|
196
|
+
<td>866</td>
|
197
|
+
<td>Russian OEM</td>
|
198
|
+
</tr>
|
199
|
+
<tr>
|
200
|
+
<td>55</td>
|
201
|
+
<td>0x37</td>
|
202
|
+
<td>850</td>
|
203
|
+
<td>English OEM (US)*</td>
|
204
|
+
</tr>
|
205
|
+
<tr>
|
206
|
+
<td>64</td>
|
207
|
+
<td>0x40</td>
|
208
|
+
<td>852</td>
|
209
|
+
<td>Romanian OEM</td>
|
210
|
+
</tr>
|
211
|
+
<tr>
|
212
|
+
<td>77</td>
|
213
|
+
<td>0x4D</td>
|
214
|
+
<td>936</td>
|
215
|
+
<td>Chinese GBK (PRC)</td>
|
216
|
+
</tr>
|
217
|
+
<tr>
|
218
|
+
<td>78</td>
|
219
|
+
<td>0x4E</td>
|
220
|
+
<td>949</td>
|
221
|
+
<td>Korean (ANSI/OEM)</td>
|
222
|
+
</tr>
|
223
|
+
<tr>
|
224
|
+
<td>79</td>
|
225
|
+
<td>0x4F</td>
|
226
|
+
<td>950</td>
|
227
|
+
<td>Chinese Big5 (Taiwan)</td>
|
228
|
+
</tr>
|
229
|
+
<tr>
|
230
|
+
<td>80</td>
|
231
|
+
<td>0x50</td>
|
232
|
+
<td>874</td>
|
233
|
+
<td>Thai (ANSI/OEM)</td>
|
234
|
+
</tr>
|
235
|
+
<tr>
|
236
|
+
<td>87</td>
|
237
|
+
<td>0x57</td>
|
238
|
+
<td>Current ANSI CP</td>
|
239
|
+
<td>ANSI</td>
|
240
|
+
</tr>
|
241
|
+
<tr>
|
242
|
+
<td>88</td>
|
243
|
+
<td>0x58</td>
|
244
|
+
<td>1252</td>
|
245
|
+
<td>Western European ANSI</td>
|
246
|
+
</tr>
|
247
|
+
<tr>
|
248
|
+
<td>89</td>
|
249
|
+
<td>0x59</td>
|
250
|
+
<td>1252</td>
|
251
|
+
<td>Spanish ANSI</td>
|
252
|
+
</tr>
|
253
|
+
<tr>
|
254
|
+
<td>100</td>
|
255
|
+
<td>0x64</td>
|
256
|
+
<td>852</td>
|
257
|
+
<td>Eastern European MS-DOS</td>
|
258
|
+
</tr>
|
259
|
+
<tr>
|
260
|
+
<td>101</td>
|
261
|
+
<td>0x65</td>
|
262
|
+
<td>866</td>
|
263
|
+
<td>Russian MS-DOS</td>
|
264
|
+
</tr>
|
265
|
+
<tr>
|
266
|
+
<td>102</td>
|
267
|
+
<td>0x66</td>
|
268
|
+
<td>865</td>
|
269
|
+
<td>Nordic MS-DOS</td>
|
270
|
+
</tr>
|
271
|
+
<tr>
|
272
|
+
<td>103</td>
|
273
|
+
<td>0x67</td>
|
274
|
+
<td>861</td>
|
275
|
+
<td>Icelandic MS-DOS</td>
|
276
|
+
</tr>
|
277
|
+
<tr>
|
278
|
+
<td>104</td>
|
279
|
+
<td>0x68</td>
|
280
|
+
<td>895</td>
|
281
|
+
<td>Kamenicky (Czech) MS-DOS</td>
|
282
|
+
</tr>
|
283
|
+
<tr>
|
284
|
+
<td>105</td>
|
285
|
+
<td>0x69</td>
|
286
|
+
<td>620</td>
|
287
|
+
<td>Mazovia (Polish) MS-DOS</td>
|
288
|
+
</tr>
|
289
|
+
<tr>
|
290
|
+
<td>106</td>
|
291
|
+
<td>0x6A</td>
|
292
|
+
<td>737</td>
|
293
|
+
<td>Greek MS-DOS (437G)</td>
|
294
|
+
</tr>
|
295
|
+
<tr>
|
296
|
+
<td>107</td>
|
297
|
+
<td>0x6B</td>
|
298
|
+
<td>857</td>
|
299
|
+
<td>Turkish MS-DOS</td>
|
300
|
+
</tr>
|
301
|
+
<tr>
|
302
|
+
<td>108</td>
|
303
|
+
<td>0x6C</td>
|
304
|
+
<td>863</td>
|
305
|
+
<td>French-Canadian MS-DOS</td>
|
306
|
+
</tr>
|
307
|
+
<tr>
|
308
|
+
<td>120</td>
|
309
|
+
<td>0x78</td>
|
310
|
+
<td>950</td>
|
311
|
+
<td>Taiwan Big 5</td>
|
312
|
+
</tr>
|
313
|
+
<tr>
|
314
|
+
<td>121</td>
|
315
|
+
<td>0x79</td>
|
316
|
+
<td>949</td>
|
317
|
+
<td>Hangul (Wansung)</td>
|
318
|
+
</tr>
|
319
|
+
<tr>
|
320
|
+
<td>122</td>
|
321
|
+
<td>0x7A</td>
|
322
|
+
<td>936</td>
|
323
|
+
<td>PRC GBK</td>
|
324
|
+
</tr>
|
325
|
+
<tr>
|
326
|
+
<td>123</td>
|
327
|
+
<td>0x7B</td>
|
328
|
+
<td>932</td>
|
329
|
+
<td>Japanese Shift-JIS</td>
|
330
|
+
</tr>
|
331
|
+
<tr>
|
332
|
+
<td>124</td>
|
333
|
+
<td>0x7C</td>
|
334
|
+
<td>874</td>
|
335
|
+
<td>Thai Windows/MS�DOS</td>
|
336
|
+
</tr>
|
337
|
+
<tr>
|
338
|
+
<td>134</td>
|
339
|
+
<td>0x86</td>
|
340
|
+
<td>737</td>
|
341
|
+
<td>Greek OEM</td>
|
342
|
+
</tr>
|
343
|
+
<tr>
|
344
|
+
<td>135</td>
|
345
|
+
<td>0x87</td>
|
346
|
+
<td>852</td>
|
347
|
+
<td>Slovenian OEM</td>
|
348
|
+
</tr>
|
349
|
+
<tr>
|
350
|
+
<td>136</td>
|
351
|
+
<td>0x88</td>
|
352
|
+
<td>857</td>
|
353
|
+
<td>Turkish OEM</td>
|
354
|
+
</tr>
|
355
|
+
<tr>
|
356
|
+
<td>150</td>
|
357
|
+
<td>0x96</td>
|
358
|
+
<td>10007</td>
|
359
|
+
<td>Russian Macintosh</td>
|
360
|
+
</tr>
|
361
|
+
<tr>
|
362
|
+
<td>151</td>
|
363
|
+
<td>0x97</td>
|
364
|
+
<td>10029</td>
|
365
|
+
<td>Eastern European Macintosh</td>
|
366
|
+
</tr>
|
367
|
+
<tr>
|
368
|
+
<td>152</td>
|
369
|
+
<td>0x98</td>
|
370
|
+
<td>10006</td>
|
371
|
+
<td>Greek Macintosh</td>
|
372
|
+
</tr>
|
373
|
+
<tr>
|
374
|
+
<td>200</td>
|
375
|
+
<td>0xC8</td>
|
376
|
+
<td>1250</td>
|
377
|
+
<td>Eastern European Windows</td>
|
378
|
+
</tr>
|
379
|
+
<tr>
|
380
|
+
<td>201</td>
|
381
|
+
<td>0xC9</td>
|
382
|
+
<td>1251</td>
|
383
|
+
<td>Russian Windows</td>
|
384
|
+
</tr>
|
385
|
+
<tr>
|
386
|
+
<td>202</td>
|
387
|
+
<td>0xCA</td>
|
388
|
+
<td>1254</td>
|
389
|
+
<td>Turkish Windows</td>
|
390
|
+
</tr>
|
391
|
+
<tr>
|
392
|
+
<td>203</td>
|
393
|
+
<td>0xCB</td>
|
394
|
+
<td>1253</td>
|
395
|
+
<td>Greek Windows</td>
|
396
|
+
</tr>
|
397
|
+
<tr>
|
398
|
+
<td>204</td>
|
399
|
+
<td>0xCC</td>
|
400
|
+
<td>1257</td>
|
401
|
+
<td>Baltic Windows</td>
|
402
|
+
</tr>
|
403
|
+
</tbody></table>
|