[GRASS5] proj bugs

H Bowman hamish_nospam at yahoo.com
Thu Jul 3 05:17:22 EDT 2003


I just downloaded and compiled the 5.0 CVS snapshot of June 28 and
PROJ.4 from remotesensing.org's CVS.


troubles:  (all with a lat-lon location)


d.where:

* program goes into interactive mode automatically
   - should it use the current ellipsoid by default and ask no
     questions? What is output if neither -l or -w are used??
* if you choose to display WGS84 as well, the column headings
     need to be identified.

-=-=-

Testing out the new New Zealand transforms:

g.setproj Segfaults if a datum is already set. If you say "n" to the 
"specify a map datum for this location?" question it works, and you can
run it again to set a new datum, but if you try and just change the
transform params it segfaults.
[see output #1 below]

=-=

[s|v|r?].proj fails when using the NTv2 distortion grid. Didn't try a 
raster, but I got the same error with both site and vector.
 (current location nzgd49/NTv2 lat-lon, importing from a WGS84 location)
[see output #2 below]
cs2cs with same (cut-and-paste) parameters works correctly.

=-=

Using the 3 and 7 param transform, s.proj runs to completion, but no
transform is actually done. (happens both ways)
[see output #3 below]
cs2cs with same (cut-and-paste) parameters works correctly.


regards,
Hamish


(sorry about the line wrap)
--------------------------------------------------------------
OUTPUT #1

GRASS:~/grass_data/nz_gd49/PERMANENT > g.setproj 


WARNING!  A projection file already exists for this location
(Filename '/home/hamish/grass_data/nz_gd49/PERMANENT/PROJ_INFO')

This file contains all the parameters for the
location's projection: Latitude-Longitude

    Overriding this information implies that the old projection
parameters    were incorrect.  If you change the parameters, all
existing data will be    interpreted differently by the projection
software.    GRASS will not re-project your data automatically

Would you still like to change some of the parameters (y/n) [n] y


Please specify projection name
Enter 'list' for the list of available projections
Hit RETURN to cancel request
>ll
Do you want to specify a map datum for this location?(y/n) [y] y
The current datum is nzgd49
Would you want to change the datum (or the datum transformation
parameters)?(y/n) [n] n
The datum information is not changed
Segmentation fault



--------------------------------------------------------------
OUTPUT #2:

GRASS:~ > v.proj -s in=coastlines mapset=PERMANENT loc=global

Input Projection Parameters: +proj=latlong +a=6378137.000000 +rf=298.257224 +towgs84=0.000,0.000,0.000

Output Projection Parameters: +proj=latlong +a=6378388.000000 +rf=297.000000 +nadgrids=nzgd2kgrid0005.gsb

Creating dig file...
pj_transform() failed
cause: failed to load NAD27-83 correction file
Error in pj_do_proj


===> cs2cs works ok:
echo "170.5 -45" | cs2cs +proj=latlong +a=6378388.000000 +rf=297.000000 +nadgrids=/usr/local/grass5/etc/nad/nzgd2kgrid0005.gsb  +to +proj=latlong +a=6378137.000000 +rf=298.257224 +towgs84=0.000,0.000,0.000

170d30'0.327"E	44d59'54.104"S 0.000


--------------------------------------------------------------
OUTPUT #3:

GRASS:~ > s.proj in=test_pts49 mapset=hamish loc=nz_gd49 out=test_pts84

Input Projection Parameters: +proj=latlong +a=6378388.000000
+rf=297.000000 +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993

Output Projection Parameters: +proj=latlong +a=6378137.000000
+rf=298.257224 +towgs84=0.000,0.000,0.000


===> looks ok, but nothing actually happens:
      (it should change by about 150m)

GRASS:~/grass_data > cat nz_gd49/hamish/site_lists/test_pts49 
name|tests
desc|s.in.ascii sites=tests fs=space
175E|36:30S|#1 @site1 
174:45E|41:15S|#2 @site2 
170:30E|45S|#3 @site3 

GRASS:~/grass_data > cat nz_wgs84/hamish/site_lists/test_pts84 
name|tests
desc|s.in.ascii sites=tests fs=space
175E|36:30S|#1 @site1 
174:45E|41:15S|#2 @site2 
170:30E|45S|#3 @site3 


===> but cs2cs works ok

GRASS:~ > echo "170.5 -45" | cs2cs +proj=latlong +a=6378388.000000 +rf=297.000000 +towgs84=59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993  +to +proj=latlong +a=6378137.000000 +rf=298.257224 +towgs84=0.000,0.000,0.000

170d30'0.326"E	44d59'54.134"S 1.512




More information about the grass-dev mailing list