Conditions | 1 |
Paths | 1 |
Total Lines | 31 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
94 | public function ST_Value($geo, $band = 1) |
||
95 | { |
||
96 | $split = GIS::split_ewkt(GIS::array_to_ewkt($geo)); |
||
97 | |||
98 | $sql = sprintf(' |
||
99 | SELECT |
||
100 | ST_Value( |
||
101 | %2$s, |
||
102 | %3$d, |
||
103 | ST_GeomFromText( |
||
104 | \'%4$s\', |
||
105 | %5$d |
||
106 | ) |
||
107 | ) |
||
108 | FROM %1$s |
||
109 | WHERE |
||
110 | ST_Intersects( |
||
111 | %2$s, |
||
112 | ST_GeomFromText( |
||
113 | \'%4$s\', |
||
114 | %5$d |
||
115 | ) |
||
116 | ) |
||
117 | ', |
||
118 | $this->tableName, |
||
119 | $this->rasterColumn, |
||
120 | $band, |
||
121 | $split[0],$split[1] |
||
122 | ); |
||
123 | |||
124 | return DB::query($sql)->value(); |
||
125 | } |
||
127 |