[GRASSLIST:4104] stupit newbie question on import raster

Hi everyone,

I have a seemingly stupid newbie problem: I'm runnig the OS X port of Grass 5.7 and after trying the sample spearfish location everythings seems to be installed ok. In particular I'm able to display the data. In contrast to that I was not able to import or visualize some other data, e.g. some satellite.jpg. Here is what I did according to the manuals:

first I created a location of xy-type:

GRASS 5.7.0:~ > projection: 0 (x,y)
zone: 0
north: 1239
south: 0
west: 0
east: 1501
nsres: 1
ewres: 1
rows: 1239
cols: 1501

The picture dimensions are 1501x1239 pixel and type is jpg. I opened a display by d.mon x0. Next I imported the picture by the
tcltk front-end:

r.in.gdal
input=/Users/kuhli/Desktop/Celestia-doc/EarthImage/
aster_vesuvius_lrg.jpg output=vesuv -o
PROJ_INFO file not found for location campagna
PROJ_UNITS file not found for location campagna 2% 5% 8% 11% 14% 17%
20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62% 65% 68% 71%
74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.red
SETTING GREY COLOR TABLE FOR vesuv.red (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.green
SETTING GREY COLOR TABLE FOR vesuv.green (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.blue
SETTING GREY COLOR TABLE FOR vesuv.blue (8bit, full range)

when I wanted to display the file I used d.rast over tcltk-interface:

d.rast map=vesuv.blue bg=white 0% 3% 6% 9% 12% 15% 18% 21% 24% 27%
30% 33% 36% 39% 42% 45% 48% 51% 54% 57% 60% 63% 66% 69% 72% 75% 78% 81%
84% 87% 90% 93% 96% 99%100%

  The d.rast had shown me three files (vesuv.blue, vesuv.gree,vesuv.red), I choosed one of them but the files doesn't show up in the
display! Shure I forgot or overlooked something very simple but what? If I look at the display with the query-by-mouse function but the display seems to be empty ?! :

285.5266223(E) 860.70299501(N)
vesuv.blue in PERMANENT (Null)no data

751.44009983(E) 798.85607321(N)
vesuv.blue in PERMANENT (Null)no data

675.16222962(E) 524.66805324(N)
vesuv.blue in PERMANENT (Null)no data

What am I doing wrong ?

cheers

Uwe Kuhlmann

The image file will require georeferencing info (a world file ) in oreder to be properly imported into the location. If the image is a composite color image (e.g. infrared satellite orthophotos) grass breaks it down into its rgb components. They can be combined into an imagery group for additional manipulation.
UK wrote:

Hi everyone,

I have a seemingly stupid newbie problem: I'm runnig the OS X port of Grass 5.7 and after trying the sample spearfish location everythings seems to be installed ok. In particular I'm able to display the data. In contrast to that I was not able to import or visualize some other data, e.g. some satellite.jpg. Here is what I did according to the manuals:

first I created a location of xy-type:

GRASS 5.7.0:~ > projection: 0 (x,y)
zone: 0
north: 1239
south: 0
west: 0
east: 1501
nsres: 1
ewres: 1
rows: 1239
cols: 1501

The picture dimensions are 1501x1239 pixel and type is jpg. I opened a display by d.mon x0. Next I imported the picture by the
tcltk front-end:

r.in.gdal
input=/Users/kuhli/Desktop/Celestia-doc/EarthImage/
aster_vesuvius_lrg.jpg output=vesuv -o
PROJ_INFO file not found for location campagna
PROJ_UNITS file not found for location campagna 2% 5% 8% 11% 14% 17%
20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62% 65% 68% 71%
74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.red
SETTING GREY COLOR TABLE FOR vesuv.red (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.green
SETTING GREY COLOR TABLE FOR vesuv.green (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.blue
SETTING GREY COLOR TABLE FOR vesuv.blue (8bit, full range)

when I wanted to display the file I used d.rast over tcltk-interface:

d.rast map=vesuv.blue bg=white 0% 3% 6% 9% 12% 15% 18% 21% 24% 27%
30% 33% 36% 39% 42% 45% 48% 51% 54% 57% 60% 63% 66% 69% 72% 75% 78% 81%
84% 87% 90% 93% 96% 99%100%

The d.rast had shown me three files (vesuv.blue, vesuv.gree,vesuv.red), I choosed one of them but the files doesn't show up in the
display! Shure I forgot or overlooked something very simple but what? If I look at the display with the query-by-mouse function but the display seems to be empty ?! :

285.5266223(E) 860.70299501(N)
vesuv.blue in PERMANENT (Null)no data

751.44009983(E) 798.85607321(N)
vesuv.blue in PERMANENT (Null)no data

675.16222962(E) 524.66805324(N)
vesuv.blue in PERMANENT (Null)no data

What am I doing wrong ?

cheers

Uwe Kuhlmann

Hello,

first I created a location of xy-type:

The easiest in that case is always to let GDAL do the nasty job of creating
the location.
The pb I guess is that in GIMP, the pixels are numbered from bottomleft to
topright, and that in GRASS, from topleft to bottom right (or is it the other
way round?). Anyway

zone: 0
north: 0
south: -1239
west: -1501
east: 0
nsres: 1
ewres: 1
rows: 1239
cols: 1501

would give you the proper option.

You don't need georeferencing in that case, as you're working in a XY
location.

--
Soil & Water Laboratory
Dept. of Biological & Environmental Engineering
Cornell University
ITHACA, NY 14853
Tel: (607)255.2463

It sounds like you forgot to set your region after you imported the raster (something I always used to screw up). Try

g.region rast=vesuv.blue
d.rast vesuv.blue

Good luck,
Ian

On Aug 5, 2004, at 3:36 AM, UK wrote:

Hi everyone,

I have a seemingly stupid newbie problem: I'm runnig the OS X port of Grass 5.7 and after trying the sample spearfish location everythings seems to be installed ok. In particular I'm able to display the data. In contrast to that I was not able to import or visualize some other data, e.g. some satellite.jpg. Here is what I did according to the manuals:

first I created a location of xy-type:

GRASS 5.7.0:~ > projection: 0 (x,y)
zone: 0
north: 1239
south: 0
west: 0
east: 1501
nsres: 1
ewres: 1
rows: 1239
cols: 1501

The picture dimensions are 1501x1239 pixel and type is jpg. I opened a display by d.mon x0. Next I imported the picture by the
tcltk front-end:

r.in.gdal
input=/Users/kuhli/Desktop/Celestia-doc/EarthImage/
aster_vesuvius_lrg.jpg output=vesuv -o
PROJ_INFO file not found for location campagna
PROJ_UNITS file not found for location campagna 2% 5% 8% 11% 14% 17%
20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62% 65% 68% 71%
74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.red
SETTING GREY COLOR TABLE FOR vesuv.red (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.green
SETTING GREY COLOR TABLE FOR vesuv.green (8bit, full range) 2% 5% 8%
11% 14% 17% 20% 23% 26% 29% 32% 35% 38% 41% 44% 47% 50% 53% 56% 59% 62%
65% 68% 71% 74% 77% 80% 83% 86% 89% 92% 95% 98%100%
CREATING SUPPORT FILES FOR vesuv.blue
SETTING GREY COLOR TABLE FOR vesuv.blue (8bit, full range)

when I wanted to display the file I used d.rast over tcltk-interface:

d.rast map=vesuv.blue bg=white 0% 3% 6% 9% 12% 15% 18% 21% 24% 27%
30% 33% 36% 39% 42% 45% 48% 51% 54% 57% 60% 63% 66% 69% 72% 75% 78% 81%
84% 87% 90% 93% 96% 99%100%

The d.rast had shown me three files (vesuv.blue, vesuv.gree,vesuv.red), I choosed one of them but the files doesn't show up in the
display! Shure I forgot or overlooked something very simple but what? If I look at the display with the query-by-mouse function but the display seems to be empty ?! :

285.5266223(E) 860.70299501(N)
vesuv.blue in PERMANENT (Null)no data

751.44009983(E) 798.85607321(N)
vesuv.blue in PERMANENT (Null)no data

675.16222962(E) 524.66805324(N)
vesuv.blue in PERMANENT (Null)no data

What am I doing wrong ?

cheers

Uwe Kuhlmann