Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c0bfa86

Browse files
author
Jonathan Beliën
committed
Fix LAYER FILTER
1 parent ef04f16 commit c0bfa86

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Parser/Layer.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ public function parse($content = null): LayerObject
101101
$layer->feature->add($feature);
102102

103103
$this->currentLineIndex = $featureParser->lineEnd;
104+
} elseif ($this->parsing === 'LAYER' && preg_match('/^FILTER (\(.+\))$/i', $line, $matches)) {
105+
$layer->filer = $matches[1];
104106
} elseif ($this->parsing === 'LAYER' && preg_match('/^FILTER ["\'](.+)["\']$/i', $line, $matches)) {
105107
$layer->filer = $matches[1];
106108
} elseif ($this->parsing === 'LAYER' && preg_match('/^FILTERITEM ["\'](.+)["\']$/i', $line, $matches)) {

src/Writer/Layer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function write($layer, int $indentSize = 0, string $indent = self::WRITER
3131
$this->text .= self::getTextRaw('DEBUG', $layer->debug, $indentSize + 1, $indent);
3232
$this->text .= self::getTextString('ENCODING', $layer->encoding, $indentSize + 1, $indent);
3333
$this->text .= self::getTextArray('EXTENT', $layer->extent, $indentSize + 1, $indent);
34-
$this->text .= self::getTextString('FILTER', $layer->filter, $indentSize + 1, $indent);
34+
$this->text .= self::getText('FILTER', $layer->filter, $indentSize + 1, $indent);
3535
$this->text .= self::getTextString('FILTERITEM', $layer->filteritem, $indentSize + 1, $indent);
3636
$this->text .= self::getTextString('FOOTER', $layer->footer, $indentSize + 1, $indent);
3737
$this->text .= self::getText('GEOMTRANSFORM', $layer->geomtransform, $indentSize + 1, $indent);

0 commit comments

Comments
 (0)