[GRASS-user] (no subject)

Yamil Ortega jiuman at gmail.com
Mon Aug 27 22:15:30 EDT 2007


Hi all. 
I wonder if anyone can help me with this task.
I have a fedora core 7 running the grass 6.2.2 I want to create this image
from a sh file that insert the epicenter points dynamically. 
http://grass.itc.it/spearfish/php_grass_earthquakes.php
here is the code that I am using.
http://grass.itc.it/spearfish/grass_earthquakes.sh

I've been able to configure the sh file in order to work perfectly with the
grass, but when I run the sh file I got an error that says that BMNG_May.rgb
is not available

Step 1
Ok, reading and reading, I realized that I didn't imported the map world
image into the location, and the sh file on this line is saying that is a
raster map.

d.rast BMNG_May.rgb || error_routine "d.rast"
 
Asking on this list, I downloaded this image
http://earthobservatory.nasa.gov/Newsroom/BlueMarble/images_bmng/8km/world.2
00408.3x5400x2700.jpg

(I changed the longname.jpg to "worldmap.jpg")and in the end is a raster
map, and tried to import it. 
And here comes the problem with projections. With my short knowledge in map
projections I have set up this projection 

Projection: 3 (Latitude-Longitud)
Zone: 	0
Datum:	wgs84
Ellipsoid:  wgs84
North :     90N
South:	90S
West:		180W
East:		180E
Nsres:	1
Ewres:	1
Rows: 	180
Cols		360
Cells:	64800

And when I tried to import the map with this instruccion r.in.gdal
input=/home/yamil/Desktop/mapa.jpg output=rimportmap I get this error

Projection of dataset does not appear to match current location.

LOCATION PROJ_INFO is:
name: Latitude-Longitude
datum: wgs84
towgs84: 0.000,0.000,0.000
proj: ll
ellps: wgs84

Import dataset PROJ_INFO is:
cellhd.proj = 0 (unreferenced/unknown)

You can use the -o flag to r.in.gdal to override this check and use the
location definition for the dataset.
Consider generating a new location from the input dataset using the
'location' parameter.


I tried to use the -o option and I get this error r.in.gdal -o
input=/home/yamil/Desktop/mapa.jpg output=rimportmap

Over-riding projection check
Proceding with import
G_set_windows(): Illegal latitude for North 

I tried the newlocation option with this instruction and works fine

r.in.gdal input=/home/yamil/Desktop/mapa.jpg output=rimportmap
location=newmapworld


Step 2
Now, I changed the Location and work with the newmapworld location create a
new mapset, and create the final raster image based on the 3 RGB files
imported with this instruction

r.composite red=rimportmap.red at PERMANENT green=rimportmap.green at PERMANENT
blue=rimportmap.blue at PERMANENT levels=32 output=finalrworldmap

Works fine. 

Step 3
And now, I configure the sh file changing the mapset and location values,
and the name of the final raster file (BMNG_May.rgb  is now finalrworldmap)
and get this image
http://bp0.blogger.com/_tQPwsJ_Kz78/Rsk73f7UIgI/AAAAAAAAAG4/pww5oWwlFGk/s160
0-h/grass6_recent_earthquakes_19_Aug_2007.png

The red points are now on the left bottom corner, and I realize that the
problem is because the projection in step 2, is in X,Y format. I tried to
change the projection but I wasn't able to do that. 

Does anyone know a better way to solve this? Or Did I do wrong in a specific
step?
Thank you very much. I hope you don't get bored with this silly questions.




More information about the grass-user mailing list