I can't plot raster map:(

liu ji kai blue_seagull at linuxmail.org
Thu Dec 2 23:51:32 EST 1999


here is part of my program: ---------------------------------------------- 
char *name="eco"; 
struct Colors colors; 
CELL *raster; 
int row,fd,top,bottom,left,right; 
/*perform plotting setup*/ 
D_setup(0); 
/*region has been already asigned*/ 
D_get_screen_window(&top,&bottom,&left,&right); 
D_cell_draw_setup(&top,&bottom,&left,&right); 
raster=G_malloc_cell_buf(); 
/*open raster map,read and set the colors*/ 
fd=G_open_cell_old(name,G_mapset()); 
G_read_colors(name,G_mapset(),&colors); 
D_set_colors(&colors); 
/*plot*/ D_set_overlay_mode(1); 
for(row=0;row>=0;) 
{ G_get_map_row(fd,raster,row); 
row=D_draw_cell(row,raster,&colors); 
} 
G_close_cell(fd); 
G_free_colors(&colors); 
} 
------------------------------------------------- 
In fact,in the for circle,when execute line "row= 
......",row can't get the right value but -1,what is 
wrong?send me e_mail. 
-- 


Get your free email from http://www.linuxmail.org

powered by OutBlaze



More information about the grass-user mailing list