[GRASS-user] No Categories found

2010-07-08 Thread Sandile Gumede
Hi,

I've tried to sort out the issue of the region resolution. Now when I'm
running v.rast.stats it says:

ERROR: No categories found in raster map

Here is the script I'm running thats giving me that error:

#!/bin/sh

#variable to customize:
# path to GRASS software main directory
GISBASE=/usr/lib/grass64
# path to GRASS database
GISDBASE=$HOME/grassdata/Cape_
Town

LOCATION_NAME=SRTMDEM
MAPSET=PERMANENT

# nothing to change below
MAP=$1
LOCATION=$2


# generate temporal LOCATION:
TEMPDIR=FLOODS
mkdir -p $GISDBASE/$LOCATION_NAME/$MAPSET

# save existing $HOME/.grassrc6
if test -e $HOME/.grassrc6 ; then
mv $HOME/.grassrc6 /tmp/$TEMPDIR.grassrc6
fi

echo "LOCATION_NAME: $LOCATION_NAME" > $HOME/.grassrc6
echo "MAPSET:$MAPSET">> $HOME/.grassrc6
echo "DIGITIZER: none"   >> $HOME/.grassrc6
echo "GISDBASE: $GISDBASE"   >> $HOME/.grassrc6
export GISBASE=$GISBASE

# Create a WIND file with minimal information and no projection:
echo "proj: 3
zone:   0
north:  1
south:  0
east:   1
west:   0
cols:   1
rows:   1
e-w resol:  1
n-s resol:  1
top:1
bottom: 0
cols3:  1
rows3:  1
depths: 1
e-w resol3: 1
n-s resol3: 1
t-b resol:  1
" > $GISDBASE/$LOCATION_NAME/$MAPSET/WIND

# Copy WIND-file to DEFAULT_WIND:
cp $GISDBASE/$LOCATION_NAME/$MAPSET/WIND \
 $GISDBASE/$LOCATION_NAME/$MAPSET/DEFAULT_WIND


echo "name:  Latitude-Longitude
datum:   wgs84
towgs84: 0.000,0.000,0.000
proj:ll
ellps: wgs84
"> $GISDBASE/$LOCATION_NAME/$MAPSET/PROJ_INFO

echo "unit: degree
ubits:  degrees
meters: 1.0
"> $GISDBASE/$LOCATION_NAME/$MAPSET/PROJ_UNITS



export PATH=$GISBASE/bin:$GISBASE/scripts:$PATH
export LD_LIBRARY_PATH=$GISBASE/lib:$LD_LIBRARY_PATH
export GIS_LOCK=$$
export GISRC=$HOME/.grassrc6


# this should print GRASS version used:
g.version
# other calculations go here

# import rainfall data set.
 cd /home/tgumede1/grassdata/Cape_Town


# rainfall data set.
r.in.gdal input=$HOME/grassdata/Cape_Town/TRMMLast1day.tif output=rainfall


# DEM data set.
r.in.gdal input=$HOME/grassdata/Cape_Town/Dem_CF.tif target=SRTMDEM
output=dem
 g.region rast=dem -p

# creating set of maps indicating flow acc, drainage dir, streams
r.watershed --o elevation=...@permanent drainage=flow_direction basin=catch
accumulation=acc threshold=1 memory=300 stream=str

# convert catch raster to polygon vector
r.to.vect in=ca...@permanent out=catchments feature=area

 g.region rast=rainfall -p

# Calculate univariate statistics
v.rast.stats -c vector=catchme...@permanent
raster=rainf...@permanentcolpre=precp


-- 
Kind Regards
TS Gumede
CSIR, Meraka Institute
072 258 1650
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.univar column type in SQLite

2010-07-08 Thread Patricio Toledo
Dear List 

I am working in DEBIAN lenny with a backported grass64 and i am experiencing
problems with varios vector modules which make use of v.univar (or v.db.univar
or v.univar.sh) in connection with SQLite databases. 

The question is: which column type v.univar supports, as a table created with

CREATE TABLE master (id INTEGER, value NUMERIC);

or 

CREATE TABLE master (id INTEGER, value DOUBLE PRECISION);

or 

CREATE TABLE master (id INTEGER, value INTEGER);

fails after a command like this:

$ v.db.connect map=test data=/path/test.db driver=sqlite lay=1 table=master
cat=id
$ v.univar map=test column=value
WARNING: Incompatible vector type(s) specified, only number of features,
 minimum, maximum and range can be calculated
ERROR: Column type not supported

I have searched into .h files but it seems that INTEGER, NUMERIC and DOUBLE
PRECISION are indeed supported (there is no problem if the vector is reconnected
with a DBF table).

am i doing something wrong?

Regards



___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] convert to utm projection

