Skip to content

Commit a0001ee

Browse files
author
jef
committed
- speed up QgsSpatialRefSys after migration to OGR C-API:
- create and destroy OGRSpatialReferenceH in constructor/destructor - move the PROJ.4 strings to OGR instead of a member variable and keep track its validity in mIsValidFlag. This reduces the need to allocate/deallocate of OGR structures and PROJ.4 parsing and thereby speeds it up quite a bit. Especially when on-the-fly projection is in use. - collect common code of createFromSrid, createFromEpsg and createFromSrsId in the new loadFromDb method NOTE: invalid PROJ.4 strings are now lost, I hope that doesn't break anything. git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8263 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent d096779 commit a0001ee

File tree

3 files changed

+188
-456
lines changed

3 files changed

+188
-456
lines changed

python/core/qgsspatialrefsys.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ class QgsSpatialRefSys
2020

2121
//! Default constructor
2222
QgsSpatialRefSys();
23+
24+
~QgsSpatialRefSys();
2325

2426
/*!
2527
* Constructs a SRS object from a WKT string
@@ -34,7 +36,6 @@ class QgsSpatialRefSys
3436
*/
3537
QgsSpatialRefSys(const long theId, SRS_TYPE theType=POSTGIS_SRID);
3638

37-
3839
// Misc helper functions -----------------------
3940

4041
void createFromId(const long theId, SRS_TYPE theType=POSTGIS_SRID);

0 commit comments

Comments
 (0)