Conditions | 3 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php |
||
32 | public function getSrid() |
||
33 | { |
||
34 | if (empty($this->info['srid'])) { |
||
35 | |||
36 | $cmd = sprintf(' |
||
37 | gdalsrsinfo -o wkt %1$s', |
||
38 | $this->getFullPath() |
||
39 | ); |
||
40 | |||
41 | $output = `$cmd`; |
||
42 | |||
43 | if (preg_match('/\WAUTHORITY\["EPSG","([^"]+)"\]\]$/', $output, $matches)) { |
||
44 | $this->info['srid'] = $matches[1]; |
||
45 | } |
||
46 | } |
||
47 | |||
48 | return $this->info['srid']; |
||
49 | } |
||
65 |