2010-07-08 Thread Hamish
Daniel wrote:
> Complementing Varun response, take a look at the r.proj manual page
>  http://grass.ibiblio.org/grass65/manuals/html65_user/r.proj.html
> 
> Specially the Notes part, were it explains about the v.in.region trick
> in order to set the region extent and resolution correctly

fyi in grass 6.5 and newer there is also the r.proj -p and -g flags which
make the v.in.region trick not really needed any more.


Hamish



  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] convert to utm projection

2010-07-08 Thread Daniel Victoria
Hi,

Complementing Varun response, take a look at the r.proj manual page
 http://grass.ibiblio.org/grass65/manuals/html65_user/r.proj.html

Specially the Notes part, were it explains about the v.in.region trick
in order to set the region extent and resolution correctly

Cheers
Daniel

On Thu, Jul 8, 2010 at 4:02 AM, Mohammed Rashad  wrote:
> How to convert a map in lat/long projection to UTM projection using grass
> gis?
>
> --
> Rashad
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Including Metadata/description in file during import

2010-07-08 Thread Luisa Peña
Greetings

I have done a Python Script to import data, that is a specific format, and I
need to add some information to its metadata in GRASS (in order to be read
in other function). What function/functionality can I yuse in a Python
Script to parse text to a file metadata?

Thanks
Luisa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error while using r.in.gdal for USGS landsat7 images

2010-07-08 Thread António Rocha

Hello Markus

I have just tested that and it seems to be the best solution. But in 
this case I didn't know that it was all set to north.


Markus Neteler wrote:

2010/7/7 António Rocha :
  

Hi there,

I'm using r.in.gdal to import Landsat7 images downloaded from USGS website.
These landsat images are distributed in UTM-WGS84 for the specific zone. in
this case I'm working with images from Brazil (WGS84 UTM ZONE 24S). So first
I created  an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",


...
  

As can be seen it's North instead of South. Nevertheless, r.in.gdal imports
it and it even says: Projection of input dataset and current location appear
to match



but only appear I think - it is a garbage in/garbage out problem.
I would assign the correct EPSG code with

gdal_translate -a_srs ... badfile.tif goodfile.tif

then reimport. To catch all possible (rare) nonsense case in r.in.gdal I
consider to be overkill.

Markus


__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5261 (20100708) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




  




__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5261 (20100708) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: r.fillnulls --- no result

2010-07-08 Thread Venkatesh Raghavan

Hi MarkusM,
...

/usr/local/grass-6.4.0RC6/bin/v.surf.rst.exe: error while loading shared
libraries: ?: cannot open shared object file: No such file or directory


grass-6.4.0RC6 is too old, please try the most recent installer available from

http://josef.fsv.cvut.cz/wingrass/grass64


Great!!
We need to use Cygwin-GRASS for the moment.
Hope Cygwin-GRASS64 will be available soon.

Best

Venka
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: r.fillnulls --- no result

2010-07-08 Thread Markus Metz
Venkatesh Raghavan wrote:
>
> Any added info about how r.fillnulls issue was solved.
>
> We are getting the following error while using the latest
> Cygwin-GRASS
>
> r.fillnulls input=kagoshima_...@user1 output=kagoshima_fillnull tension=40.
> smooth=0.1
>
[snip]

> /usr/local/grass-6.4.0RC6/bin/v.surf.rst.exe: error while loading shared
> libraries: ?: cannot open shared object file: No such file or directory

grass-6.4.0RC6 is too old, please try the most recent installer available from

http://josef.fsv.cvut.cz/wingrass/grass64

Markus M
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Re: r.fillnulls --- no result

2010-07-08 Thread Venkatesh Raghavan

maven apache wrote:
...

Raster map  not found
 nothing removed
Removing vector 
(Wed Jan 13 21:40:23 2010) Command finished (3 sec)
---
I wonder why?
I have uploaded the tif.

