Skip to content
Permalink
Browse files

Applied patch from Hans-Peter Jansen <hpj [at] urpla.net> to address …

…build issues with python-sip 4.15 and fix srs.db update issue when srs table has no noupdate column.
  • Loading branch information
timlinux committed Dec 8, 2013
1 parent 0aae936 commit c610f37735077fd3efbdd4599601e7d4f5ff83bb
@@ -191,4 +191,6 @@ class QgsMapLayerRegistry : QObject
//! protected constructor
QgsMapLayerRegistry( QObject * parent = 0 );

private:
void connectNotify( const char * signal );
}; // class QgsMapLayerRegistry
@@ -17,4 +17,7 @@ class QgsAttributeDialog : QObject
int exec();
void show();
void dialogDestroyed();

private:
bool eventFilter( QObject *obj, QEvent *event );
};
@@ -335,4 +335,6 @@ class QgsMapCanvas : QGraphicsView
//! called on resize or changed extent to notify canvas items to change their rectangle
void updateCanvasItemPositions();

private:
void connectNotify( const char * signal );
}; // class QgsMapCanvas
@@ -14,4 +14,8 @@ class QgsMessageLogViewer: QDialog

public slots:
void logMessage( QString message, QString tag, QgsMessageLog::MessageLevel level );

private:
void showEvent( QShowEvent * );
void hideEvent( QHideEvent * );
};
@@ -1682,6 +1682,8 @@ int QgsCoordinateReferenceSystem::syncDb()

int inserted = 0, updated = 0, deleted = 0, errors = 0;

qDebug( "Load srs db from: %s", QgsApplication::srsDbFilePath().toLocal8Bit().constData());

sqlite3 *database;
if ( sqlite3_open( dbFilePath.toUtf8().constData(), &database ) != SQLITE_OK )
{
@@ -1696,6 +1698,10 @@ int QgsCoordinateReferenceSystem::syncDb()

}

// fix up database, if not done already //
if ( sqlite3_exec( database, "alter table tbl_srs add noupdate boolean", 0, 0, 0 ) == SQLITE_OK )
sqlite3_exec( database, "update tbl_srs set noupdate=(auth_name='EPSG' and auth_id in (5513,5514,5221,2065,102067,4156,4818))", 0, 0, 0 );

sqlite3_exec( database, "UPDATE tbl_srs SET srid=141001 WHERE srid=41001 AND auth_name='OSGEO' AND auth_id='41001'", 0, 0, 0 );

OGRSpatialReferenceH crs = OSRNewSpatialReference( NULL );

0 comments on commit c610f37

Please sign in to comment.
You can’t perform that action at this time.