[GRASS-user] wgs84 to NA albers projection issues

ilona ilona.naujo.lewis at gmail.com
Tue Aug 9 10:57:59 EDT 2011


Hello,
I am trying to avoid using arc for multiple reasons that include my
need to process many many large data layers, but am having some
problems projecting in GRASS. My problem is related to error messages
when i try to project (using r.project) WGS84 latlong data to
NorthAmerica Albers Equal Area Conic. I will briefly explain my
processing steps (as I had to do some workarounds) using the original
input data which is from the ciat website (ipcc 4 worldclim data,
ascii file, global spatial extent, 30arcsecond res, WGS84).

My first issue was importing and correctly defining the GCS as WGS84.
This took quite a bit of trial and error on my part as the problem was
not evident to me. I was receiveing error messages when trying to
import this dataset using r.in.gdal into a location defined as WGS84.
I ended up importing as an xy location (there was no associated .prj
file, but i knew the data were wgs84) and finally realizing that the
original data are slightly outside the boundaries (i had no idea this
could be problem), as you can see below from the ascii file header.
header of ipcc4 data
ncols         43200
nrows         18000
xllcorner     -180.00000101747
yllcorner     -60.00000680564
cellsize      0.0083333337679505
NODATA_value  -9999

My work around to for the above included (i write this here just as
background info):
1) importing using r.in.gdal into an xy location
2) clip to my region of interest using map.calc from an existing layer
that was pre-processed in arcgis
3) export from GRASS as an ascii file
4) import .asc (created in step 3)  into WGS84 latlong location (this
works fine, although I could not seem to do this without step 3 which
makes it ineffiencet -ideas?)

Now onto my current problem:
What I want to do: project WGS latlong data to North America Equal
Area Conic projection
What I am using:
Windows 7, GRASS GIS 6.4.1 Windows Native gui

The command i used:
r.proj input=fromarc3 location=WGS84 mapset=PERMANENT output=testarc3
method=cubic resolution=1019.378

Some specs:
i could visualize both images in the map layers

Input Projection Parameters:  +proj=longlat +no_defs
+a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
Input Unit Factor: 1

Output Projection Parameters:  +proj=aea +lat_1=20 +lat_2=60
+lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +no_defs +a=6378137
+rf=298.257222101 +towgs84=0,0,0,0,0,0,0
Output Unit Factor: 1

The error message:
pj_transform() failed: tolerance condition error
pj_transform() failed: tolerance condition error
......
pj_transform() failed: tolerance condition error

GRASS continues to work and say allocating memory
and then:
pj_transform() failed: tolerance condition error
pj_transform() failed: tolerance condition error
......
pj_transform() failed: tolerance condition error

And finally GRASS crashes. (error something like r.proj.exe has
encountered an error....)

I have tried numerous variations including following r.proj help
suggestions that included 1)using g.region in the target location to
ensure resolutions and extents match by setting it to the input
(latlong) image, and then 2) creating a vector in the source location
(latlong) the size of my desired extent, projecting that into albers
location....neither worked. similar error to above.

In arcgis i can do the reprojection to albers no problem, so in that
software it works. but as i mentioned i would like to use GRASS. So
any hints or help would be great. I have included some further info
below on the data and the projections and regions of each location. If
 you need more detail please let me know as i was not sure how much to
send along.  Thanks in advance for all the great help and to
developers and brainchilds of grass.


More details:
input (source) location
g.region -p
projection: 3 (Latitude-Longitude)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      84:40:13.92654N
south:      57:19:25.62546S
west:       180W
east:       34:03:21.0168W
nsres:      0:00:29.9988
ewres:      0:00:29.9988
rows:       17040
cols:       17514
cells:      298438560

target location
g.region -p
projection: 99 (Albers Equal Area)
zone:       0
datum:      nad83
ellipsoid:  grs80
north:      5576169.25773518
south:      -5111015.83886227
west:       -12419813.93085736
east:       9747121.16264453
nsres:      1019.38049376
ewres:      1019.35689752
rows:       10484
cols:       21746
cells:      227985064


r.info fromarc  (one of the lat long data i want to project)
 +----------------------------------------------------------------------------+
 | Layer:    fromarc                        Date: Sun Aug 07 14:14:07 2011    |
 | Mapset:   PERMANENT                      Login of Creator: ilona           |
 | Location: WGS84                                                            |
 | DataBase: C:\Users\ilona\Documents\ilona_docs\grassdata                    |
 | Title:     ( fromarc )                                                     |
 | Timestamp: none                                                            |
 |----------------------------------------------------------------------------|
 |                                                                            |
 |   Type of Map:  raster               Number of Categories: 302             |
 |   Data Type:    CELL                                                       |
 |   Rows:         17040                                                      |
 |   Columns:      17514                                                      |
 |   Total Cells:  298438560                                                  |
 |        Projection: Latitude-Longitude                                      |
 |            N: 84:40:13.92654N    S: 57:19:25.62546S   Res: 0:00:29.9988    |
 |            E: 34:03:21.0168W    W:       180W   Res: 0:00:29.9988          |
 |   Range of data:    min = -261  max = 302                                  |
 |                                                                            |
 |   Data Description:                                                        |
 |    generated by r.in.gdal                                                  |
 |                                                                            |
 |   Comments:                                                                |
 |    r.in.gdal input="C:/Users/ilona/Documents/processed_climate_data/ipc\   |
 |    c4/ccma2020/outarc.asc" output="fromarc"                                |
 |                                                                            |
 +----------------------------------------------------------------------------+




-- 
Ilona


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/wgs84-to-NA-albers-projection-issues-tp6668457p6668457.html
Sent from the Grass - Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110809/3482442a/attachment.html


More information about the grass-user mailing list