Nobody ? :(

Did you use

g.region  rast=...@permanent


Yes, I use this commond before the r.fillnull.


Any added info about how r.fillnulls issue was solved.

We are getting the following error while using the latest
Cygwin-GRASS

r.fillnulls input=kagoshima_...@user1 output=kagoshima_fillnull 
tension=40. smooth=0.1


Locating and isolating NULL areas...
Reading input raster map ...
Writing output raster map ...
Finding buffer zones...
Creating interpolation points...
Extracting points...
Building topology for vector map ...
Registering primitives...
1599 primitives registered
1599 vertices registered
Building areas...
r.to.vect complete.
0 areas built
0 isles built
Attaching islands...
Attaching centroids...
Number of nodes: 1599
Number of primitives: 1599
Number of points: 1599
Number of lines: 0
Number of boundaries: 0
Number of centroids: 0
Number of areas: 0
Number of isles: 0
Interpolating 1599 points
Note: The following warnings may be ignored.
Removing raster 
Using segmentation for interpolation...
/usr/local/grass-6.4.0RC6/bin/v.surf.rst.exe: error while loading shared 
libraries: ?: cannot open shared object file: No such file or directory

Note: Above warnings may be ignored.
Patching fill data into NULL areas...
/usr/local/grass-6.4.0RC6/scripts/r.fillnulls: line 237: 
/usr/local/grass-6.4.0RC6/bin/r.patch: Permission denied

Removing raster 
Removing raster 
Raster map  not found
 nothing removed
Removing raster 
Removing vector 
  2 [main] g.remove 1796 exception::handle: Exception: 
STATUS_ACCESS_VIOLATION
   1134 [main] g.remove 1796 open_stackdumpfile: Dumping stack trace to 
g.remove.exe.stackdump


  2 [main] g.remove 1248 exception::handle: Exception: 
STATUS_ACCESS_VIOLATION
596 [main] g.remove 1248 open_stackdumpfile: Dumping stack trace to 
g.remove.exe.stackdump

Filled raster map is: kagoshima_fillnull
Raster map  not found in current mapset
Done.

___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error while using r.in.gdal for USGS landsat7 images

2010-07-08 Thread Markus Neteler
2010/7/7 António Rocha :
> Hi there,
>
> I'm using r.in.gdal to import Landsat7 images downloaded from USGS website.
> These landsat images are distributed in UTM-WGS84 for the specific zone. in
> this case I'm working with images from Brazil (WGS84 UTM ZONE 24S). So first
> I created  an Location based on EPSG:32724.
> Here goes the gdalinfo command for the image:
> /Driver: GTiff/GeoTIFF
> Files: L5216065_06520070405_B10.TIF
> Size is 8171, 6991
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 24N",
...
> As can be seen it's North instead of South. Nevertheless, r.in.gdal imports
> it and it even says: Projection of input dataset and current location appear
> to match

but only appear I think - it is a garbage in/garbage out problem.
I would assign the correct EPSG code with

gdal_translate -a_srs ... badfile.tif goodfile.tif

then reimport. To catch all possible (rare) nonsense case in r.in.gdal I
consider to be overkill.

Markus
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error while using r.in.gdal for USGS landsat7 images

2010-07-08 Thread António Rocha
r.info displays normal information such as Extent, resolution etc... So 
it seems all ok


Hamish wrote:

António wrote:
  

I'm using r.in.gdal to import Landsat7 images downloaded
from USGS website. These landsat images are distributed in
UTM-WGS84 for the specific zone. in this case I'm working
with images from Brazil (WGS84 UTM ZONE 24S). So first I
created  an Location based on EPSG:32724.
Here goes the gdalinfo command for the image:
/Driver: GTiff/GeoTIFF
Files: L5216065_06520070405_B10.TIF
Size is 8171, 6991
Coordinate System is:
PROJCS["WGS 84 / UTM zone 24N",
   GEOGCS["WGS 84",
   DATUM["WGS_1984",
   SPHEROID["WGS
84",6378137,298.257223563,
   
   AUTHORITY["EPSG","7030"]],
   
   AUTHORITY["EPSG","6326"]],

   PRIMEM["Greenwich",0],
   
   UNIT["degree",0.0174532925199433],

   AUTHORITY["EPSG","4326"]],
   PROJECTION["Transverse_Mercator"],
   PARAMETER["latitude_of_origin",0],
   PARAMETER["central_meridian",-39],
   PARAMETER["scale_factor",0.9996],
   PARAMETER["false_easting",50],
   PARAMETER["false_northing",0],
   UNIT["metre",1,
   AUTHORITY["EPSG","9001"]],
   AUTHORITY["EPSG","32624"]]
Origin = (443999.9941792,-694500.000)
Pixel Size = (30.000,-30.000)/

As can be seen it's North instead of South. Nevertheless,
r.in.gdal imports it and it even says: Projection of input
dataset and current location appear to match
But when I try to display I get an error window stating:
Execution failed: 'd.rast -o map=imp...@permanent --q'
Details:
Error: Unable to open raster map 
And nothing else is stated




what does "g.list rast" say? how about r.info?


Hamish



  



__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5261 (20100708) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




  




__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5261 (20100708) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Error while using r.in.gdal for USGS landsat7 images

2010-07-08 Thread Hamish
António wrote:
> I'm using r.in.gdal to import Landsat7 images downloaded
> from USGS website. These landsat images are distributed in
> UTM-WGS84 for the specific zone. in this case I'm working
> with images from Brazil (WGS84 UTM ZONE 24S). So first I
> created  an Location based on EPSG:32724.
> Here goes the gdalinfo command for the image:
> /Driver: GTiff/GeoTIFF
> Files: L5216065_06520070405_B10.TIF
> Size is 8171, 6991
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 24N",
>    GEOGCS["WGS 84",
>        DATUM["WGS_1984",
>            SPHEROID["WGS
> 84",6378137,298.257223563,
>            
>    AUTHORITY["EPSG","7030"]],
>        
>    AUTHORITY["EPSG","6326"]],
>        PRIMEM["Greenwich",0],
>    
>    UNIT["degree",0.0174532925199433],
>        AUTHORITY["EPSG","4326"]],
>    PROJECTION["Transverse_Mercator"],
>    PARAMETER["latitude_of_origin",0],
>    PARAMETER["central_meridian",-39],
>    PARAMETER["scale_factor",0.9996],
>    PARAMETER["false_easting",50],
>    PARAMETER["false_northing",0],
>    UNIT["metre",1,
>        AUTHORITY["EPSG","9001"]],
>    AUTHORITY["EPSG","32624"]]
> Origin = (443999.9941792,-694500.000)
> Pixel Size = (30.000,-30.000)/
> 
> As can be seen it's North instead of South. Nevertheless,
> r.in.gdal imports it and it even says: Projection of input
> dataset and current location appear to match
> But when I try to display I get an error window stating:
> Execution failed: 'd.rast -o map=imp...@permanent --q'
> Details:
> Error: Unable to open raster map 
> And nothing else is stated


