------------------------------

Message: 2
Date: Thu, 08 Nov 2007 20:21:48 +1100
From: Richard Chirgwin <[EMAIL PROTECTED]>
Subject: [GRASS-user] Script help
To: grassuser@grass.itc.it
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

I hope this is a simple question!

I have a large number of shapefiles to import, but I'm a scripting newcomer.

Where do I locate the Grass-GIS 6 example scripts to work out how to import them in bulk rather than one-by-one? All I'm looking for is to say: For file <name>.shp create vector <name> through a whole directory.

Richard C



------------------------------

Message: 3
Date: Thu, 8 Nov 2007 02:17:57 -0800 (PST)
From: Hamish <[EMAIL PROTECTED]>
Subject: Re: [GRASS-user] Script help
To: Richard Chirgwin <[EMAIL PROTECTED]>
Cc: grassuser@grass.itc.it
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-1

Richard Chirgwin wrote:

I have a large number of shapefiles to import, but I'm a scripting newcomer.

Where do I locate the Grass-GIS 6 example scripts to work out how to import them in bulk rather than one-by-one? All I'm looking for is to say: For file <name>.shp create vector <name> through a whole directory.

assuming the location matches the .prj projection info,


for FILE in *.shp ; do
  v.in.ogr dsn="$FILE" out=`basename $FILE .shp`
done


If you are confident that the projection matches but the .prj files are missing
use the -o flag.

Hamish - thank you!

RC

Hamish


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


------------------------------

Message: 4
Date: Thu, 8 Nov 2007 12:16:08 +0000
From: Glynn Clements <[EMAIL PROTECTED]>
Subject: Re: [GRASS-user] Re: [GRASS-dev] r.in.xyz upgrade
To: Hamish <[EMAIL PROTECTED]>
Cc: grass list <grassuser@grass.itc.it>, grass-dev
        <[EMAIL PROTECTED]>,      Volker Wichmann <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii


Hamish wrote:

I have upgraded r.in.xyz to allow for the following aggregate functions:
- skewness
- median
- percentile
- trimmed mean

To make this possible, I created singly linked lists for all points falling into a cell. I followed a suggestion of Glynn and used arrays instead of pointers and stored the head of each list in a raster map ([GRASS-dev] storing pointers in CELL_TYPE maps? (from April 2007)).
The linked lists are then used to calculate the corresponding
statistics before binning the values.
So far we encountered no problems with this approach in our working group, but I'm not sure about some details. Maybe there should be some more checks, e.g. to prevent the index to overflow because of too many cells.
[Gf patch #450]

After a long delay I have finally applied the patch in GRASS
6.3-CVS/HEAD.

I apologize to Volker for taking so long to deal with this, and
congratulate him and his team on a job well done. It's a nice little
bit of code.

The memory footprint seems to be about the same as for a stddev map.


Question for the LFS folks: if the region size is >2/4billion cells*
will the num_nodes, max_nodes, and node.next variables want to be
something larger than int? nb I expect there will be other memory
issues in this case anyway, and multi-pass via the percent= option
should be used. * regions bigger than 45000x45000 / 63245x63245


aside:
I am finding the r.colors "-e" flag and the 'r.colors.stddev -z'
add-on script very very useful these days. ('r.colors -e' for
ignoring outliers and 'r.colors.stddev -z' for a proper differences
map [method=skewness])


go forth and test it,
Hamish

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser



------------------------------

Message: 5
Date: Thu, 8 Nov 2007 15:23:07 +0200
From: "Andre Hauptfleisch" <[EMAIL PROTECTED]>
Subject: [GRASS-user] Raster Display
To: "Grass User Mailing List" <grassuser@grass.itc.it>
Message-ID:
        <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Good day,

I'm new to Grass. I'm trying to import an image and view it in the Map
Display.

It seems to be working, but the dimensions are not correct. The image size
is 512x512, but after the "d.rast" there is an output of "GRASS_WIDTH=685,
GRASS_HEIGHT=508".

Assuming they were environmental variables, I tried to change them, but
nothing happens.


This is the output from r.info for the raster:

 +----------------------------------------------------------------------------+
 | Layer:    white                          Date: Thu Nov  8 14:09:07
2007    |
 | Mapset:   test                           Login of Creator:
andreh          |
 | Location:
spearfish60                                                      |
 | DataBase:
/home/andreh/workspace/grassdata                                 |
 | Title:     ( white
)                                                       |
 | Timestamp:
none                                                            |
 |----------------------------------------------------------------------------|
 |
|
 |   Type of Map:  raster               Number of Categories:
1               |
 |   Data Type:
CELL                                                       |
 |   Rows:
512                                                        |
 |   Columns:
512                                                        |
 |   Total Cells:
262144                                                     |
 |        Projection: UTM (zone
13)                                           |
 |            N:    4928010    S:    4913700   Res: 27.94921875
|
 |            E:     609000    W:     589980   Res: 37.1484375
|
 |   Range of data:    min = 0  max =
1                                       |
 |
|
 |   Data
Description:                                                        |
 |    generated by r.in.gdal
|
 |
|
 |
Comments:                                                                |
 |    r.in.gdal -o input="/home/andreh/workspace/project-grass/test.tiff"
\   |
 |    output="white"
target="UTM"                                             |
 |
|
 +----------------------------------------------------------------------------+

Regards,
Andre
<[EMAIL PROTECTED]>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
http://grass.itc.it/pipermail/grassuser/attachments/20071108/831dad49/attachment-0001.html

------------------------------

Message: 6
Date: Thu, 08 Nov 2007 15:37:30 +0100
From: Jachym Cepicky <[EMAIL PROTECTED]>
Subject: Re: [GRASS-user] Raster Display
To: Andre Hauptfleisch <[EMAIL PROTECTED]>
Cc: Grass User Mailing List <grassuser@grass.itc.it>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="utf-8"

Hi,

this is usually related to your region settings. Try

g.region -p
g.region -p rast=white
d.mon x0
d.rast white
g.manual g.region

hope, it helps

jachym

Andre Hauptfleisch píše v Čt 08. 11. 2007 v 15:23 +0200:
Good day,

I'm new to Grass. I'm trying to import an image and view it in the Map
Display.

It seems to be working, but the dimensions are not correct. The image
size is 512x512, but after the " d.rast" there is an output of
"GRASS_WIDTH=685, GRASS_HEIGHT=508".

Assuming they were environmental variables, I tried to change them,
but nothing happens.


This is the output from r.info for the raster:

 +----------------------------------------------------------------------------+
 | Layer:    white                          Date: Thu Nov  8 14:09:07
2007    |
 | Mapset:   test                           Login of Creator: andreh
|
 | Location: spearfish60
|
 | DataBase: /home/andreh/workspace/grassdata
|
 | Title:     ( white )
|
 | Timestamp: none
|
 |----------------------------------------------------------------------------|
 |
|
 |   Type of Map:  raster               Number of Categories: 1
|
 |   Data Type:    CELL
|
 |   Rows:         512
|
 |   Columns:      512
|
 |   Total Cells:  262144
|
 |        Projection: UTM (zone 13)
|
 |            N:    4928010    S:    4913700   Res: 27.94921875
|
 |            E:     609000    W:     589980   Res: 37.1484375
|
 |   Range of data:    min = 0  max = 1
|
 |
|
 |   Data Description:
|
 |    generated by r.in.gdal
|
 |
|
 |   Comments:
|
 |    r.in.gdal -o
input="/home/andreh/workspace/project-grass/test.tiff" \   |
 |    output="white" target="UTM"
|
 |
|
+----------------------------------------------------------------------------+
Regards,
Andre
_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Reply via email to