CustomCRSQuery_Patch.txt

sowelu -, 2010-03-24 04:09 PM

Download (2.06 KB)

 
1
Index: src/core/qgscoordinatereferencesystem.cpp
2
===================================================================
3
--- src/core/qgscoordinatereferencesystem.cpp	(revision 13139)
4
+++ src/core/qgscoordinatereferencesystem.cpp	(working copy)
5
@@ -203,12 +203,15 @@
6
     ellipsoid_acronym NOT NULL,
7
     parameters text NOT NULL,
8
     srid integer NOT NULL,
9
-    auth_name varchar NOT NULL,
10
-    auth_id integer NOT NULL,
11
+    epsg integer,
12
+    //auth_name varchar NOT NULL,
13
+    //auth_id integer NOT NULL,
14
     is_geo integer NOT NULL);
15
   */
16
 
17
-  QString mySql = "select srs_id,description,projection_acronym,ellipsoid_acronym,parameters,srid,auth_name||':'||auth_id,is_geo from tbl_srs where " + expression + "='" + value + "'";
18
+  // auth_id & auth_name no longer in table
19
+  //QString mySql = "select srs_id,description,projection_acronym,ellipsoid_acronym,parameters,srid,auth_name||':'||auth_id,is_geo from tbl_srs where " + expression + "='" + value + "'";
20
+  QString mySql = "select srs_id,description,projection_acronym,ellipsoid_acronym,parameters,srid,epsg,is_geo from tbl_srs where " + expression + "='" + value + "'";
21
   myResult = sqlite3_prepare( myDatabase, mySql.toUtf8(), mySql.toUtf8().length(), &myPreparedStatement, &myTail );
22
   // XXX Need to free memory from the error msg if one is set
23
   if ( myResult == SQLITE_OK && sqlite3_step( myPreparedStatement ) == SQLITE_ROW )
24
@@ -219,7 +222,8 @@
25
     mEllipsoidAcronym = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 3 ) );
26
     QString toProj4 = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 4 ) );
27
     mSRID = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 5 ) ).toLong();
28
-    mAuthId = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 6 ) );
29
+    // AuthID no longer in table
30
+    //mAuthId = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 6 ) );
31
     int geo = QString::fromUtf8(( char * )sqlite3_column_text( myPreparedStatement, 7 ) ).toInt();
32
     mGeoFlag = ( geo == 0 ? false : true );
33
     setProj4String( toProj4 );