Nikos, Thanks very much for the 101 on rasters in Grass, helped me out big time. No worries on the length of the answer, the more the better ;)
Tom -----Original Message----- From: Nikos Alexandris [mailto:nikos.alexand...@felis.uni-freiburg.de] Sent: dinsdag 13 januari 2009 16:50 To: t...@vdputte.nl Cc: grass-user Subject: Re: [GRASS-user] r3.in.ascii - Difficulties understanfing format Tom, my apologies for writing something long, and repeat within the text some times things already mentioned or known. I did so on purpose -- just to practice and see if I understand the concept myself. Ah, please keep in your posts Cc to the grass-user mailing list. Others will definitely benefit from our mistakes or the correct examples we discuss. On Tue, 2009-01-13 at 15:13 +0100, t...@vdputte.nl wrote: > Hi Nikos, > > Thanks for the quick response! > So what I gather from your answer is that the region-definitions are > set seperately (I'm guessing in the mapset?) and that you can only > display data that falls within the boundaries of this region? Correct. Just to make the big picture clear: Location = One coordinate system > Many mapsets with separate region settings for each. In addition, an important and very useful characteristic of GRASS' raster modules (r.*) is that they operate *only* within the defined region. > The my problem transforms a bit,in the sense that I want to display a > 3D array/raster. Ultimately, this needs to be georeferenced, but for > testing purposes I just want to display this raster in Nviz. > So how can I create a general Mapset in which I can display a 3D > raster with a resolution of 1 (e.g North-South, E-W and T-B all 3 - 0 > with a raster of 3x3x3) If you have non-georeferenced spatial data you can create a generic XY location and set the region to match the extent of your imported (in the xy location) raster no-matter how big/small it is. [see [1][2] and search on the mailing list [3] for how to create an xy location -- it's a "standard" question when one starts to explore data with grass] # set region g.region rast=YourRaster -p # or: "g.region rast=YourRaster -pa" ## read "g.region help" for more It should, I think, obtain automatically the required rows & columns parameters which should correspond to the columns & rows of your raster. If not just grab the resolution of your raster somehow (e.g. "gdalinfo YourRaster) and set them manually. I think that "south & north" should match columns & rows. "east & west" are irrelevant and, I think, you can set the latter to 0. Hmmm... talking about 3D I think the correct term is voxels, and hence you can set the vertical resolution to 1 as well. But you can experiment with whatever you think you need... The important, in order to *see* your data is here the (x=)columns, (y=)rows and (z=)levels. Now, the *how* they will appear will be affected by the defined x,y,z resolution. Since the units in an XY location are pixels it's correct to set the resolution to 1. A few more notes concerning "georeferenced" maps/locations While the resolution of the georeferenced map itself is as is (let's say you have the CORINE land cover of some European country, the raster version of 250m pixel size), and refers to the units used by the defined coordinate system, the resolution you define with g.region will affect the output of most raster processing modules. # corine_250m # match region-extent to the "corine_250m" map g.region rast=corine_250 res=500 -pa # produce a 500m corine map r.mapcalc corine_500m=corine_250m # so simple ;-) > I hope you understand my problem. > Thanks, Tom [...] I hope I helped you with my bla-bla. Cheers, Nikos --- [1] http://grass.itc.it/grass62/manuals/html62_user/helptext.html [2] http://n2.nabble.com/Re% 3A-GRASS-user--Help-with-reprojection-td2104056.html#a2107019 [3] http://n2.nabble.com/Grass---Users-f1837860.html Geen virus gevonden in het binnenkomende-bericht. Gecontroleerd door AVG - http://www.avg.com Versie: 8.0.176 / Virusdatabase: 270.10.6/1888 - datum van uitgifte: 12-1-2009 7:04 _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user