Skip to content

Commit

Permalink
- speed up QgsSpatialRefSys after migration to OGR C-API:
Browse files Browse the repository at this point in the history
  - 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
  • Loading branch information
jef committed Mar 24, 2008
1 parent d096779 commit a0001ee
Show file tree
Hide file tree
Showing 3 changed files with 188 additions and 456 deletions.
3 changes: 2 additions & 1 deletion python/core/qgsspatialrefsys.sip
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class QgsSpatialRefSys

//! Default constructor
QgsSpatialRefSys();

~QgsSpatialRefSys();

/*!
* Constructs a SRS object from a WKT string
Expand All @@ -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);
Expand Down
Loading

0 comments on commit a0001ee

Please sign in to comment.