what does "g.list rast" say? how about r.info?


Hamish




___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Merge images

2010-07-08 Thread Hamish
Monica wrote:
> I have 2 landsat scenes acquired one after the other and I wanted
> to merge them. How can I do that?

if they follow in time, but cover the same place, use
  g.region rast=map1 ; r.series in=map1,map2 out=maps12 method=...

if they follow in space, but from the same time, use
  g.region rast=map1,map2 ; r.patch in=map1,map2 out=maps12


Hamish



  
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.out.dxf define column for label

2010-07-08 Thread Vas Zor
Hi all,

I want to create a dxf file from a point shapefile. I am using the v.out.dxf
command. This command creates the dxf file, which contains a layer named
"point_label". This layer keeps the values of the field "cat" of the
attribute table. However I need this layer to be based on the second field
of the attribute table and not on the "cat" field.  Is this possible?

Thanks,

Vangelis



___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] Merge images

2010-07-08 Thread Monica Buescu
Greetings

I have 2 landsat scenes acquired one after the other and I wanted to merge
them. How can I do that?

Thanks
Monica
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] v.net.path

2010-07-08 Thread Mohammed Rashad
does v.net.path not work for lat/long location. Do I need to convert the map 
into other location for using v.net.path

 --
Rashad



  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] convert to utm projection

2010-07-08 Thread Varun Varma
Hi Rashad,
You will have to create a new location for the same extent as your data in
lat/long but this time specify the projection for the location as UTM. Then
make this new location and mapset your working grass space. Now use v.proj
OR r.proj to pull in the file from the lat/long location and mapset to the
new location you just created. This should change the projection from
lat/long to UTM.

Cheers,
Varun

On Thu, Jul 8, 2010 at 12:32 PM, Mohammed Rashad  wrote:

> How to convert a map in lat/long projection to UTM projection using grass
> gis?
>
> --
> Rashad
>
>
>
> ___
> grass-user mailing list
> grass-user@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] libgdal1-1.6.0-grass can't update

2010-07-08 Thread Benedikt Ziegler

Am 05.07.2010 20:21, schrieb Markus Neteler:

On Mon, Jul 5, 2010 at 9:39 AM, Benedikt Ziegler
  wrote:
   

Hello,

since some weeks I have the libgdal-package in my Ubuntu (Karmic) update
manager, listed under 'distribution update' (Distributionsaktualisierung)
but I can't update it.

Now I tried to install this package from lauchpad.net:
libgdal1-1.6.0-grass_1.6.2-3_amd64.deb

The result is this absent dependency expression: "Fehler: Abhängigkeit kann
nicht erfüllt werden: grass640-5+39438" The GRASS version I've installed is
6.4.0RC6. Asks the expression [...]grass640-5[...] for version RC5?
 

Looks like that - perhaps it should have been written as>= grass640-5+39438?

I think that you need to open a bug report in launchpad.

Markus

   
A view in Synaptic package manager shows that there is 
libgdal1-1.6.0-grass AND libgdal1-1.7.0-grass installed on my system. Is 
the older version obsolete and can completely uninstalled instead of 
updating?


Benedikt
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] convert to utm projection

2010-07-08 Thread Mohammed Rashad
How to convert a map in lat/long projection to UTM projection using grass gis?

 --
Rashad



  ___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user