[GRASS-user] Re: grassuser Digest, Vol 19, Issue 13

Richard Chirgwin rchirgwin at ozemail.com.au
Thu Nov 8 19:08:18 EST 2007


> ------------------------------
>
> Message: 2
> Date: Thu, 08 Nov 2007 20:21:48 +1100
> From: Richard Chirgwin <rchirgwin at ozemail.com.au>
> Subject: [GRASS-user] Script help
> To: grassuser at grass.itc.it
> Message-ID: <4732D52C.6000206 at ozemail.com.au>
> 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 <hamish_nospam at yahoo.com>
> Subject: Re: [GRASS-user] Script help
> To: Richard Chirgwin <rchirgwin at ozemail.com.au>
> Cc: grassuser at grass.itc.it
> Message-ID: <732184.91570.qm at web52707.mail.re2.yahoo.com>
> 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 <glynn at gclements.plus.com>
> Subject: Re: [GRASS-user] Re: [GRASS-dev] r.in.xyz upgrade
> To: Hamish <hamish_nospam at yahoo.com>
> Cc: grass list <grassuser at grass.itc.it>, grass-dev
> 	<grass-dev at grass.itc.it>,	Volker Wichmann <wichmann at laserdata.at>
> Message-ID: <18226.65032.585903.837736 at cerise.gclements.plus.com>
> 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 at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grassuser
>>     
>
>
>
> ------------------------------
>
> Message: 5
> Date: Thu, 8 Nov 2007 15:23:07 +0200
> From: "Andre Hauptfleisch" <ahaupt at gmail.com>
> Subject: [GRASS-user] Raster Display
> To: "Grass User Mailing List" <grassuser at grass.itc.it>
> Message-ID:
> 	<1ee3a1100711080523n1f0777e8i2179f659e120c83e at mail.gmail.com>
> 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
> <ahaupt at gmail.com>
> -------------- 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 <jachym.cepicky at gmail.com>
> Subject: Re: [GRASS-user] Raster Display
> To: Andre Hauptfleisch <ahaupt at gmail.com>
> Cc: Grass User Mailing List <grassuser at grass.itc.it>
> Message-ID: <1194532650.7121.30.camel at kocour>
> 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 at grass.itc.it
>> http://grass.itc.it/mailman/listinfo/grassuser
>>     




More information about the grass-user mailing list