[GRASS5] Re: proj bugs

H Bowman hamish_nospam at yahoo.com
Thu Jul 17 00:00:18 EDT 2003


> I think the changes I made in the last few days may have fixed the
> biggest bugs in g.setproj. But you also need to check the generated
> DEFAULT_WIND file. It should have proj: 3 for lat/long and proj: 99 for
> nzmg or most projected systems (this determines the return value from
> G_projection() ).

[running 5.0 CVS from 2 weeks ago]

No, the DEFAULT_WIND file didn't update at all. starting with a ll 
'proj: 3' location, running g.setproj to set a projection of nzmg, the
DEFAULT_WIND file is not touched (the file's time stamp is unchanged).
DEFAULT_WIND would need to translate n,s,e,w,e-w res,n-s res between 
the DD:MM:SSh format and the UTM style ... slightly ugly.
I guess that has to be done if there is any change at all, even just 
transform params. Maybe do it and dump the user into the set bounds/res 
curses screen so they are forced to double check that the resolution 
isn't now 23.456789m or something ... ?? more ugly.

Both PROJ_UNITS and PROJ_INFO are backed up to *~ and updated correctly.

While I can't imagine actually wanting to change type, someone undoubtedly
will try it, get stuck, and start filing bug reports....
Maybe just remove the ability to switch between proj types 1,2,3,4 with an 
error message telling you to create a new location and use *.proj if you 
want to do something that radical.

-=-

Another issue: can it list the transformation parameters without the user 
having to type 'list' first[*], as there is no way to know which number 
you want beforehand. Even if you remember what it was, it might change 
without warning between versions. And if there is only one option just 
use that with notification? (e.g. datum=wgs84, transform==1).  Maybe not 
if you want to parse the answer to the transform params question for 
1, 3, or 7 inputs. [1 use the list, 3 or 7 prepend towgs84=]
 ... but maybe that is introducing too much complication.


Hamish

[*] e.g.
-----------------------------------------------------------------
GRASS:~> g.setproj
[...]
Do you want to specify a map datum for this location?(y/n) [y] 

Please specify datum name
Enter 'list' for the list of available datums
or 'custom' if you wish to enter custom parameters
Hit RETURN to cancel request
>nzgd49

Now select Datum Transformation Parameters
Enter 'list' to see the list of available Parameter sets
Enter the corresponding number, or <RETURN> to cancel request
>list
Number	Details	
---
1	Used in New Zealand
	(PROJ.4 Params nadgrids=nzgd2kgrid0005.gsb)
	LINZ NZGD49 NTv2 Distortion Model, accuracy approx. 10cm
---
2	Used in New Zealand
	(PROJ.4 Params towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993)
	Accuracy approx. 4m
---
3	Used in Default nzgd49 region
	(PROJ.4 Params towgs84=54.400,-20.100,183.100)
	Default 3-Parameter Transformation
---

Now select Datum Transformation Parameters
Enter 'list' to see the list of available Parameter sets
Enter the corresponding number, or <RETURN> to cancel request
>




More information about the grass-dev mailing list