Changeset 14282


Ignore:
Timestamp:
01/23/13 10:26:27 (12 years ago)
Author:
jschierm
Message:

NEW: Allow for 'no translation' option in WriteExp methods.

Location:
issm/trunk-jpl/src/c/classes/objects/KML
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/classes/objects/KML/KML_LineString.cpp

    r13036 r14282  
    197197        x  =xNew<IssmDouble>(ncoord);
    198198        y  =xNew<IssmDouble>(ncoord);
    199         Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
     199        if (sgn) {
     200                Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
     201        }
     202        else {
     203                memcpy(x,lon,ncoord*sizeof(IssmDouble));
     204                memcpy(y,lat,ncoord*sizeof(IssmDouble));
     205        }
    200206
    201207/*  write header  */
  • issm/trunk-jpl/src/c/classes/objects/KML/KML_LinearRing.cpp

    r13056 r14282  
    186186        x  =xNew<IssmDouble>(ncoord);
    187187        y  =xNew<IssmDouble>(ncoord);
    188         Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
     188        if (sgn) {
     189                Ll2xyx(x,y,lat,lon,ncoord,sgn,cm,sp);
     190        }
     191        else {
     192                memcpy(x,lon,ncoord*sizeof(IssmDouble));
     193                memcpy(y,lat,ncoord*sizeof(IssmDouble));
     194        }
    189195
    190196/*  write header  */
  • issm/trunk-jpl/src/c/classes/objects/KML/KML_Point.cpp

    r13056 r14282  
    166166/*  convert latitude and longitude to x and y  */
    167167
    168         Ll2xyx(&x,&y,&lat,&lon,1,sgn,cm,sp);
     168        if (sgn) {
     169                Ll2xyx(&x,&y,&lat,&lon,1,sgn,cm,sp);
     170        }
     171        else {
     172                memcpy(&x,&lon,1*sizeof(IssmDouble));
     173                memcpy(&y,&lat,1*sizeof(IssmDouble));
     174        }
    169175
    170176/*  write header  */
Note: See TracChangeset for help on using the changeset viewer.