**********************   ASCII FILE  TO MSPHINX ***********************
			   Msp MyFile.com


GLOSSARY
========
   ViewPlane    Refers to the Msphinx view memory. It  is always linked with a color scale (Look Up Table)
		[a ViewPlane is a 8 bits image computed from  one of the data planes[8/16/32 bits]]
			* Red(1) Green(2) Blue(3) TrueColor(0) 
			* -1 for the current plane
   Plane	Refers to the data planes from 1 to 4095
			* -1 for the current plane
			* 0 to the R/G/B corresponding data planes
   Graph Plane  Refers to a 4 bits overlay view memory (15 colors) for drawing purpose
   Mask Plane   Refers to a 4 bits overlay view memory (15 colors) for drawing mask areas purpose

   Cell		A cell is a subdivision of a plane:
			ex: a plane 1024 by 1024 can be split into 4 cells (512 by 512)
		

   data_type:   0->7 
			UCHAR  or 0 unsigned character (8  bits)
			USHORT or 1 unsigned short     (16 bits)
			SHORT  or 2 signed short       (16 bits)
			INT    or 3 integer            (32 bits)
			FLOAT  or 4 float     	       (32 bits)
			CHAR   or 5 signed character   (8  bits)
			UINT   or 6 unsigned integer   (32 bits)
			DOUBLE or 7 double             (64 bits)

Color Lut Name:      GREY, RAINBOW0, RAINBOW1, RAINBOW2, RAINBOW3, RAINBOW4, GEODESIC, SEISMIC,
		     TOPOGRAPHIC, ADDITIVE, CEE, X11, GREY16, RAINBOW16, NONE

Font name list:	     Fonts are archived in the Mfiles/Fonts directory
		     Bell.ttf       Courbi.ttf     Georgiai.ttf   Trebuc.ttf     Verdanabi.ttf
		     Calist.ttf     Couri.ttf      Gothic.ttf     Trebucb.ttf    Verdanai.ttf
		     Chey.ttf       Curlz.ttf      Greek.ttf      Trebucbi.ttf   Vladimir.ttf
		     Comic.ttf      Georgia.ttf    Harngton.ttf   Trebuci.ttf    font.out
		     Cour.ttf       Georgiab.ttf   Horndond.ttf   Verdana.ttf
		     Courb.ttf      Georgiabi.ttf  Rock.ttf       Verdanab.ttf

Drawing Line Style  :   SOLID MICRODASH SMALLDASH LONGDASH  DASHDOT LINEDOT DASH 

Drawing Color Name  :	RED,GREEN,BLUE,BLACK,WHITE,MAGENTA,FOREST,SIENNA,YELLOW,CORAL,VIOLET,
			PLUM,CYAN,TURQUOISE,TRANSPARENT,CURRENT

Drawing Icon Name   :   SQUARE DIAMOND CIRCLE TRIANGLEU TRIANGLED TRIANGLEL TRIANGLER


convolution product name: 	"OWNER","SMOOTH","SOBEL","VERTICAL1","HORIZONTAL1",
		  		"EASTDIAGONAL1","WESTDIAGONAL1","VERTICAL2"
		  		"HORIZONTAL2","EASTDIAGONAL2","WESTDIAGONAL2"


Standard geometry Units
	X=0 				Input geometry row columns
	Y=0 
	Width=700 
	Height=700 
	    LatitudeMin=-90.0000	TO projection geometry in degrees
	    LatitudeMax=90.0000
	    LongitudeMin=-180.0000
	    LongitudeMax=180.0000     
	       LatitudeMinMeters=	TO ..  in meters
	       LatitudeMaxMeters=
	       LongitudeMinMeters=
	       LongitudeMaxMeters=     
	          LatitudeMinPOLDER=	TO ... in POLDER grid
	          LatitudeMaxPOLDER=
	          LongitudeMinPOLDER=
	          LongitudeMaxPOLDER=     

GENERAL RULES
=============

A command line starting with # is analyzed as a comment
A command line is done with a single editor line or using \ for lines concatenation
		ex:
		set_projection_to_geometry  \
				XTo=0 YTo=0 WidthTo=1000 HeightTo=500 ProjectionTo="SINUSOIDAL"\
				LatitudeMinTo=-90.0000 LatitudeMaxTo=90.0000 \
			      	LongitudeMinTo=-180.0000 LongitudeMaxTo=180.0000  \
				CenterLongitudeTO=-120.0000      

MISC
====
send_system  "..."				allows to execute a unix shell within a command file

			ex:send_system "cc ../DEMO_DRAW/send_draw_com.c -o ../DEMO_DRAW/send_draw_com -lm;../DEMO_DRAW/send_draw_com MYIMAGE"

set_output_directory 		/tmp	set the output directory path for the files create in the command file  (defaults ./)
					This output directory will overlap set_output_directory in encapsulate commands (HDFLook Mgraph)
set_input_directory		./	set the input directory path for the imput files in the command  (defaults ./)
set/unset verbose mode
		verbose 		Refers to Msp program verbose mode

		send_set_verbose	Refers to Msphinx program verbose mode
		send_unset_verbose

