Skip to content

Commit

Permalink
Spot another OGR string variant.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Oct 16, 2024
1 parent a014896 commit 8f473bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layers/summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
file_put_contents($ROOT . 'tilma/web/layers.json', $j);

function parse_ogr($ogr) {
preg_match('#^INFO: Open.*\n *using driver.*successful\.\n\nLayer name: (.*?)\n(?:Metadata:\n DBF_DATE_LAST_UPDATE=(.*?)\n)?Geometry: (.*?)\nFeature Count: (.*?)\n(?:Extent: (.*?)\n)?Layer SRS WKT:\n(?:\(unknown\)|(?:GEOGCR?S|PROJCR?S|COMPOUNDCRS).*?(?:1936|WGS 84).*\]\])\n(.*)#s', $ogr, $m);
if (!$m) { print $ogr; exit; }
preg_match('#^INFO: Open.*\n *using driver.*successful\.\n\nLayer name: (.*?)\n(?:Metadata:\n DBF_DATE_LAST_UPDATE=(.*?)\n)?Geometry: (.*?)\nFeature Count: (.*?)\n(?:Extent: (.*?)\n)?Layer SRS WKT:\n(?:\(unknown\)|(?:GEOGCR?S|PROJCR?S|COMPOUNDCRS|ENGCRS).*?(?:1936|WGS 84|unknown).*\]\])\n(.*)#s', $ogr, $m);
if (!$m) { print $ogr; exit; }
preg_match_all('#^(.*?): .*?$#m', $m[6], $mm);
return [
'name' => $m[1],
Expand Down

0 comments on commit 8f473bb

Please sign in to comment.