Hi, 2007/12/18, Hamish <[EMAIL PROTECTED]>:
> Martin Landa wrote: > > it should be fixed now in trunk (since I don't know g.setproj, please > > take a look), I left the ticket open since I am not sure if we can > > uncomment ch1903 item in lib/gis/datumtransform.table. > > > > See diff (sorry, I didn't split the patch, next time...:-) > > > > http://trac.osgeo.org/grass/changeset/29468 > > > > @@ -455,5 +455,7 @@ > > /* don't ask, use the default */ > > > > - if (G_strcasecmp(desc->type, "float") == 0) { > > + if (G_strcasecmp(desc->type, "float") == 0 || > > + G_strcasecmp(desc->type, "lat") == 0 || > > + G_strcasecmp(desc->type, "lon") == 0) { > > sprintf(tmp_buff, "%.10f", parm->deflt); > > G_set_key_value(desc->key, tmp_buff, out_proj_keys); > Hamish: > would you explain the logic of the fix? it is not obvious to me, but > superficially lat,lon seems outside the set of float,int. I am trying > to understand if this is a proper fix or a hack which works around a > corner case. ie it may be a fix, but is it the right one? Since desc->type has been checked only for 'int' and 'float', a key with type 'lat' or 'lon' was simply ignored. lat,lon type is checked in interactive mode (parm->ask), but it wasn't checked for parm->def_exists. 408 else if (G_strcasecmp(desc->type, "lon") == 0) { 409 double val; 410 while (!get_LL_stuff(parm, desc, 0, &val)) ; 411 sprintf(tmp_buff, "%.10f", val); 412 G_set_key_value(desc->key, tmp_buff, out_proj_keys); 413 } 414 else if (G_strcasecmp(desc->type, "float") == 0) { 415 double val; 416 while (!get_double(parm, desc, &val)) ; 417 sprintf(tmp_buff, "%.10f", val); 418 G_set_key_value(desc->key, tmp_buff, out_proj_keys); 419 } Martin -- Martin Landa <[EMAIL PROTECTED]> * http://gama.fsv.cvut.cz/~landa * _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev