[GRASS-user] Help with viewer
Ciao a tutti, Hi all, Does someone know a good GeoTIFF (and other image format) free and multi-platform viewer software? Thank you -- G. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Problems with a GeoTIFF referenced in Gauss Boaga system
Thank you to all, I solved the problem by avoiding the location option. On 08/05/2010 04:14 PM, Giacomo Piva wrote: Hi all, I'm fighting with r.in.gdal function and a GeoTiff gereferenced in the Gauss Boaga system. I have this GeoTiff that is originlly georeferenced in the WGS84 system and I need to convert it into Gauss Boaga system using the gdalwarp GDAL command tool. Moreover I need to convert this raster in a shapefile using the r.to.vect GRASS command. This is the (correct) gdalinfo output of mu Gauss Boaga GeoTiff: Coordinate System is: PROJCS[Monte Mario / Italy zone 1, GEOGCS[Monte Mario, DATUM[Monte_Mario, SPHEROID[International 1924,6378388,297.0005, AUTHORITY[EPSG,7022]], AUTHORITY[EPSG,6265]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4265]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,9], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,150], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,3003]] When I run the command r.in.gdal -o -e input=inputfile.tif output=inputraster location=location I get this error about the region ERROR: region for current mapset is not set run g.region The g.region -p command return: projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 How should I do? The same image georeferenced in the WGS84 system is properly loaded, so I'm wondering about to convert the GeoTiff AFTER loading int GRASS, but I don't know how. Does someone can help me? Thank you -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Reprojection command
Hi Hamish, Thank you for reply. This command assume that I set up the computational region, I have many problems with setting region and I recive many errors like ERROR: region for current mapset is not set run g.region How can I set a region from scratch? I'm using this sequence of functions: g.region -p r.in.gdal -o -e --overwrite input=input raster output=output location=$LOCATION And the output is: projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 ERROR: region for current mapset is not set run g.region Thank you On 08/05/2010 10:34 AM, Hamish wrote: Giacomo wrote: Which is the command to use for reproject an image? I usually use gdalwarp to reproject the image BEFORE grass command, but now I want to reproject an image between two grass command. r.proj. You pull a map in from another mapset into the current computational region (see the help page). Hamish -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Problems with a GeoTIFF referenced in Gauss Boaga system
Hi all, I'm fighting with r.in.gdal function and a GeoTiff gereferenced in the Gauss Boaga system. I have this GeoTiff that is originlly georeferenced in the WGS84 system and I need to convert it into Gauss Boaga system using the gdalwarp GDAL command tool. Moreover I need to convert this raster in a shapefile using the r.to.vect GRASS command. This is the (correct) gdalinfo output of mu Gauss Boaga GeoTiff: Coordinate System is: PROJCS[Monte Mario / Italy zone 1, GEOGCS[Monte Mario, DATUM[Monte_Mario, SPHEROID[International 1924,6378388,297.0005, AUTHORITY[EPSG,7022]], AUTHORITY[EPSG,6265]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4265]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,9], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,150], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,3003]] When I run the command r.in.gdal -o -e input=inputfile.tif output=inputraster location=location I get this error about the region ERROR: region for current mapset is not set run g.region The g.region -p command return: projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 How should I do? The same image georeferenced in the WGS84 system is properly loaded, so I'm wondering about to convert the GeoTiff AFTER loading int GRASS, but I don't know how. Does someone can help me? Thank you -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Problems with a GeoTIFF referenced in Gauss Boaga system
No... it don't work. On 08/05/2010 04:39 PM, Paul Kelly wrote: On Thu, 5 Aug 2010, Giacomo Piva wrote: [...] When I run the command r.in.gdal -o -e input=inputfile.tif output=inputraster location=location I get this error about the region ERROR: region for current mapset is not set run g.region Just a suggestion to try - does it work without the -e flag? The location option automatically sets the extents of the new location to the same as your data, so as far as I can see you should not need the -e flag. Although that may not be related to the error; I'm not sure... However if that turns out to be the problem, a check should be added to warn that -e and location= are incompatible. Also I think the message to just run g.region is confusing; I guess it refers to the old interactive g.region? Paul -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Problems with a GeoTIFF referenced in Gauss Boaga system
On 08/05/2010 04:44 PM, Daniel Victoria wrote: You need to create a Location in Grass were the coordinate system is the Gauss Boaga. Your current location has no reference system, it's a XY location, as g.region -p output shows. When you start Grass ask for it to create a new location based on a georeferenced file. Then point to your GeoTiff and the location should be set correctly. After that, r.in.gdal should work. This is the point. I'm using GRASS without UI, only running command by a bash script. Actually I'm using a location (I don't remember how I made it) by setting up the grassrc file with the information about it: [...] echo LOCATION_NAME: start .grassrc6 echo MAPSET: PERMANENT .grassrc6 echo DIGITIZER: none .grassrc6 echo GISDBASE: $GISDBASE .grassrc6 export GISRC=.grassrc6 [...] then I read the input data ant then I change the location jumping into the region just created with the r.in.gdal command. How can I set the region by scratch or convert the location to a georeferenced location? I also tied to use the g.proj command in order to get the georefernce of the input image and try to set the region but the result is the same: g.proj georef=input file location=location Trying to open with OGR... Trying to open with GDAL... ...succeeded. g.proj -d XY location (unprojected) g.region -p projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 Daniel On Thu, Aug 5, 2010 at 11:14 AM, Giacomo Pivap...@meeo.it wrote: Hi all, I'm fighting with r.in.gdal function and a GeoTiff gereferenced in the Gauss Boaga system. I have this GeoTiff that is originlly georeferenced in the WGS84 system and I need to convert it into Gauss Boaga system using the gdalwarp GDAL command tool. Moreover I need to convert this raster in a shapefile using the r.to.vect GRASS command. This is the (correct) gdalinfo output of mu Gauss Boaga GeoTiff: Coordinate System is: PROJCS[Monte Mario / Italy zone 1, GEOGCS[Monte Mario, DATUM[Monte_Mario, SPHEROID[International 1924,6378388,297.0005, AUTHORITY[EPSG,7022]], AUTHORITY[EPSG,6265]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4265]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,0], PARAMETER[central_meridian,9], PARAMETER[scale_factor,0.9996], PARAMETER[false_easting,150], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,3003]] When I run the command r.in.gdal -o -e input=inputfile.tif output=inputraster location=location I get this error about the region ERROR: region for current mapset is not set run g.region The g.region -p command return: projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 How should I do? The same image georeferenced in the WGS84 system is properly loaded, so I'm wondering about to convert the GeoTiff AFTER loading int GRASS, but I don't know how. Does someone can help me? Thank you -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] g.region (was v.to.rast conversion)
Hi Markus, I'm not using the GUI because I need to use GRASS as automated tool to convert a shape file to a raster in GTIFF. I tried to do what you have explained in many ways but without success. I know that I have to execute something like: v.in.ogr ... v.to.rast ... r.out.gdal ... But the v.in.ogr returns the g.region error also with the location= option. I tried to do another operation (maybe simpler), like reading a raster image and get information on the region, diong: r.in.gdal -o -e input=$HOME/raster.tif output=grass_rast location=$LOCATION Then setting the new location (as you suggested) and running the g.region g.region -p and this is the output: Location test created 100% r.in.gdal complete. Raster map grass_rast.1 created. Copying 144 GCPS in points file for grass_rast GCPs have the following OpenGIS WKT Coordinate System:: GEOGCS[WGS 84,DATUM[WGS_1984,SPHEROID[WGS 84,6378137,298.2572235629972,AUTHORITY[EPSG,7030]],AUTHORITY[EPSG,6326]],PRIMEM[Greenwich,0],UNIT[degree,0.0174532925199433],AUTHORITY[EPSG,4326]] projection: 0 (x,y) zone: 0 north: 2030 south: 0 west: 0 east: 1354 nsres: 1 ewres: 1 rows: 2030 cols: 1354 cells: 2748620 It seems to work properly... Why I can't run the v.in.ogr? Thank you for help. Markus Metz wrote: Hi, According to the grass book, the v.in.ogr command should include the location option: v.in.ogr -o -e dsn=./test_data/test_data.shp output=grass_map location=$LOCATION then go to the newly created location (set the environment variables accordingly and update .grassrc6), set the region extends and resolution to your demands, run v.to.rast, then r.out.gdal. IMHO, it is easier to use the GUI. Hope that helps, Markus M -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] g.region (was v.to.rast conversion)
Giacomo Piva wrote: Hamish wrote: Giacomo Piva: First of all, thanks for your reply. To clarify my problem, i want to specify that the main problem is that all command that involves the g.region always returns the reported error (ERROR: default region is not set.) also the help. I found a similar discussion here: http://lists.osgeo.org/pipermail/grass-user/2009-November/052988.html Where the solution was to use of the SVN version of the grass. I already tried to use that version, bunt nothing changed. Any me any suggestions? maybe the rc5 bug is now gone, but the corrupted WIND file still remains in your mapset. try 'g.region -d' to reset it. does it work from a newly created mapset? Hamish Hi Hamish, Maybe it could be usefull to do a backward step. I should convert a shapefile into a raster file (GeoTIFF format) at a given resolution and I want to use the GRASS modules as a command line tools. I followed the instructions in the chapter Automated usage of grass in the Markus's book and I created a bash script in order to prepare the grass enviroment: #!/bin/bash LOCATION=test GISBASE=/usr/local/grass-6.5.svn GISDBASE=/usr/local/share/grassdata rm $HOME/.grassrc6 rm -rf $GISDBASE/$LOCATION #cleaning LOCATION TMPDIR=$$.tmp mkdir -p $GISDBASE/$TMPDIR/temp echo LOCATION_NAME: $TMPDIR $HOME/.grassrc6 echo MAPSET: temp $HOME/.grassrc6 echo DIGITIZER: none $HOME/.grassrc6 echo GISDBASE: $GISDBASE $HOME/.grassrc6 export GISBASE=$GISBASE export GISRC=$HOME/.grassrc6 export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts After these lines I run the v.in.ogr module to import the vector: v.in.ogr -o -e dsn=./test_data/test_data.shp output=grass_map And the following is the error i get. ERROR: region for current mapset is not set run g.region I tried to get the g.region help message, also I tried to reset the region (with g.region -d) and to set a default region (with g.region -s) but I get always the same error. I'm very new with GRASS and I cannot understand if there is a problem in the installation, or it is a bug (as it seemed), or I'm not working in the proper way. Thanks (also for the patience) No suggestions? -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] g.region (was v.to.rast conversion)
Hamish wrote: Giacomo Piva: First of all, thanks for your reply. To clarify my problem, i want to specify that the main problem is that all command that involves the g.region always returns the reported error (ERROR: default region is not set.) also the help. I found a similar discussion here: http://lists.osgeo.org/pipermail/grass-user/2009-November/052988.html Where the solution was to use of the SVN version of the grass. I already tried to use that version, bunt nothing changed. Any me any suggestions? maybe the rc5 bug is now gone, but the corrupted WIND file still remains in your mapset. try 'g.region -d' to reset it. does it work from a newly created mapset? Hamish Hi Hamish, Maybe it could be usefull to do a backward step. I should convert a shapefile into a raster file (GeoTIFF format) at a given resolution and I want to use the GRASS modules as a command line tools. I followed the instructions in the chapter Automated usage of grass in the Markus's book and I created a bash script in order to prepare the grass enviroment: #!/bin/bash LOCATION=test GISBASE=/usr/local/grass-6.5.svn GISDBASE=/usr/local/share/grassdata rm $HOME/.grassrc6 rm -rf $GISDBASE/$LOCATION #cleaning LOCATION TMPDIR=$$.tmp mkdir -p $GISDBASE/$TMPDIR/temp echo LOCATION_NAME: $TMPDIR $HOME/.grassrc6 echo MAPSET: temp $HOME/.grassrc6 echo DIGITIZER: none $HOME/.grassrc6 echo GISDBASE: $GISDBASE $HOME/.grassrc6 export GISBASE=$GISBASE export GISRC=$HOME/.grassrc6 export PATH=$PATH:$GISBASE/bin:$GISBASE/scripts After these lines I run the v.in.ogr module to import the vector: v.in.ogr -o -e dsn=./test_data/test_data.shp output=grass_map And the following is the error i get. ERROR: region for current mapset is not set run g.region I tried to get the g.region help message, also I tried to reset the region (with g.region -d) and to set a default region (with g.region -s) but I get always the same error. I'm very new with GRASS and I cannot understand if there is a problem in the installation, or it is a bug (as it seemed), or I'm not working in the proper way. Thanks (also for the patience) -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] g.region (was v.to.rast conversion)
Sorry for the change of the topic. Hi Achim, First of all, thanks for your reply. To clarify my problem, i want to specify that the main problem is that all command that involves the g.region always returns the reported error (ERROR: default region is not set.) also the help. I found a similar discussion here: http://lists.osgeo.org/pipermail/grass-user/2009-November/052988.html Where the solution was to use of the SVN version of the grass. I already tried to use that version, bunt nothing changed. Any me any suggestions? Thank you. Achim Kisseler wrote: Hi, it says: default region is not set. Try g.region -s to save as fefault region eventually use v.in.ogr -e to extend the location extends Achim Giacomo Piva schrieb: Hi all, I have already read and tested how to integrate the GRASS modules on a BASH script as Markus suggested. I'm running GRASS 6.4RC5 version. I should convert a shapefile given in the Italian projection system (Gauss-Boaga) into a raster file (GeoTIFF format) at a given resolution. I have tried to use the v.to.rast module, but it first requires the import module v.in.ogr. So, I found some troubles in the region defining. I've tried to set it manually with the command: g.region s=... n=... e=.. w=.. But the command returns the following error: ERROR: default region is not set. I've tried also other solutions, as the command: g.region vect=path/to/file.shp But it returns the same error. Could anyone give me any suggestions? Thank you. -- Giacomo ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.to.rast conversion
Hi all, I have already read and tested how to integrate the GRASS modules on a BASH script as Markus suggested. I'm running GRASS 6.4RC5 version. I should convert a shapefile given in the Italian projection system (Gauss-Boaga) into a raster file (GeoTIFF format) at a given resolution. I have tried to use the v.to.rast module, but it first requires the import module v.in.ogr. So, I found some troubles in the region defining. I've tried to set it manually with the command: g.region s=... n=... e=.. w=.. But the command returns the following error: ERROR: default region is not set. I've tried also other solutions, as the command: g.region vect=path/to/file.shp But it returns the same error. Could anyone give me any suggestions? Thank you. -- Giacomo Markus Metz wrote: Hi Giacomo, are you by any chance running this command outside a GRASS session? If grass is running, there is no need to give the full path, typing v.to.rast help in the terminal where grass is running is enough. Also, grass should know where to look for libgrass_vect.so, no need to run ldconfig. If you really want to use grass modules outside a standard grass session, see the grass book [1], third edition, page 338, 9.3 Automated usage of GRASS. Hope that helps, Markus M [1] http://www.grassbook.org/ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.to.rast Segmentation fault
Hi Markus, Thanks for your reply. The current GDAL installed is the version 1.6.0 (released 2008/12/04) and I did run the lddconfig because the libgrass_vect.so was not found. Since the result of the not found ldd is empty, it seems there is't problems with shared libraries. Do you have any suggestion? Markus Neteler wrote: On Fri, Nov 27, 2009 at 5:33 PM, Giacomo Piva p...@meeo.it wrote: Hi all, I just installed the grass distribution with version 6.4.0 RC5 on a linux box (Ubuntu 9.10) downloaded from the website. (not cvs) I'm trying to work with the v.to.ras module as a CLI and I'm unsing this command to get some help message: /usr/local/grass-6.4.0RC5/bin/v.to.rast help and... the result is a wonderful Segmentation fault. Does someone has any idea? Please check ldd `which v.to.rast` I suspect that you have GDAL 1.5.x there which apparently causes problems on Ubuntu (update to 1.6.x helps). Markus -- Giacomo Piva MEEO S.r.l. Via Saragat 9 I-44122 Ferrara, Italy Tel: +39 0532 1861501 Fax: +39 0532 1861637 http://www.meeo.it ATTENZIONE:le informazioni contenute in questo messaggio sono da considerarsi confidenziali ed il loro utilizzo è riservato unicamente al destinatario sopra indicato. Chi dovesse ricevere questo messaggio per errore è tenuto ad informare il mittente ed a rimuoverlo definitivamente da ogni supporto elettronico o cartaceo. WARNING:This message contains confidential and/or proprietary information which may be subject to privilege or immunity and which is intended for use of its addressee only. Should you receive this message in error, you are kindly requested to inform the sender and to definitively remove it from any paper or electronic format. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.to.rast Segmentation fault
Hi all, I just installed the grass distribution with version 6.4.0 RC5 on a linux box (Ubuntu 9.10) downloaded from the website. (not cvs) I'm trying to work with the v.to.ras module as a CLI and I'm unsing this command to get some help message: /usr/local/grass-6.4.0RC5/bin/v.to.rast help and... the result is a wonderful Segmentation fault. Does someone has any idea? Thanks. -- GP. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user