Changeset 15099 for issm/trunk-jpl/src/wrappers/KMLOverlay/KMLOverlay.cpp
- Timestamp:
- 05/24/13 12:38:54 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/wrappers/KMLOverlay/KMLOverlay.cpp
r13250 r15099 5 5 6 6 void KMLOverlayUsage(void){/*{{{*/ 7 _pprint Line_("KMLOverlay - KML file overlay module:");8 _pprint Line_("");9 _pprint Line_(" This module reads a list of image files and writes a KML or KMZ overlay file.");10 _pprint Line_("");11 _pprint Line_(" Usage:");12 _pprint Line_(" ierror=KMLOverlay(kmlfile,'param name',param,...);");13 _pprint Line_("");14 _pprint Line_(" kmlfile KML or KMZ file name (string)");15 _pprint Line_("");16 _pprint Line_(" lataxis latitude axis (double vector [south north], required)");17 _pprint Line_(" longaxis longitude axis (double vector [west east], required)");18 _pprint Line_(" images relative or http image file names (string or array of strings or cell array of strings, required)");19 _pprint Line_(" zip flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");20 _pprint Line_("");21 _pprint Line_(" ierror error flag (double, non-zero for error)");22 _pprint Line_("");23 _pprint Line_(" Example:");24 _pprint Line_(" KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");25 _pprint Line_("");7 _pprintString_("KMLOverlay - KML file overlay module:" << "\n"); 8 _pprintString_("" << "\n"); 9 _pprintString_(" This module reads a list of image files and writes a KML or KMZ overlay file." << "\n"); 10 _pprintString_("" << "\n"); 11 _pprintString_(" Usage:" << "\n"); 12 _pprintString_(" ierror=KMLOverlay(kmlfile,'param name',param,...);" << "\n"); 13 _pprintString_("" << "\n"); 14 _pprintString_(" kmlfile KML or KMZ file name (string)" << "\n"); 15 _pprintString_("" << "\n"); 16 _pprintString_(" lataxis latitude axis (double vector [south north], required)" << "\n"); 17 _pprintString_(" longaxis longitude axis (double vector [west east], required)" << "\n"); 18 _pprintString_(" images relative or http image file names (string or array of strings or cell array of strings, required)" << "\n"); 19 _pprintString_(" zip flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)" << "\n"); 20 _pprintString_("" << "\n"); 21 _pprintString_(" ierror error flag (double, non-zero for error)" << "\n"); 22 _pprintString_("" << "\n"); 23 _pprintString_(" Example:" << "\n"); 24 _pprintString_(" KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);" << "\n"); 25 _pprintString_("" << "\n"); 26 26 }/*}}}*/ 27 27 WRAPPER(KMLOverlay){ … … 63 63 64 64 options->Get(&lataxis ,&nlat ,(char*)"lataxis"); 65 if (verbose && lataxis) for (i=0; i<nlat; i++) _print Line_(" lataxis [" << i << "]=" << lataxis[i]);65 if (verbose && lataxis) for (i=0; i<nlat; i++) _printString_(" lataxis [" << i << "]=" << lataxis[i] << "\n"); 66 66 options->Get(&longaxis,&nlong,(char*)"longaxis"); 67 if (verbose && longaxis) for (i=0; i<nlong; i++) _print Line_(" longaxis[" << i << "]=" << longaxis[i]);67 if (verbose && longaxis) for (i=0; i<nlong; i++) _printString_(" longaxis[" << i << "]=" << longaxis[i] << "\n"); 68 68 options->Get(&pimages,&nimages,(char*)"images"); 69 if (verbose && pimages) for (i=0; i<nimages; i++) _print Line_(" pimages[" << i << "]=\"" << pimages[i] << "\"");69 if (verbose && pimages) for (i=0; i<nimages; i++) _printString_(" pimages[" << i << "]=\"" << pimages[i] << "\"" << "\n"); 70 70 options->Get(&dzip,(char*)"zip",0.); 71 if (verbose) _print Line_(" dzip=" << dzip);71 if (verbose) _printString_(" dzip=" << dzip << "\n"); 72 72 73 73 /*some checks*/ … … 84 84 if(!strlen(filkml)) strcpy(filkml,"stdout"); 85 85 86 if(verbose) _print Line_("Opening kml overlay file \"" << filkml << "\".");86 if(verbose) _printString_("Opening kml overlay file \"" << filkml << "\"." << "\n"); 87 87 fid=fopen(filkml,"w"); 88 88 89 89 /* Run core computations: */ 90 if (verbose) _print Line_("Calling core:");90 if (verbose) _printString_("Calling core:" << "\n"); 91 91 KMLOverlayx(&ierror,lataxis,longaxis,nimages,pimages,fid); 92 92 93 if (verbose) _print Line_("Closing file \"" << filkml << "\".");93 if (verbose) _printString_("Closing file \"" << filkml << "\"." << "\n"); 94 94 fclose(fid); 95 95 … … 108 108 strcat(czip,pimages[i]); 109 109 } 110 if (verbose) _print Line_("Zipping file \"" << filkmz << "\".");111 if (verbose) _print Line_(czip);110 if (verbose) _printString_("Zipping file \"" << filkmz << "\"." << "\n"); 111 if (verbose) _printString_(czip << "\n"); 112 112 113 113 if (mexEvalString(czip)) _error_("Error zipping file \"" << filkmz << "\".");
Note:
See TracChangeset
for help on using the changeset viewer.