set_check_text_overlap	shift=RIGHT		When using the text drawing in the graphic planes
					(send_draw_text, send_draw_icon_text, send_draw_projected_text,
					send_draw_projected_icon_text)
					Check pixel overlaping and move the text in the shift direction
					(RIGHT,LEFT,DOWN,UP)
unset_check_text_overlap

set_alias filename			read an aliases list (An alias a word with @, replace all or a part of a command) 
					ex: LABELS2_ALIASES content:
					    ========================
					@WORKSPACE   PlaneWidth=1000 PlaneHeight=1000  DataType=0 CellWidth=1000 CellHeight=1000
					@VIEWPLANE   ViewPlane=3
					@PROJECTION  "ORTHOGRAPHIC"
					@WIDTH       800
					@HEIGHT      800

					   command file content:
					   =====================
						send_set_verbose
						set_alias LABELS2_ALIASES
						set_workspace_geometry @WORKSPACE
						send_show_view @VIEWPLANE
						set_projection_to_geometry XTo=0 YTo=0 WidthTo=@WIDTH HeightTo=@HEIGHT \
                				ProjectionTo=@PROJECTION


		

MSPHINX GEOMETRY AND VIEW PLANES
================================
	
		set_Msphinx_HOME_directory 			Set a new home directory for the .Msphinx structure
			   Home="/tmp"

		set_project 					Set a new project directory 
				ProjectName="TESTCOM" 
				DataPlanesOnDisk=Yes 		Msphinx memory is stored on disk space
				DataPlanesLinked=Yes 		Msphinx memory is linked to the image
				OverlapDataPlanes=Yes 		View Planes overlap Data planes (Only in 8 bit depth)

		set_workspace_geometry 				Set a new plane geometry
				PlaneWidth=1024			Maximum workspace width
				PlaneHeight=1024 		Maximum workspace height
				DataType=CHAR 			[0->6] or [ CharType of data
				CellWidth=512			Cell width
				CellHeight=512			Cell height

		set_view_planes 				Show a view plane
				ViewPlane=3 [0->3]		0 for TRUECOLOR, 1 for RED, 2 for GREEN, 3 for BLUE 
				red=2 green=3 blue=4		Define view planes from data planes

		send_destroy_all_data 				Destroy all data and view data file tructures

		set_plane_data_type    PlaneFrom=1 PlaneTo=1 DataType=CHAR  Allows to modify and stretch  the data plane
					inputMin=10.0                   input minimum data pixel value (optional)
					inputMax=30.0                   input maximum data pixel value
					outputMin=0			output minimum data
					outputMax=255			output maximum data
					(input data from 10 to 30 will be stretch to output values 0 to 255)

under construction:	set_memory_mapping   filename=file

READ WRITE FILES
================

		send_read_other  				Read gif,tif,jpeg,GeoTiff etc.. files
				Plane=1 			The data plane storage
				X=0 				Output position and geometry
				Y=0 				
				Width=0 			Here, the geometry is the input image size
				Height=0 
				Expand=No    			Expand or reduce the input image size to the output geometry
			    	FileName="../IMAGES/LINEAR_MAYFEB256.tif"  Input file name

				Warning: GeoTif read loads the FROM geometry of the reprojection menus

		send_read_simple 				Standard binary files
				Plane=3 			The data plane storage 
				X=0 				Output geometry
				Y=0 
				Width=512 			Here, the geometry is the cell size
				Height=512 
				DataWidth=512  			Width of the input image
				DataType=UCHAR  		Data type of the input image
				Expand=No    			Expand or reduce the input image size to the output geometry
				FileName="MYIMAGE"			Input file name


		send_read_ascii RegularGrid
                                Plane=1                         The data plane storage
                                X=0                             Output position and geometry
                                Y=0
                                Width=0                         
                                Height=0
				ColumsNumber=0			Number of columns in the file
				LinesNumber=0			Number of lines to read
				LinesToSkip=0			Lines to skip at the top of file
				UndefValue=0
				DistanceFactor=0
				NearestPixelInterpolation=Yes
				FileName="MYASCIIFILE"			Input file name
				
		send_read_ascii IrregularGrid
                                Plane=1                         The data plane storage
                                X=0                             Output position and geometry
                                Y=0
                                Width=0                         
                                Height=0
				ColumsNumber=0			Number of columns in the file
				LinesNumber=0			Number of lines to read
				XColumn=0			Colunm position for X values
				YColumn=0			Colunm position for Y values
				ZColumn=0			Colunm position for Z values
				LinesToSkip=0			Lines to skip at the top of file
				UndefValue=0			Undefined value 
				DistanceFactor=0		
				NearestPixelInterpolation=Yes
				FileName="MYASCIIFILE"			Input file name

		send_read_ascii Plot
                                X=0                             Output position and geometry
                                Y=0
                                Width=0                         
                                Height=0
				Xmini=0				Input geometry in file (x,y) units
				Xmaxi=0				Input geometry will match the output geometry
				Ymini=0
				Ymaxi=0
				Color="Red"
				Thickness=0
				FileName="MYASCIIFILE"			Input file name

		send_read_ascii ArrowField
                                X=0                             Output position and geometry
                                Y=0
                                Width=0                         
                                Height=0
				Xmini=0				Input geometry in file (x,y) units
				Xmaxi=0				Input geometry will match the output geometry
				Ymini=0
				Ymaxi=0
				Color="Red"
				Thickness=0
				Style="SOLID" 			Line style	(see drawing Line Style)
				LenghtFactor=2 			line size factor
				ArrowFactor=1			Arrow (>) size factor
				FileName="MYASCIIFILE"			Input file name

		send_create_frame				Add a frame switch to the send_create_file command 
				Size=				border size (if = 0 no frame)
				Red=				red color
				Green=				green color
				Blue=				blue color
				FrameColor="red"		( select red green blue or FrameColor)
				TopTitle="My file"
				BottomTitle="My file"
				Title="My file"
				FontName=""Bell.ttf"
				TitleColor="Red"
				SizeFactor=2.0			Title factor
		   
		send_create_file 				Create a gif|tiff|jpeg output file
				ViewPlane=-1 			The input view plane
					Plane=			(In tif,Geotif mode with DataPlane=yes)
				...Input geometry (Standard geometry Units[])
				WidthTo=128			Output size
				HeightTo=128
				FileFormat="GIF"		Output format "GIF" "TIF" "JPG" "GEOTIFF"
				Quality=90			(Quality control for jpeg format default 90 (->100 best))
				FileName="MYFILE_COM.gif"		Output file name
				Geometry=TO			if GEOTIF get the geometry from TO or FROM space
				Compress=yes			use internal compression
				DataPlane=yes			(Tiff format send the data plane > 8 bit)


		send_write_simple 				Create a raw binary file
				Plane=3 			The data plane storage 
				...Input geometry (Standard geometry Units[])
				DataType=UCHAR 			Data type of the output image
				Swap=No    			Swap output data (integer 16 or 32 bits)
				Convert=No    			Yes Strech output data using min max
				min=0				if min = max values are computed 
				max=0				(1% 99% of the pixels of the area)
				range=1024.0			range of the output data ex: convert real values
								-1 to 1 to integer 0 to 1023
				FileName="MYIMAGE"			Ouput file name

		send_create_hdf_image 				Create a hdf image 8 bit or 24 bit
				ViewPlane=-1 			The input view plane
				...Input geometry (Standard geometry Units[])
				title="hdf image title"
				FileName="MYFILE_COM.hdf"		Output file name

		send_create_hdf_sds 				Create a sds record
				Plane=3 			The data plane storage 
				...Input geometry (Standard geometry Units[])
				title="hdf sds title"
				FileName="MYFILE_COM.hdf"		Output file name

CLEAR PLANES
============
		send_clear_area 				Clear data memory & view memory & graph&mask planes
				Plane=0 
				X=0 				Output geometry
				Y=0 
				Width=1000 
				Height=1000

		send_clear_graph 				Clear the graphic plane
				X=0 				Output geometry
				Y=0 
				Width=512 
				Height=512

		send_clear_mask 				Clear mask plane
				X=0 				Output geometry
				Y=0 
				Width=512 
				Height=512

COPY_PLANES
===========
		send_copy_plane FromMask=yes			Masked pixels not copied
				PlaneFrom=			From geometry
                                XFrom=0                        
                                YFrom=0
                                WidthFrom=512
                                HeightFrom=512
				ToMask=yes			Masked pixels preserved
				PlaneTo=			To geometry
                                XTo=0                         
                                YTo=0
                                WidthTo=512
                                HeightTo=512

		send_rotate_plane Plane=			geometry
                                  X=0                        
                                  Y=0
                                  Width=512
                                  Height=512

		send_fill_plane   Plane=			geometry
				  DataType=UCHAR                Data type of the output plane (if -1 keep existing)
									(The plane is converted to this type)
                                  X=0                        
                                  Y=0
                                  Width=512
                                  Height=512
				  Fillvalue=255

COLOR SCALES
============

		send_default_color_scale 			Load a Msphinx color scale (each set_view_planes
								will set the default color scale)
				"GREY"				Color scale name (see Color Lut Names)
								if the Color Lut Name is not in the list
								a user file name is red.
								( format: 
								pix no (0->255) red green blue ((0->255))
								"" Empty name clear default

		send_color_scale_name 				Load a Msphinx color scale
				"GREY"				Color scale name (see Color Lut Names)
								if the Color Lut Name is not in the list
								a user file name is red.
								( format: 
								pix no (0->255) red green blue ((0->255))
								
								

		send_copy_lut   				Copy a lut from a plane to another
				PlaneFrom=1
				PlaneTo=3

		send_color_level  level=255 red=255 green=255 blue=255    level 0->255 
		 


DRAW ON GRAPHIC PLANES
======================

		send_draw_text 					Draw a text on the graphic plane
				X1=50 				Location
				Y1=10 
				Border=0 			Border size
				ForegroundColor="RED" 
				BackgroundColor="TRANSPARENT" 
				FontName="Bell.ttf"		Font name any file from Mfiles/Fonts
				SizeFactor=1.0			
				Rotation=0.0
				Frame=Yes			Add background transparent pixels
			   	Text="THIS IS A SIMPLE TEST"    Text to draw

		send_draw_arrow 				Draw an arrow on the graphic plane
				X1=0 				Output location
				Y1=100 
				X2=200 
				Y2=350 
				Thickness=4 			Line thickness
				ArrowFactor=20 			Arrow (>) size factor
				Style="SOLID" 			Line style	(see drawing Line Style)
				Color="GREEN" 			Color		(see drawing color Name)

		send_draw_line 					Draw a line on the graphic plane 
				X1=50 
				Y1=50 
				X2=300 
				Y2=300 
				Thickness=8 
				Style="SOLID" 
				Color="BLUE"

		send_draw_box 					Draw a box on the graphic plane
				X1=0 
				Y1=0 
				X2=512 
				Y2=512 
				Thickness=4 
				Style="SOLID" 
				Color="CYAN"

		send_draw_icon  				Draw an icon on the graphic plane
				X=250 				Location
				Y=150 
				IconName="CIRCLE" 
				IconSize=1.000000 		Size factor
				IconColor="YELLOW"
		
		send_draw_icon_text 				Draw an icon and a text on the graphic plane
				X=250 				Location
				Y=250
			     	IconName="CIRCLE" 		Icon name
				IconSize=1.000000 		Icon size factor
				IconColor="RED"			Icon color
				Border=2 			Text border size
				ForegroundColor="MAGENTA"	Text foreground color
				BackgroundColor="WHITE" 	Text background color
				FontName="Bell.ttf"		Font name any file from Mfiles/Fonts
				SizeFactor=1.0			
				Rotation=0.0
				Frame=Yes			Add background transparent pixels
			       "CIRCLE" 			Text to Draw


		send_draw_scale 				Draw a linear color scale on the view plane
				ViewPlane= 3 			
				X=0 				position and geometry
				Y=600 
				Width=512 
				Height=100 
				lutFrom=0				Lut level start and end (0->255)
				lutTo=255


                send_draw_scale_label                           Draw a labels and ticks  into the graphic plane
                        	X=0                                   Output  geometry
                        	Y=0
                        	Width=300
                        	Height=500
                        	TickColor="Red"                 Lines color
                        	ForegroundColor="Red"           Text foreground color
                        	BackgroundColor="Tranparent"    Text background color
                        	TextFormat="%.2f"               values format (C code)
                        	FontName="Courb.ttf"            (Font name)
                        	SizeFactor=1.0                  Text size factor
                        	UpLeftSide=No                   Label position (default Botton or Right)
                        	NoTicks=No                     Draw ticks
                        	Labels=" 25   1.00  30  Clouds  ...  "      Labels position (z,value z from 0 to 255 )

                send_draw_box_label                            Draw a scale as boxes and labels into the graphic plane and view plane
                        	X=0                                   Output  geometry
                        	Y=0
                        	Width=300
                        	Height=500
                        	TickColor="Red"                 Lines color
                        	ForegroundColor="Red"           Text foreground color
                        	BackgroundColor="Tranparent"    Text background color
                        	TextFormat="%.2f"               values format (C code)
                        	FontName="Courb.ttf"            (Font name)
                        	SizeFactor=1.0                  Text size factor
                        	UpLeftSide=No                   Label position (default Botton or Right)
                        	Labels=" 25   1.00  30  Clouds  ...  "      Labels position (z,value z from 0 to 255 )




FUNCTIONS
=========
		send_enhance 					Redraw the view plane from the data plane 
								with a linear funtion from A minimum to B maximum data value
				ViewPlane=1 
				X=0 
				Y=0 
				Width=1000 
				Height=1000 
				Mask=Yes  			Don't apply the transformation if the pixel is masked
				A=10.0 				From minimum data pixel value
				B=30.0				To maximum data pixel value
				Log=Yes				Logarithmic or linear function


		send_algebra_conv				Set direct pixel conversion (No direct action)
				" 100 -> 200 300 -> 201"        Free text
								In the example the original pixel value 100, before
								applying the algebra equation, will be directly transleted to
 								pixel result 200, and the pixel value 300 to pixel result 201.
								This will be performed with the send_algebra command.

		send_algebra 					Compute an algebra equation
				Mask=No    			Use the mask plane as filter (Masked pixels are not computed)
				SetVal=Yes  			Use the send_algebra_conv settings
				Expand=No    			Color expand the image result to the view plane
				CutMin=0.000000 		values under Cutmin are = Cutmin
				CutMax=255.000000		values over CutMax are = CutMax
				Formula="C[3,1]=rnd()*255"	Equation
								C[3,1]=rnd()*255   Cell nb 1 from  data plane 3 
								R=rnd()*255	   Red plane, full size
								P[100]=rnd()*255   Plane nb 100, full size
								(see Sphinx algebra widget for operators)
				DataType=CHAR			(result plane data type default float)

		send_convolution   				Compute a SOBEL convolution product
				Plane=3 	
				X=0				Position and Geometry 
				Y=0 
				Width=512 
				Height=512 
			        Name="SOBEL"  			Filter name or "OWNER"
				Lines=3 
				Columns=3
				Threshold=8421.000000 
				Style="MATRIX"			The filter is applied on LINES or COLUMNS or as a MATRIX
				Mask=No    			Use the mask plane as filter (Masked pixels are not computed)
				 ""   				Owner filter values 

		send_convolution   				Compute an OWNER values convolution product
				Plane=3 
				X=0 				Geometry
				Y=0 
				Width=512 
				Height=512 
			        Name="OWNER"  
				Lines=1 
				Columns=9
			        Threshold=8421.000000 
				Style="COLUMNS"  		The filter is applied on LINES or COLUMNS
				Mask=No   			Use the mask plane as filter (Masked pixels are not computed)
				Matrix="0,0,0,1,1,1,0,0,0"  	Owner filter values

                send_create_mask                                Fill the mask plane from data pixel intervals
                                X=0                             Geometry
                                Y=0
                                Width=512
                                Height=512
                                Do="AND"                        Do an AND or an OR operation between intervals
                                AddMode=Yes                     Keep existing mask pixels
                                InversMask=No                   Invert mask result
                                Color="CYAN"                    Mask color
                                Filter=" 48 <3 <64  110 <5 < 333"      Filter as  data_value < Plane < data_value etc..
								" 0x55 < 3 0x77 <5 " bit tests

                send_image_pixel_fill_from_mask                 Replace RGB image pixel by a pixel color 
								when the mask pixel is set
                                X=0                             Geometry
                                Y=0
                                Width=512
                                Height=512
				KeepMaskColor=Yes		image pixel clor will be the mask color
				Red=				red intensity (Of the final image pixel)
				Green=				green intensity
				Blue=				blue intensity

		send_area_statistics				Compute basic stats on a zone
				PlaneFrom=3			Data plane start
				PlaneTo=3			Data plane To
                                X=0                             Geometry
                                Y=0
                                Width=512
                                Height=512
				Mask=No   			Use the mask plane as filter (Masked pixels are not computed)
				IgnoreZeros=No   		Ignore zero values
                                AddMode=Yes                     Add to previous zone results

		send_image_resize				Resize an image plane
				PlaneFrom=3			Data plane start
                                XFrom=0                         Start geometry
                                YFrom=0
                                WidthFrom=512
                                HeightFrom=512
				PlaneTo=3			Data plane To
                                XTo=0                           To geometry
                                YTo=0
                                WidthTo=512
                                HeightTo=512
				XFactor=0.0			=0 Computed from From To geometry
				YFactor=0.0			=0 Computed from From To geometry
				FromMask=No   			From area masked pixel are not computed
				ToMask=No   			To area keep masked pixel
				LinearColorScale=No		(RGB image with a non linear color scale)
				RescaleValues=No		From plane image deep > To Image deep
				Method="LinearInterpolation"	"NearestPixel","BicubicSpline","MeanValue","Icon"



PROJECTION FUNCTIONS
====================

projection name [extra parameter nb]:
		LINEAR[..],		POLDER[..],		GOODE[..],	MOLLWEIDEEA[3],
		HAMMER[3],		AZIMUTHAL[2,3],		LAMBERT[2,3],	MILLER[3],
		MOLLWEIDE[3],		ORTHOGRAPHIC[2,3],	ROBINSON[3],	SINUSOIDAL[3],
		VANDERGRINTEN[3],	WAGNER7[3],		MODIS[0,3,8,9]  UTM[10,11,12,0,1]

extra parameter list name
=========================
[0] MajorAxisFrom   		or MajorAxisTo			major axis
[1] MinorAxisFrom   		or MinorAxisTo			minor axis
[2] CenterLatitudeFrom 		or CenterLatitudeTo		center latitude
[3] CenterLongitudeFrom 	or CenterLongitudeTo		center longitude 
[4] FirstStandardParallelFrom 	or FirstStandardParallelTo 	first standard parallel
[5] SecondStandardParallelFrom 	or SecondStandardParallelTo 	second standard parallel
[6] XOffsetInMetersFrom 	or XOffsetInMetersTo 		x offset in meters
[7] YOffsetInMetersFrom 	or YOffsetInMetersTo 		y offset in meters
[8] RowsFrom                  	or RowsTo			Integerized Sinusoidal (MODIS) (86400)
[9] RightJustifyFrom          	or RightJustifyTo 		Integerized Sinusoidal (MODIS) (1)
[10] ZoneFrom			or ZoneTo 			UTM zone index
[11] DatumFrom			or DatumTo			spheroid code number (DATUM) (see list)
[12] FactorFrom			or FactorTo			UTM scale factor (.9996)

Datum list (code number : name )
================================

0:  Clarke 1866 (default)        1: Clarke 1880
2:  Bessel                       3: International 1967
4:  International 1909           5: WGS 72
6:  Everest                      7: WGS 66
8:  GRS 1980/WGS 84              9: Airy
10: Modified Everest            11: Modified Airy
12: Walbeck                     13: Southeast Asia
14: Australian National         15: Krassovsky
16: Hough                       17: Mercury 1960
18: Modified Mercury 1968       19: Sphere of Radius 6370997 meters
20: User input (MajorAxisFrom,MinorAxisFrom)


		set_projection_to_geometry 			set the TO projection geometry
				XTo=0 				TO image location (row,coluns)
				YTo=0 
				WidthTo=1000 
				HeightTo=500 
				ProjectionTo="LINEAR"		TO projection name
				LatitudeMinTo=-90.0000		TO projection geometry in degrees
				LatitudeMaxTo=90.0000
			        LongitudeMinTo=-180.0000
				LongitudeMaxTo=180.0000     
				LatitudeMinToMeters=		TO projection geometry in meters
				LatitudeMaxToMeters=
			        LongitudeMinToMeters=
				LongitudeMaxToMeters=     
				LatitudeMinToPOLDER=		TO projection geometry in POLDER grid
				LatitudeMaxToPOLDER=
			        LongitudeMinToPOLDER=
				LongitudeMaxToPOLDER=     
				[ EXTRA PARAMETERS= value ]	Projection style dependent

		send_projection 				Compute a projection
				KeepBackground=yes		keep/clear plane
				PixelOverlap=No    		Pixel overlap or replace  
				PlaneTo=3 			Data plane output
				PlaneFrom=1			Data plane input
				XFrom=0 			Input geometry (row,columns)
				YFrom=0 
				WidthFrom=1000 
				HeightFrom=500 
				ProjectionFrom="LINEAR" 	Input projection if any else LINEAR
				LatitudeMinFrom=-90.0000 	Input Geometry
				LatitudeMaxFrom=90.0000
				LongitudeMinFrom=-180.0000 
				LongitudeMaxFrom=180.0000 
				LatitudeMinFromMeters=		FROM projection geometry in meters
				LatitudeMaxFromMeters=
			        LongitudeMinFromMeters=
				LongitudeMaxFromMeters=     
				LatitudeMinFromPOLDER=		FROM projection geometry in POLDER grid
				LatitudeMaxFromPOLDER=
			        LongitudeMinFromPOLDER=
				LongitudeMaxFromPOLDER=     
				[ EXTRA PARAMETERS= value ]	Projection style dependent



		send_grids 					Add projected grids on the graphic plane (TO space)
				LatitudeMin=-90.0000 		Where area in the TO space
				LatitudeMax=90.0000 
				LatitudeStep=5.0000 		
			        LongitudeMin=-180.0000 
				LongitudeMax=180.0000
				LongitudeStep=10.0000 
				Color="RED"   			Color drawing
				lineWidth=1
				SendToMgraph=Yes

		send_world_map 					Add a projected world map on the graphic plane (TO space)
				Coastlines=yes Rivers=yes Boundaries=yes
				CoastlineColor="GREEN" RiverColor=Blue BoundaryColor=Magenta
				SendToMgraph=Yes
				lineWidth=1

				other key words
				==============
                                        Rivers=yes           means All rivers
                                        RiversRank1=yes            Permanent major rivers
                                        RiversRank2=yes            Additional major rivers
                                        RiversRank3=yes            Additional rivers
                                        RiversRank4=yes            Minor rivers
                                        RiversRank5=yes            Intermittent major rivers
                                        RiversRank6=yes            Intermittent minor rivers
                                        RiverColor=             All rivers
                                        ColorRank1=
                                        ColorRank2=
                                        ColorRank3=
                                        ColorRank4=
                                        ColorRank5=
                                        ColorRank6=



		send_draw_projected_icon			Add an icon on the graphic plane (TO space)
				XTo= 2.337 			Location
				YTo= 48.837
				IconName="Circle" 
				IconSize=.20 
				IconColor="RED"

		send_draw_projected_text			Add a text on the graphic plane (TO space)
				XTo= 2.337 			Location 
				YTo= 48.837
				Border=0 
				ForegroundColor="WHITE" 
				BackgroundColor="TRANSPARENT"
				FontName="Bell.ttf"		Font name any file from Mfiles/Fonts
				SizeFactor=1.0			
				Rotation=0.0
				Frame=Yes			Add background transparent pixels
				Text="Paris"     

		send_draw_projected_icon_text 			Add an icon and text  on the graphic plane (TO space)
				XTo= 2.337 			Location 
				YTo= 48.837
				IconName="Circle" 
				IconSize=.20 
				IconColor="RED"
				Border=0 
				ForegroundColor="WHITE" 
				BackgroundColor="TRANSPARENT"
				FontName="Bell.ttf"		Font name any file from Mfiles/Fonts
				SizeFactor=1.0			
				Rotation=0.0
				Frame=Yes			Add background transparent pixels
				Text="Paris"     

                send_draw_latitude_labels                       Add latitude label names on the graphic plane
                		ForegroundColor="Red"           
                		BackgroundColor="TRANSPARENT"  
                		Border=0                        border size
                		FontName="Bell.ttf"
                		SizeFactor=1.0                  label size
                		Rotation=0.0
                		TextFormat="%.2f"
                		Longitude=10.0
                		LatitudeMin=100.0
                		LatitudeMax=200.0
                		LatitudeStep=10.0

                send_draw_longitude_labels                      Add latitude label names on the graphic plane
                		ForegroundColor="Red"           
                		BackgroundColor="TRANSPARENT"  
                		Border=0                        border size
                		FontName="Bell.ttf"
                		SizeFactor=1.0                  label size
                		Rotation=0.0
                		TextFormat="%.2f"
                		Latitude=20.0
                		LongitudeMin=10.0
                		LongitudeMax=80.0
                		LongitudeStep=10.0


		send_copy_FROM_parameters_to_TO

		send_copy_TO_parameters_to_FROM

PLOT FUNCTIONS
==============

		send_plot_histogram 				Plot an histogram 
				PlaneFrom=3			Data plane start
				PlaneTo=3			Data plane To
				X=0 				Geometry      
				Y=100 
				Width=200 
				Height=350 
				Xmin=0.0			Class minimum value
				Xmax=1000.0			Class maximun value
				ClassSize=10.0			Class step value
								(Xmin=-1 Xmax=-1 Computed)
				Cumulative=No   		0% to 100% Y value
				YPercent=No   			Y count or percent
				ZeroClassFilter=No   		Class zero unplotted
				RunOverAllCells=No   
				Mask=No                         Use the mask plane as filter (Masked pixels are not computed)
				HistoType="CURVE"		Draw mode "CURVE","STEPS","BARS","BARSWITHGAP"
				Color="CURRENT"
				MgraphPlotMode="NewCurve"	Mgraph plot mode "NEWCURVE","CURVEADDMODE"




		send_plot_transect 				Plot a transect 
				PlaneFrom=3			Data plane start
				PlaneTo=3			Data plane To
				X1=0 				Geometry      
				Y1=100 
				X2=200 
				Y2=350 
				DistanceXUnit=No   		Pixel or distance
				RunOverAllCells=No   
				Mask=No                         Use the mask plane as filter (Masked pixels are not computed)
				Color="CURRENT"
				MgraphPlotMode="NewCurve"	Mgraph plot mode "NEWCURVE","CURVEADDMODE"


		send_plot_bidimentional				Draw a bidimentional scatter plot 
				XPlane=3			X plane
				XPlaneX=100			X geometry
				XPlaneY=100
				XWidth=100 
				XHeight=100 
				YPlane=1			Y plane
				YPlaneX=100 			Y Geometry      
				YPlaneY=100 
				YWidth=100 
				YHeight=100 
				XMask=No                         Use the mask plane as filter (Masked pixels are not computed)
				YMask=No                         Use the mask plane as filter (Masked pixels are not computed)
				Color="CURRENT"
				MgraphPlotMode="NewCurve"	Mgraph plot mode "NEWCURVE","CURVEADDMODE"

		send_contour					Draw a contour on the graphic overlay 
				Plane=3 	
				X=0				Position and Geometry 
				Y=0 
				Width=512 
				Height=512 
				Red=       "8  16"		Color and contour values
				Green=     "30  32"
				Blue=      "64"
				Magenta=   "80"
				White=     ""
				Black=     "112"
				Forest=    "116"
				Sienna=    "120"
				Yellow=    "130"
				Coral=     "150"
				Violet=    "160"
				Plum=      "170"
				Cyan=      "180"
				Turquoise= "200"

		send_plot_contour				Draw a contour with Mgraph
				Plane=3 	
				X=0				Image position and size
				Y=0 
				Width=512 
				Height=512 
				ToXmin=-180			Contour geometry
				ToXmax=180
				ToYmin=-90
				ToYmax=90
				Undef=8421			Undefine value
				DrawLabel=Yes			Draw label value
				LabelCFormat="%.0f"
				MgraphPlotMode="NewCurve"	Mgraph plot mode "NEWCURVE","CURVEADDMODE"
				Red=       "8  16"		Color and contour values
				Green=     "30  32"
				Blue=      "64"
				Magenta=   "80"
				White=     ""
				Black=     "112"
				Forest=    "116"
				Sienna=    "120"
				Yellow=    "130"
				Coral=     "150"
				Violet=    "160"
				Plum=      "170"
				Cyan=      "180"
				Turquoise= "200"

		send_plot_contour_background_image		Send a view plane as background image
				ViewPlane=3 	
				X=0				Image position and size
				Y=0 
				Width=512 
				Height=512 
				ToXmin=-180			Contour geometry
				ToXmax=180
				ToYmin=-90
				ToYmax=90
				Undef=8421			Undefine value
				NearestPixelInterpolation=Yes 	Interpolation method(No=Triangular)
				AddGraphPlane=Yes
				MgraphPlotMode="NewCurve"	Mgraph plot mode "NEWCURVE","CURVEADDMODE"

PRINT FUNCTIONS
===============
		send_clear_page					Must be use in a command file
								to clean the old Msphinx page addings
								and between to print page settings

		send_draw_page_text 				Draw a text in the print page
				X1=5. 				Page Location (cm)
				Y1=1. 
				ForegroundColor="RED" 
				BoldFont=Yes		
				TextHeight=1.0			(cm)
				Rotation=0.0			(degrees)
				Justification="Left"		Left or Center or Right
			   	Text="THIS IS A SIMPLE TEST"         Text to draw

		send_draw_page_line
                                X1=5.                        	Start position of the line (cm)
                                Y1=2.
                                X2=10.                       	End position (cm)
                                Y2=2.
				Color="red"
				Thickness=0.1			Line thickness in cm
				Style="Solid"

		send_draw_page_box
                                X1=5.                        	Start position of the box (cm)
                                Y1=2.
                                X2=10.                       	End position (cm)
                                Y2=2.
				Color="red"
				Thickness=0.1			Line thickness in cm
				Style="Solid"
				  
		send_draw_page_cell
                                X=0                             Image position and size
                                Y=0
                                Width=512
                                Height=512
				XTo=2			   	Paper image position and size in cm
				YTo=2
				WidthTo=10
				HeightTo=10
				FitPatch=Yes			Image will fit the cell?

		send_to_PS_File  File="./print.ps"  
				   Type=Black&White  		   Color Black&White
			           PaperFormat="A4"		   "A4" "A3" "B5" "USLetter" "USLegal"
				   Resolution=100 		   in dpi
			           Copies=1 
				   Orientation=Portrait		   Portrait Landscape
				   RGBEncoding=Yes		   Postscript encoding


		send_to_EPS_File  File="./print.eps"  
				   Type=Black&White  		   Color Black&White
				   Orientation=Portrait		   Portrait Landscape
				   Resolution=100 		   in dpi
				   RGBEncoding=Yes		   Postscript encoding
			


		send_to_printer    Command="/usr/LOA/bin/vidpsINF"
				   Type=Black&White  		   Color Black&White
				   RGBEncoding=Yes		   Postscript encoding
			           PaperFormat="A4"		   "A4" "A3" "B5" "USLetter" "USLegal"
				   Copies=1 
				   Orientation=Portrait		   Portrait Landscape
				   Resolution=100 		   in dpi

==============================================================================================================
===============  send_create_file  addings ===================================================================
==============================================================================================================
Commands to add maps and grid directly tom the final image without using the Msphinx graphic memory functions
Warning: set_projection_to_geometry must be set
	
		clear_file_addings				Clear all addings


                add_grids_to_file                               Add projected grids
                                LatitudeMin=-90.0000            Where area in the TO space
                                LatitudeMax=90.0000
                                LatitudeStep=5.0000
                                LongitudeMin=-180.0000
                                LongitudeMax=180.0000
                                LongitudeStep=10.0000
                                Color="RED"                     Color drawing
                                lineWidth=1

                add_world_map_to_file                           Add a projected world map
                                Coastlines=yes Rivers=yes Boundaries=yes
                                CoastlineColor="GREEN" RiverColor=Blue BoundaryColor=Magenta
                                lineWidth=1

                                other key words
                                ==============
                                        Rivers=yes           means All rivers
                                        RiversRank1=yes            Permanent major rivers
                                        RiversRank2=yes            Additional major rivers
                                        RiversRank3=yes            Additional rivers
                                        RiversRank4=yes            Minor rivers
                                        RiversRank5=yes            Intermittent major rivers
                                        RiversRank6=yes            Intermittent minor rivers
                                        RiverColor=             All rivers
                                        ColorRank1=
                                        ColorRank2=
                                        ColorRank3=
                                        ColorRank4=
                                        ColorRank5=
                                        ColorRank6=

                add_human_activity_to_file     Color="RED"  		Add villages,towns etc...
						DotSize=1	 	factor (1 2...)
						ResultFile="Cities"     (up to 5000 references on file)
==============================================================================================================
==============================================================================================================
==============================================================================================================

Encapsulate commands
=====================
	User is able to include a command block to other softwares as Mgraph or HDFlook

send_Mgraph <<    		... start block ...
	....   Mgraph style commands ...
>> 		... end of block ...


send_HDFLook <<    		... start block ...
	....   HDFLook style commands ...
>> 		... end of block ...

send_GDAS <<    		... start block ...
	....   GDAS style commands ...
>> 		... end of block ...


send_METLook <<    		... start block ...
	....   METLook style commands ...
>> 		... end of block ...

send_Mpol <<    		... start block ...
	....   Mpol style commands ...
>> 		... end of block ...


send_TMLook <<    		... start block ...
	....   TMLook style commands ...
>> 		... end of block ...
