line |
true |
false |
branch |
63
|
0 |
1 |
Newxz(index->entries, num_entries, struct index_entry); |
64
|
0 |
1 |
Newxz(index->matches, num_entries, struct index_entry *); |
77
|
1 |
1 |
if (index->entries != NULL) { |
79
|
6 |
1 |
for (i = 0; i < n; ++i) { |
86
|
1 |
1 |
if (index->matches != NULL) { |
98
|
0 |
2 |
if (self->dbf_stream != NULL) { |
102
|
1 |
1 |
if (self->shp_stream != NULL) { |
106
|
2 |
0 |
if (self->dbf_filename != NULL) { |
109
|
2 |
0 |
if (self->shp_filename != NULL) { |
134
|
1 |
0 |
while (field != NULL) { |
135
|
1 |
0 |
if (is_tzid(field)) { |
142
|
0 |
1 |
if (!has_tzid) { |
147
|
0 |
1 |
if (header->num_records == 0) { |
174
|
0 |
6 |
if (dbf_record_is_deleted(record)) { |
178
|
0 |
6 |
if (self->dbf_num >= index->num_entries) { |
186
|
6 |
0 |
while (field != NULL) { |
187
|
6 |
0 |
if (is_tzid(field)) { |
226
|
0 |
6 |
if (self->shp_num >= index->num_entries) { |
233
|
6 |
0 |
if (record->type == SHP_TYPE_POLYGON) { |
290
|
1 |
9 |
if (lat == 90.0) { |
292
|
25 |
1 |
for (i = 0; i < 25; ++i) { |
297
|
8 |
1 |
else if (lon == -180.0 || lon == 180.0) { |
|
1 |
7 |
else if (lon == -180.0 || lon == 180.0) { |
317
|
65 |
1 |
for (i = 0; i < 25; ++i) { |
319
|
7 |
58 |
if (lon >= z->left && lon <= z->right) { |
|
5 |
2 |
if (lon >= z->left && lon <= z->right) { |
323
|
3 |
62 |
if (lon >= z->right) { |
346
|
42 |
7 |
for (i = 0; i < n; ++i) { |
348
|
6 |
36 |
if (shp_point_in_bounding_box(location, entry->bbox[0], |
356
|
2 |
5 |
if (m == 1) { |
364
|
4 |
5 |
for (i = 0; i < m; ++i) { |
369
|
0 |
4 |
if (shp_seek_record(fh, entry->file_offset, &record) < 0) { |
374
|
4 |
0 |
if (record != NULL) { |
375
|
4 |
0 |
if (record->type == SHP_TYPE_POLYGON) { |
377
|
2 |
2 |
if (shp_point_in_polygon(location, polygon) != 0) { |
409
|
0 |
3 |
if ((items - 1) % 2 != 0) { |
413
|
2 |
3 |
for (i = 1; i < items; i += 2) { |
414
|
2 |
0 |
key = SvPV_nolen_const(ST(i)); |
416
|
2 |
0 |
if (strEQ(key, "file_base")) { |
421
|
1 |
2 |
if (file_base == NULL) { |
428
|
2 |
1 |
XCPT_TRY_START { |
435
|
2 |
0 |
self->dbf_stream = fopen(SvPV_nolen_const(self->dbf_filename), "rb"); |
436
|
1 |
1 |
if (self->dbf_stream == NULL) { |
441
|
1 |
0 |
self->shp_stream = fopen(SvPV_nolen_const(self->shp_filename), "rb"); |
442
|
0 |
1 |
if (self->shp_stream == NULL) { |
448
|
0 |
1 |
if (dbf_read(dbf_fh, handle_dbf_header, handle_dbf_record) < 0) { |
459
|
0 |
1 |
if (self->dbf_num != expected_size) { |
466
|
0 |
1 |
if (shp_read(shp_fh, handle_shp_header, handle_shp_record) < 0) { |
471
|
0 |
1 |
if (self->shp_num != expected_size) { |
477
|
1 |
1 |
XCPT_CATCH { |
479
|
1 |
0 |
XCPT_RETHROW; |
|
0 |
0 |
XCPT_RETHROW; |
504
|
20 |
0 |
U8 gimme = GIMME_V; |
506
|
0 |
20 |
if ((items - 1) % 2 != 0) { |
507
|
0 |
0 |
warn("Odd-length list passed to %s method", |
511
|
38 |
20 |
for (i = 1; i < items; i += 2) { |
512
|
38 |
0 |
key = SvPV_nolen_const(ST(i)); |
514
|
21 |
17 |
if (strEQ(key, "lat") || strEQ(key, "latitude")) { |
|
2 |
19 |
if (strEQ(key, "lat") || strEQ(key, "latitude")) { |
517
|
2 |
17 |
else if (strEQ(key, "lon") || strEQ(key, "longitude")) { |
|
2 |
0 |
else if (strEQ(key, "lon") || strEQ(key, "longitude")) { |
522
|
1 |
19 |
if (latitude == NULL) { |
526
|
1 |
18 |
if (longitude == NULL) { |
530
|
2 |
16 |
if (!SvNIOK(latitude)) { |
535
|
2 |
14 |
if (!SvNIOK(longitude)) { |
540
|
5 |
9 |
lat = SvNV(latitude); |
541
|
8 |
6 |
lon = SvNV(longitude); |
543
|
14 |
0 |
if (Perl_isnan(lat) || lat < -90.0 || lat > 90.0) { |
|
13 |
1 |
if (Perl_isnan(lat) || lat < -90.0 || lat > 90.0) { |
|
1 |
12 |
if (Perl_isnan(lat) || lat < -90.0 || lat > 90.0) { |
548
|
12 |
0 |
if (Perl_isnan(lon) || lon < -180.0 || lon > 180.0) { |
|
11 |
1 |
if (Perl_isnan(lon) || lon < -180.0 || lon > 180.0) { |
|
1 |
10 |
if (Perl_isnan(lon) || lon < -180.0 || lon > 180.0) { |
558
|
7 |
3 |
if (av_len(time_zones) < 0) { |
560
|
4 |
3 |
if (av_len(time_zones) < 0) { |
566
|
38 |
9 |
for (tz_num = 0; tz_num < tz_count; ++tz_num) { |
568
|
38 |
0 |
if (svp != NULL) { |
569
|
0 |
38 |
XPUSHs(SvREFCNT_inc(*svp)); |
570
|
37 |
1 |
if (gimme == G_SCALAR || ix == 1) { |
|
37 |
0 |
if (gimme == G_SCALAR || ix == 1) { |
591
|
6 |
1 |
for (i = 0; i < n; ++i) { |