[fusion-commits] r2470 - trunk/widgets/Query/classes
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Tue Nov 29 01:58:21 EST 2011
Author: liuar
Date: 2011-11-28 22:58:21 -0800 (Mon, 28 Nov 2011)
New Revision: 2470
Modified:
trunk/widgets/Query/classes/query.php
Log:
Submit on behalf of Spark Liu: Fix ticket #495 - Query widget doesn't work when CS is null
Modified: trunk/widgets/Query/classes/query.php
===================================================================
--- trunk/widgets/Query/classes/query.php 2011-11-28 09:03:35 UTC (rev 2469)
+++ trunk/widgets/Query/classes/query.php 2011-11-29 06:58:21 UTC (rev 2470)
@@ -247,10 +247,15 @@
{
if ($scReader->GetName() == $spatialContext)
{
- $source = $coordSysFactory->Create($scReader->GetCoordinateSystemWkt());
- $target = $coordSysFactory->Create($map->GetMapSRS());
- $csTransform = $coordSysFactory->GetTransform($source, $target);
- $csInverseTransform = $coordSysFactory->GetTransform($target, $source);
+ $sourceCs = $scReader->GetCoordinateSystemWkt();
+ $targetCs = $map->GetMapSRS();
+ if($sourceCs != '' && $targetCs != '')
+ {
+ $source = $coordSysFactory->Create($sourceCs);
+ $target = $coordSysFactory->Create($targetCs);
+ $csTransform = $coordSysFactory->GetTransform($source, $target);
+ $csInverseTransform = $coordSysFactory->GetTransform($target, $source);
+ }
}
}
$scReader->Close();
More information about the fusion-commits
mailing list