Hello,
<br/>I am trying to avoid using arc for multiple reasons that include my
<br/>need to process many many large data layers, but am having some
<br/>problems projecting in GRASS. My problem is related to error messages
<br/>when i try to project (using r.project) WGS84 latlong data to
<br/>NorthAmerica Albers Equal Area Conic. I will briefly explain my
<br/>processing steps (as I had to do some workarounds) using the original
<br/>input data which is from the ciat website (ipcc 4 worldclim data,
<br/>ascii file, global spatial extent, 30arcsecond res, WGS84).
<br/><br/>My first issue was importing and correctly defining the GCS as WGS84.
<br/>This took quite a bit of trial and error on my part as the problem was
<br/>not evident to me. I was receiveing error messages when trying to
<br/>import this dataset using r.in.gdal into a location defined as WGS84.
<br/>I ended up importing as an xy location (there was no associated .prj
<br/>file, but i knew the data were wgs84) and finally realizing that the
<br/>original data are slightly outside the boundaries (i had no idea this
<br/>could be problem), as you can see below from the ascii file header.
<br/>header of ipcc4 data
<br/>ncols 43200
<br/>nrows 18000
<br/>xllcorner -180.00000101747
<br/>yllcorner -60.00000680564
<br/>cellsize 0.0083333337679505
<br/>NODATA_value -9999
<br/><br/>My work around to for the above included (i write this here just as
<br/>background info):
<br/>1) importing using r.in.gdal into an xy location
<br/>2) clip to my region of interest using map.calc from an existing layer
<br/>that was pre-processed in arcgis
<br/>3) export from GRASS as an ascii file
<br/>4) import .asc (created in step 3) into WGS84 latlong location (this
<br/>works fine, although I could not seem to do this without step 3 which
<br/>makes it ineffiencet -ideas?)
<br/><br/>Now onto my current problem:
<br/>What I want to do: project WGS latlong data to North America Equal
<br/>Area Conic projection
<br/>What I am using:
<br/>Windows 7, GRASS GIS 6.4.1 Windows Native gui
<br/><br/>The command i used:
<br/>r.proj input=fromarc3 location=WGS84 mapset=PERMANENT output=testarc3
<br/>method=cubic resolution=1019.378
<br/><br/>Some specs:
<br/>i could visualize both images in the map layers
<br/><br/>Input Projection Parameters: +proj=longlat +no_defs
<br/>+a=6378137 +rf=298.257223563 +towgs84=0.000,0.000,0.000
<br/>Input Unit Factor: 1
<br/><br/>Output Projection Parameters: +proj=aea +lat_1=20 +lat_2=60
<br/>+lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +no_defs +a=6378137
<br/>+rf=298.257222101 +towgs84=0,0,0,0,0,0,0
<br/>Output Unit Factor: 1
<br/><br/>The error message:
<br/>pj_transform() failed: tolerance condition error
<br/>pj_transform() failed: tolerance condition error
<br/>......
<br/>pj_transform() failed: tolerance condition error
<br/><br/>GRASS continues to work and say allocating memory
<br/>and then:
<br/>pj_transform() failed: tolerance condition error
<br/>pj_transform() failed: tolerance condition error
<br/>......
<br/>pj_transform() failed: tolerance condition error
<br/><br/>And finally GRASS crashes. (error something like r.proj.exe has
<br/>encountered an error....)
<br/><br/>I have tried numerous variations including following r.proj help
<br/>suggestions that included 1)using g.region in the target location to
<br/>ensure resolutions and extents match by setting it to the input
<br/>(latlong) image, and then 2) creating a vector in the source location
<br/>(latlong) the size of my desired extent, projecting that into albers
<br/>location....neither worked. similar error to above.
<br/><br/>In arcgis i can do the reprojection to albers no problem, so in that
<br/>software it works. but as i mentioned i would like to use GRASS. So
<br/>any hints or help would be great. I have included some further info
<br/>below on the data and the projections and regions of each location. If
<br/> you need more detail please let me know as i was not sure how much to
<br/>send along. Thanks in advance for all the great help and to
<br/>developers and brainchilds of grass.
<br/><br/><br/>More details:
<br/>input (source) location
<br/>g.region -p
<br/>projection: 3 (Latitude-Longitude)
<br/>zone: 0
<br/>datum: wgs84
<br/>ellipsoid: wgs84
<br/>north: 84:40:13.92654N
<br/>south: 57:19:25.62546S
<br/>west: 180W
<br/>east: 34:03:21.0168W
<br/>nsres: 0:00:29.9988
<br/>ewres: 0:00:29.9988
<br/>rows: 17040
<br/>cols: 17514
<br/>cells: 298438560
<br/><br/>target location
<br/>g.region -p
<br/>projection: 99 (Albers Equal Area)
<br/>zone: 0
<br/>datum: nad83
<br/>ellipsoid: grs80
<br/>north: 5576169.25773518
<br/>south: -5111015.83886227
<br/>west: -12419813.93085736
<br/>east: 9747121.16264453
<br/>nsres: 1019.38049376
<br/>ewres: 1019.35689752
<br/>rows: 10484
<br/>cols: 21746
<br/>cells: 227985064
<br/><br/><br/>r.info fromarc (one of the lat long data i want to project)
<br/> +----------------------------------------------------------------------------+
<br/> | Layer: fromarc Date: Sun Aug 07 14:14:07 2011 |
<br/> | Mapset: PERMANENT Login of Creator: ilona |
<br/> | Location: WGS84 |
<br/> | DataBase: C:\Users\ilona\Documents\ilona_docs\grassdata |
<br/> | Title: ( fromarc ) |
<br/> | Timestamp: none |
<br/> |----------------------------------------------------------------------------|
<br/> | |
<br/> | Type of Map: raster Number of Categories: 302 |
<br/> | Data Type: CELL |
<br/> | Rows: 17040 |
<br/> | Columns: 17514 |
<br/> | Total Cells: 298438560 |
<br/> | Projection: Latitude-Longitude |
<br/> | N: 84:40:13.92654N S: 57:19:25.62546S Res: 0:00:29.9988 |
<br/> | E: 34:03:21.0168W W: 180W Res: 0:00:29.9988 |
<br/> | Range of data: min = -261 max = 302 |
<br/> | |
<br/> | Data Description: |
<br/> | generated by r.in.gdal |
<br/> | |
<br/> | Comments: |
<br/> | r.in.gdal input="C:/Users/ilona/Documents/processed_climate_data/ipc\ |
<br/> | c4/ccma2020/outarc.asc" output="fromarc" |
<br/> | |
<br/> +----------------------------------------------------------------------------+
<br/><br/><br/><br/><br/>--
<br/>Ilona
<br/>
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/wgs84-to-NA-albers-projection-issues-tp6668457p6668457.html">wgs84 to NA albers projection issues</a><br/>
Sent from the <a href="http://osgeo-org.1803224.n2.nabble.com/Grass-Users-f1837860.html">Grass - Users mailing list archive</a> at Nabble.com.<br/>