Skip to content

Commit

Permalink
Spot slightly different OGR string in later version.
Browse files Browse the repository at this point in the history
  • Loading branch information
dracos committed Oct 26, 2023
1 parent 5001d67 commit ab25fe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers/summary.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
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\)|(?:GEOGCS|PROJCS).*?(?:1936|WGS 84).*\]\])\n(.*)#s', $ogr, $m);
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).*?(?:1936|WGS 84).*\]\])\n(.*)#s', $ogr, $m);
if (!$m) { print $ogr; exit; }
preg_match_all('#^(.*?): .*?$#m', $m[6], $mm);
return [
Expand Down

0 comments on commit ab25fe9

Please sign in to comment.