Skip to content
Permalink
Browse files
- 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@8263 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 24, 2008
1 parent ae18b9f commit 98444a4bd8bf3f5e1cf2702b4dfe50220f85736f
Showing with 188 additions and 456 deletions.
  1. +2 −1 python/core/qgsspatialrefsys.sip
  2. +173 −449 src/core/qgsspatialrefsys.cpp
  3. +13 −6 src/core/qgsspatialrefsys.h
@@ -20,6 +20,8 @@ class QgsSpatialRefSys

//! Default constructor
QgsSpatialRefSys();

~QgsSpatialRefSys();

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


// Misc helper functions -----------------------

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

0 comments on commit 98444a4

Please sign in to comment.