Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#3802 closed defect (fixed)

STYLE-> GEOMTRANSFORM with ANGLE auto rotates vectors the wrong way

Reported by: havatv Owned by: tbonfort
Priority: normal Milestone: 6.0 release
Component: AGG Version: svn-trunk (development)
Severity: normal Keywords: geomtransform, angle auto
Cc: havatv

Description

STYLE-> GEOMTRANSFORM with ANGLE auto rotates vector symbols the wrong way.

Here is the svn diff for a fix that worked for me.

Index: mapserver/mapgeomtransform.c
===================================================================
--- mapserver/mapgeomtransform.c        (revisjon 11451)
+++ mapserver/mapgeomtransform.c        (arbeidskopi)
@@ -134,8 +134,6 @@
             continue;
           if(style->autoangle==MS_TRUE) {
             style->angle = calcMidAngle(&(line->point[i-1]),&(line->point[i]),&(line->point[i+1]));
-            if(symbolset->symbol[style->symbol]->type==MS_SYMBOL_VECTOR)
-              style->angle = - style->angle;
           }
           msDrawMarkerSymbol(symbolset,image,p,style,scalefactor);
         }

Change History (3)

comment:1 by havatv, 13 years ago

My first diff fixed geomtransform vertices, but it seems as if this also applies to geomtransform start and geomtransform end

A new svn diff that also included start and end:

Index: mapserver/mapgeomtransform.c
===================================================================
--- mapserver/mapgeomtransform.c        (revisjon 11451)
+++ mapserver/mapgeomtransform.c        (arbeidskopi)
@@ -103,8 +103,6 @@
             continue;
         if(style->autoangle==MS_TRUE && line->numpoints>1) {
           style->angle = calcOrientation(&(line->point[line->numpoints-2]),p);
-          if(symbolset->symbol[style->symbol]->type==MS_SYMBOL_VECTOR)
-            style->angle = - style->angle;
         }
         msDrawMarkerSymbol(symbolset,image,p,style,scalefactor);
       }
@@ -118,8 +116,6 @@
             continue;
         if(style->autoangle==MS_TRUE && line->numpoints>1) {
           style->angle = calcOrientation(p,&(line->point[1]));
-          if(symbolset->symbol[style->symbol]->type==MS_SYMBOL_VECTOR)
-            style->angle = - style->angle;
         }
         msDrawMarkerSymbol(symbolset,image,p,style,scalefactor);
       }
@@ -134,8 +130,6 @@
             continue;
           if(style->autoangle==MS_TRUE) {
             style->angle = calcMidAngle(&(line->point[i-1]),&(line->point[i]),&(line->point[i+1]));
-            if(symbolset->symbol[style->symbol]->type==MS_SYMBOL_VECTOR)
-              style->angle = - style->angle;
           }
           msDrawMarkerSymbol(symbolset,image,p,style,scalefactor);
         }

comment:2 by tbonfort, 13 years ago

Resolution: fixed
Status: newclosed

fixed in r 11513.

nice catch Havard, those two lines where there to account for the wrong orientation that was applied to rotating vector symbols in previous versions, and aren't necessary anymore with the 6.0 rendering api.

comment:3 by tbonfort, 13 years ago

fix is in r11513

Note: See TracTickets for help on using tickets.