Fri, Feb 25 2005
04:55:30
|
|
Request created by hbowman
|
|
Subject: NTv2 grid file out-of-bounds errors
If I pan off the edge of a NTv2 grid file coverage, I get this error:
> g.region -l
pj_transform() failed
cause: failed to load NAD27-83 correction file
ERROR: Error in pj_do_proj (projection of input coordinate pair)
panning back a little, it's ok:
> d.zoom -p
> g.region -l
long: 166.39533 lat: -45.02641 (north/west corner)
long: 167.66148 lat: -45.09204 (north/east corner)
long: 167.53431 lat: -46.43873 (south/east corner)
long: 166.23759 lat: -46.37130 (south/west corner)
rows: 30
cols: 20
Center Longitude: 166:57:25.838015E [166.95718]
Center latitude: 45:43:55.628939S [-45.73212]
proj: nzmg
datum: nzgd49
list: 1 (NTv2)
> g.proj -p
-PROJ_INFO-------------------------------------------------
name : New Zealand Map Grid
datum : nzgd49
nadgrids : nzgd2kgrid0005.gsb
proj : nzmg
ellps : international
a : 6378388.0000000000
es : 0.0067226700
f : 297.0000000000
lat_0 : -41.0000000000
lon_0 : 173.0000000000
x_0 : 2510000.0000000000
y_0 : 6023150.0000000000
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1.0
working region:
> g.region -g
n=5555000
s=5405000
w=1990000
e=2090000
nsres=5000
ewres=5000
failing region:
> g.region -g
n=5555000
s=5405000
w=1935000
e=2035000
nsres=5000
ewres=5000
(also happens with ps.map's geogrid function if you stray too far past the
edge of the coastline)
Everything works fine from the 7 or 3-param transform params.
I am not suggesting that we should revert to the 7 or 3 projection transform
params if the grid is out of bounds as this may have unforseen consequences to
assumed data quality etc. for the ?.proj modules?. Not really sure if there is
an answer to this one.
?,
Hamish
|
|
Wed, Mar 23 2005
04:02:50
|
|
Mail sent by hbowman
|
|
maybe a solution in this email from Frank on the GDAL mailing list, perhaps
the side effects (bad data, even with a warning) outweigh the benefits.
Hamish
From: Frank Warmerdam <fwarmerdam@gmail.com>
Subject: Re: [Gdal-dev] WGS84 to NAD27 failed to load NAD27-83 correction file
Date: Tue, 22 Mar 2005 18:49:16 -0500
To: "Sheykhet, Rostic" <rsheykhet@sanz.com>
Cc: gdal-dev@xserve.flids.com
Reply-To: warmerdam@pobox.com
Sender: gdal-dev-bounces@xserve.flids.com
On Tue, 22 Mar 2005 16:40:43 -0700, Sheykhet, Rostic <rsheykhet@sanz.com> wrote:
>
>
> Hi all,
>
> I am trying to convert a WGS84 query envelope to NAD27. It works fine for
> smaller areas, but on an envelope larger than continental US, I get a
> "failed to load NAD27-83 correction file" error. What am I doing wrong?
Rostic,
The problem is that there is no datum shift file for most parts of the
world, so some of the points cannot be datum shifted when you go
outside valid areas.
If you don't mind hacking the code a bit, you could modify
proj/src/pj_datums.c so that the definition of nad27 is
"nadgrids=@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat,@null"
This basically means if none of the grids are match the point
to shift, apply the "null" grid which does nothing.
> Perhaps on a related note, is there a way to get an envelope/bounding box of
> a coordinate reference system?
No, I'm afraid not.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
_______________________________________________
Gdal-dev mailing list
Gdal-dev@xserve.flids.com
http://xserve.flids.com/mailman/listinfo/gdal-dev
|
|
Sat, Jul 23 2005
14:50:45
|
|
Mail sent by msieczka
|
|
Hamish
How is this bug doing?
Maciek |
|
Sat, Jul 23 2005
14:56:10
|
|
Area changed to grass6.1 by msieczka
|
|
Wed, Aug 31 2005
20:49:07
|
|
Area changed to grass6 by mneteler
|
|
Wed, Sep 28 2005
14:11:41
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Thu, 29 Sep 2005 00:11:31 +1200
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Maciek Sieczka via RT <grass-bugs@intevation.de>
|
Subject |
Re: [bug #3029] (grass) NTv2 grid file out-of-bounds errors
|
Message-Id |
<20050929001131.1fcbcc03.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20050723125045.882AB1006BC@lists.intevation.de>
|
References |
<20050723125045.882AB1006BC@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=-0.6 tagged_above=-999.0 required=3.0 tests=BAYES_01, FORGED_YAHOO_RCVD
|
X-Spam-Level |
|
> How is this bug doing?
It is still there.
Hamish
|
|