[mapserver-commits] r7608 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Wed May 21 01:24:51 EDT 2008


Author: sdlime
Date: 2008-05-21 01:24:51 -0400 (Wed, 21 May 2008)
New Revision: 7608

Modified:
   trunk/mapserver/mapgraticule.c
Log:
Switch mapgraticule.c to use msProjectionsDiffer() to decide if projection is necessary.

Modified: trunk/mapserver/mapgraticule.c
===================================================================
--- trunk/mapserver/mapgraticule.c	2008-05-21 05:09:34 UTC (rev 7607)
+++ trunk/mapserver/mapgraticule.c	2008-05-21 05:24:51 UTC (rev 7608)
@@ -215,8 +215,10 @@
     pInfo->pboundinglines[0].point[1].y = rectMapCoordinates.maxy;
 
 #ifdef USE_PROJ
-    if( layer->map->projection.numargs > 0 && layer->projection.numargs > 0 )
-      msProjectLine( &layer->map->projection, &layer->projection, &pInfo->pboundinglines[0] );
+    if(layer->project && msProjectionsDiffer(&(layer->projection), &(layer->map->projection)))
+      msProjectLine(&layer->map->projection, &layer->projection, &pInfo->pboundinglines[0]);
+    else
+      layer->project = MS_FALSE;
 #endif
 
     /*
@@ -230,8 +232,10 @@
     pInfo->pboundinglines[1].point[1].y = rectMapCoordinates.miny;
 
 #ifdef USE_PROJ
-    if( layer->map->projection.numargs > 0 && layer->projection.numargs > 0 )
-      msProjectLine( &layer->map->projection, &layer->projection, &pInfo->pboundinglines[1] );
+    if(layer->project && msProjectionsDiffer(&(layer->projection), &(layer->map->projection)))
+      msProjectLine(&layer->map->projection, &layer->projection, &pInfo->pboundinglines[1]);
+    else
+      layer->project = MS_FALSE;
 #endif
 
     /*
@@ -245,8 +249,10 @@
     pInfo->pboundinglines[2].point[1].y   = rectMapCoordinates.maxy;
 
 #ifdef USE_PROJ
-    if( layer->map->projection.numargs > 0 && layer->projection.numargs > 0 )
-      msProjectLine( &layer->map->projection, &layer->projection, &pInfo->pboundinglines[2] );
+    if(layer->project && msProjectionsDiffer(&(layer->projection), &(layer->map->projection)))
+      msProjectLine(&layer->map->projection, &layer->projection, &pInfo->pboundinglines[2]);
+    else
+      layer->project = MS_FALSE;
 #endif
 
     /*
@@ -260,8 +266,10 @@
     pInfo->pboundinglines[3].point[1].y = rectMapCoordinates.maxy;
 
 #ifdef USE_PROJ
-    if( layer->map->projection.numargs > 0 && layer->projection.numargs > 0 )
-      msProjectLine( &layer->map->projection, &layer->projection, &pInfo->pboundinglines[3] );
+    if(layer->project && msProjectionsDiffer(&(layer->projection), &(layer->map->projection)))
+      msProjectLine(&layer->map->projection, &layer->projection, &pInfo->pboundinglines[3]);
+    else
+      layer->project = MS_FALSE;
 #endif
   }
 



More information about the mapserver-commits mailing list