Coordinate transformation problems
grassp-list@max.cecer.army.mil
grassp-list at max.cecer.army.mil
Tue, 23 Aug 1994 15:49:23 +0200
Hello GRASS-programmers,
From two days I'm fighting with Display Graphic Library functions.
I try to write a routine for class selection by mouse.
When I want to transform screen coordinates into earth coordinates
I get 'segmentation fault'.
Could somebody show me where is my fault ?
Code looks like this:
*********************
select_class_m(char *map, int *class, char label[], int *button)
{
int x, y, button;
double east, north;
R_open_driver();
D_setup(0);
R_get_location_with_pointer(&x,&y,&button);
east = D_d_to_u_col((double) x); <- segmentation fault !
north = D_d_to_u_row((double) y);
R_close_driver();
...
}
*******************
There are no warnings during compilation and linking.
Thanks in advance,
Robert Szczepanek
Cracow University of Technology, Poland
E-mail: robert@profek.wis.pk.edu.pl