[QGIS Commit] r15590 - trunk/qgis/scripts
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Thu Mar 24 04:13:27 EDT 2011
Author: timlinux
Date: 2011-03-24 01:13:27 -0700 (Thu, 24 Mar 2011)
New Revision: 15590
Removed:
trunk/qgis/scripts/update-srs-db.php
Log:
Removed this as its redundant with patch from Juergen at #3645
Deleted: trunk/qgis/scripts/update-srs-db.php
===================================================================
--- trunk/qgis/scripts/update-srs-db.php 2011-03-24 07:49:23 UTC (rev 15589)
+++ trunk/qgis/scripts/update-srs-db.php 2011-03-24 08:13:27 UTC (rev 15590)
@@ -1,45 +0,0 @@
-<?
-$srs = null;
-$i = 0;
-$j = 1;
-$srs_sync = 0;
-$srs_nosync = 0;
-
-$f = fopen('epsg',r);
-while (!feof($f)) {
- $line = trim(fgets($f));
- if ($line[0] != '#' && $line != '') {
- $chunks = explode('>',$line);
- $srs[$i]['id'] = substr($chunks[0],1);
- $srs[$i]['param'] = trim(substr($chunks[1],0,-1));
- $srs[$i]['linenb'] = $j; //debugging info
- $i++;
- }
- $j++;
-}
-fclose($f);
-
-$f = fopen('update.sql',w);
-$sqlread = new SQLite3('srs.db');
-$sqlwrite = new SQLite3('srs-sync.db');
-
-$r = $sqlread->query("SELECT srid, parameters FROM tbl_srs");
-while ($row = $r->fetchArray(SQLITE3_ASSOC)) {
- foreach($srs as $s) {
- if ($row['srid'] == $s['id']) {
- if ($row['parameters'] != $s['param']) {
- $sqlwrite->query("UPDATE tbl_srs SET parameters='".$s['param']."' WHERE srid='".$s['id']."'");
- fwrite($f,"UPDATE tbl_srs SET parameters='".$s['param']."' WHERE srid='".$s['id']."'".chr(13).chr(10));
- $srs_sync++;
- } else { $srs_nosync++; }
- break;
- }
- }
-}
-
-$sqlread->close();
-$sqlwrite->close();
-fclose($f);
-
-echo $srs_sync.' -- '.$srs_nosync;
-?>
\ No newline at end of file
More information about the QGIS-commit
mailing list