Sat, Jan 21 2006
08:53:44
|
|
Request created by guest
|
|
Subject: d.grid -g fails for Washington State Plane South Projection
Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 20060117
Problem: d.grid -g fails to draw a geographic grid in the Washington State Plane
South projection:
# Washington State Plane South:
GRASS 6.1.cvs (WASPS_NAD83):~/ecology_data_nad83_harn > g.proj -p
-PROJ_INFO-------------------------------------------------
name : State Plane
datum : nad83
nadgrids : WO
proj : lcc
a : 0.6378137e+07
es : 0.66943800229e-02
x_0 : 0.5e+06
y_0 : 0
lon_0 : 120d30'w
lat_0 : 45d20'n
lat_1 : 47d20'n
lat_2 : 45d50'n
-PROJ_UNITS------------------------------------------------
unit : USfoot
units : USfeet
meters : 0.30480060960121920243
GRASS 6.1.cvs (WASPS_NAD83):~/ecology_data_nad83_harn > d.grid -g size=1 color=red
origin=0,0 bordercolor=blue
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj
d.grid -g works perfectly from Washington State Plane North (same projection
with the standard parallels shifted north):
# Washington State Plane North
GRASS 6.1.cvs (WASPN_NAD83):~ > g.proj -p
-PROJ_INFO-------------------------------------------------
name : State Plane
datum : nad83
nadgrids : WO
proj : lcc
a : 0.6378137e+07
es : 0.66943800229e-02
x_0 : 0.5e+06
y_0 : 0
lon_0 : 120d50'w
lat_0 : 47dn
lat_1 : 48d44'n
lat_2 : 47d30'n
-PROJ_UNITS------------------------------------------------
unit : USfoot
units : USfeet
meters : 0.30480060960121920243
GRASS 6.1.cvs (WASPN_NAD83):~ > d.grid -g size=1 color=red origin=0,0
bordercolor=blue
(draws grid on screen)
To reproduce the error you need to create a washington state plane south location.
Select Projection: D (other projection)
projection: stp
datum: nad83
transformation: 5 (Washington - Oregon)
state FIPS code: 53 (WA)
county FIPS code: 67 (Thurston)
state plane: 83 (1983)
units: 1 (US Survey Foot)
north: 1383333.33333333
south: -90000
west: 478678.67867868
east: 2681081.08108108
nsres: 303.03030303
ewres: 300.3003003
rows: 4862
cols: 7334
Now try to add the geographic grid. |
|
Sat, Jan 21 2006
09:17:21
|
|
Mail sent by guest
|
|
This problem goes away if the location is defined using EPSG 2926 instead of
the old text-based interface to state plane (see my original post)
# NAD83(HARN) / Washington North (ftUS)
<2926> +proj=lcc +lat_1=48.73333333333333 +lat_2=47.5 +lat_0=47
+lon_0=-120.8333333333333 +x_0=500000.0001016001 +y_0=0 +ellps=GRS80
+to_meter=0.3048006096012192 +no_defs <>
This makes me wonder whether the old text-based projection definition dialogs
should be changed to work with proj.4 directly istead of maintaining a bunch
of different projection definitions.
David |
|
Sat, Jan 21 2006
15:43:30
|
|
Mail sent by msieczka
|
|
David wrote:
> This problem goes away if the location is defined using EPSG 2926 instead of
> the old text-based interface to state plane (see my original post)
David,
I set up a location from EPSG 2926 just being curious. I can see it is pretty
much different than the one you set up manualy in you original example. Now it's:
GRASS 6.1.cvs (std):~ > g.proj -p
-PROJ_INFO-------------------------------------------------
name : Lambert Conformal Conic
proj : lcc
a : 6378137
es : 0.006694380022900787
lat_1 : 48.73333333333333
lat_2 : 47.5
lat_0 : 47
lon_0 : -120.8333333333333
x_0 : 500000.0001016001
y_0 : 0
no_defs : defined
-PROJ_UNITS------------------------------------------------
unit : US survey foot
units : US survey foots
meters : 0.3048006096012192
Differences from you original example:
1. no datum
2. no nadgrids
3. lon_0 has no w suffix
4. lat_0-2 has no n suffix
5. unit and units names are different in both cases
6. ellps shape and x,y shifting are expressed in plain numbers instead of
exponents
Try playing with those differences until you find the reason for d.grid not
working. My first shot would be at unit names, datum next and the others last.
Please Cc grass5@grass.itc.it when you reply from the bugtracker - it won't
done automatically.
Maciek |
|
Sat, Jan 21 2006
19:58:59
|
|
Mail sent by guest
|
|
I think I found the problem. The presence of nadgrids prevents d.grid -g from
working. If you remove the nadgrids or create a state plane projection that
does not include the nadgrids then it works.
nadgrids are an empirical projection that is not mathematically defined (the
grids are used to look up the coordinate transformation values). That may be
the root of the problem.
There are also some problems with g.proj and nadgrids which I will file as a
seperate bug.
David |
|
Sat, Jan 21 2006
20:31:18
|
|
Mail sent by guest
|
|
OK, I understand exactly what is happening now. The bug is in the user not grass.
The HARN grids only cover Washington and Oregon. The part of the map I am
drawing includes some of Canada. That is outside the transformation grid and
therefore it cannot be projected. Hence the failure:
GRASS 6.1.cvs (WASPN_NAD83):~ > d.grid size=00:30:00 origin=0,0
color=170:170:170 bordercolor=0:0:0 -g
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj
The reason it worked in the one instance I mentioned above is because I failed
to assign a transformation grid. In that case there are no problems drawing
Canada and Washington together since I am just using a simple mathematical
projection.
The error message in this case could be a bit more clear. Something like:
pj_transform() failed
cause: current region extends beyond the HPGN transformation grid boundary.
David |
|
Sat, Jan 21 2006
20:47:56
|
|
Mail sent by guest
|
|
Good you sorted it out.
I'm changing the subject and make it a wish.
Maciek |
|
Sat, Jan 21 2006
20:51:57
|
|
Subject changed to d.grid, pj_transform() failed: be more informative when error due to outside the transformation grid by msieczka
|
|
Sat, Jan 21 2006
20:52:38
|
|
Area changed to wish6 by msieczka
|
|
Sun, Jan 22 2006
02:22:17
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Sun, 22 Jan 2006 14:22:00 +1300
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #4028] (grass) d.grid -g fails for Washington State Plane South Projection
|
Message-Id |
<20060122142200.40c013a8.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20060121075345.06C921005A8@lists.intevation.de>
|
References |
<20060121075345.06C921005A8@lists.intevation.de>
|
X-Mailer |
Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
|
X-Face |
M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=US-ASCII
|
Content-Transfer-Encoding |
7bit
|
X-Spam-Status |
No, hits=-4.0 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD
|
X-Spam-Level |
|
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4028
> ---------------------------------------------------------------------
>
> Subject: d.grid -g fails for Washington State Plane South Projection
..
> Problem: d.grid -g fails to draw a geographic grid in the Washington
> State Plane South projection:
..
> nadgrids : WO
..
> d.grid -g size=1 color=red origin=0,0 bordercolor=blue
> pj_transform() failed
> cause: failed to load NAD27-83 correction file
> ERROR: Error in pj_do_proj
Note that it will fail if you extend the region beyond the edge of the
grid file. I am not sure where the "WO" grid covers, but try zooming
to an inland county within that region or switching to a 3 or 7 param
datum shift & see if you still get the same problem.
Hamish
|
|
Fri, Jan 27 2006
16:21:16
|
|
Mail sent by guest
|
|
It should be a wish for PROJ.4, not for GRASS. The same error message is
reported for many separate errors relating to the gridshift datum
transformations. I know it has been mentioned on the PROJ mailing list
before, but in a quick search I could find no related wish in the PROJ
bugzilla. I may have missed it though. |
|