Skip to content
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

git-svn-id: c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 24, 2008
1 parent d096779 commit a0001eea4c379f9662be8d8271730fa4a73c1074
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


* 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);

0 comments on commit a0001ee

Please sign in to comment.