[GRASSLIST:884] Sites

Hi folks,

I've created most of my maps, now I need to create files for my sites. The
two methods I've attempted to use are s.in.ascii and s.in.dbf.

I have many different types of sites. Most I just want to place an easting
and a northing. I need nothing else. For the man focus of my thesis, the
'wedge tomb,' I wanted to have the easting, northing, and a catalogue number
to identify the tomb on the map. As an example for one wedge tomb I have:

An easting of 153710, a northing of 312310, and a Catalogue number of Cat.
32.

I attempted to write this as an ASCII file.

153710 312310 #Cat. 32 (is # the right symbol for this?)

I wrote this in Textwrangler, converted to ASCII, and saved with:
File creator: TextWrangler Save State: None Line Breaks: Unix
Encoding: Western(ASCII).

It created a site file, but when I went to display it, nothing happened.

Next, I used the database Filemaker pro 6.0. I set up the headings
EASTING NORTHING CATALOGUE NO. and entered
153710 312310 Cat. 32

I then exported this to .dbf and ran s.in.dbf. It also seemed to import.
But when I ran d.sites I got:

ERROR: ebuf 1553710 nbuf 312310 @"CAT. 32"

I tried to re-import to .dbf with out the Catalogue No, ran s.in.dbf.
When I tried to display this I got:

ERROR: ebuf 153710 312310 nbuf
ERROR: G_site_new_structure: invalid # dims or fields.

What am I doing wrong? I just need to label the wedge tombs sites. The
other sites are just need to appear on the map.

Kurt

I've created most of my maps, now I need to create files for my sites.
The two methods I've attempted to use are s.in.ascii and s.in.dbf.

see-
http://grass.ibiblio.org/gdp/grass5tutor/HTML/c848.html
http://grass.ibiblio.org/gdp/html_grass5/html/s.in.ascii.html
http://grass.ibiblio.org/gdp/html_grass5/ascii_formats.html
http://grass.itc.it/grassdevel.html#prog

As an example for one wedge tomb I have:
An easting of 153710, a northing of 312310, and a Catalogue number of
Cat. 32.
I attempted to write this as an ASCII file.
153710 312310 #Cat. 32 (is # the right symbol for this?)

For import with s.in.ascii, the input file just has to look like:
153710 312310 32
153720 312320 33
etc.

For creating a sites file to move into the GRASS directory structure by
hand, try:
153710|312310|#32
153720|312320|#33
etc.

or
153710|312310|#32 @"Cat. 32"
153720|312320|#33 @"Cat. 33"
etc.

display with
d.sites
d.site.labels

Hamish

I'm slowly getting to grips with the idiosyncrasies of GRASS, having used
other GIS & mapping tools for several years.

My current problem lies in getting a good looking hillshade like the
spearfish dataset provides.

Hopefully I've included all the relevannt info below....

I have imported an xyz dataset into GRASS with:
cat mandes_.LI | awk '{print $2, $3, $4, $4}' | s.in.ascii andes d=3

The file mandes_.LI comprises N X Y Z values, where N is a record ID that
I'm omitting when I build the site file. The Z value is depth in
meters, X & Y are long/latitude in decimal degrees.

The file imports to a site file as I expect, and I then interpolate it to
build a raster with

s.surf.rst input=andes5m elev=andes5m tension=40 smooth=10 npmin=50

This displays fine as a raster, showing the seabed topography I expect.

I then try to get GRASS to display this with terrain (aspect) shading,
using the GRASS script below to create a new raster andes5m.shade

shade.rel.sh altitude=20 azimuth=270 elevation=andes5m

This is then displayed using

d.his h=andes5m i=andes5m.shade

This picture is very grainy, the overall impression of shading is OK, but
the map appears to be built of bricks (about 32x32). I use the term bricks
because each has its own shading within its boundary, so pixel is not
appropriate, each brick comprises several pixels. I have tried changing
tension & smoothing parameters, without making much difference.

The output below describes the elevation raster. If anyone can offer ay
advice to help resolve this, I would appreciate it.

Thanks,

  Brent Wood

+-----------------------------------------------------------------------+
| Layer: andes5m Date: Fri Aug 8 02:19:48 2003 |
| Mapset: PERMANENT Login of Creator: baw |
| Location: andes |
| DataBase: /home/baw/grassdb |
| Title: ( andes5m ) |
|-----------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 255 |
| Data Type: FCELL |
| Rows: 1548 |
| Columns: 2268 |
| Total Cells: 3510864 |
| Projection: Latitude-Longitude (zone 0) |
| N: 44:05:23.28S S: 44:14:40.56S Res: 0:00:00.36 |
| E: 174:22:53.04W W: 174:36:29.52W Res: 0:00:00.36 |
| Range of data: min = -1470.000000 max = 0.000000 |
| |
| Data Source: |
| site file andes5m |
| |
| |
| Data Description: |
| generated by s.surf.rst |
| |
| Comments: |
| tension=40.000000, smoothing=10.000000 |
| dnorm=0.003973, dmin=0.000050, zmult=1.000000 |
| segmax=40, npmin=50, rmsdevi=3.464404 |
| zmin_data=-1470.000000, zmax_data=-485.000000 |
| zmin_int=-1470.000000, zmax_int=-489.320737 |
| @@t |
| ]@(@@t |
| ]@$ |
| |
+-----------------------------------------------------------------------+

The rst algorithm breaks your data into processing cells to conserve memory. You need to tweak the parameters to minimize the artifact this sometimes creates. Dr. Mitsova (sp?) has several papers on this algorithm available on the internet. If I recall correctly, she has a number of examples of settings on her web site too.

I use this algorithm a lot on very large datasets and you can get nice looking surfaces if you (a) have well spaced data (b) play with the settings to tune the surface to your data. I have seen the artifact myself when things were out of tune or the data was too sparse to make a nice surface.

Try googling for her and regular splines with tension for more information.

HTH

David

Brent Wood wrote:

>
> I'm slowly getting to grips with the idiosyncrasies of GRASS, having used
> other GIS & mapping tools for several years.
>
> My current problem lies in getting a good looking hillshade like the
> spearfish dataset provides.
>
> Hopefully I've included all the relevant info below....
>
> I have imported an xyz dataset into GRASS with:
> cat mandes_.LI | awk '{print $2, $3, $4, $4}' | s.in.ascii andes d=3
>
> The file mandes_.LI comprises N X Y Z values, where N is a record ID that
> I'm omitting when I build the site file. The Z value is depth in
> meters, X & Y are long/latitude in decimal degrees.
>
> The file imports to a site file as I expect, and I then interpolate it to
> build a raster with
>
> s.surf.rst input=andes5m elev=andes5m tension=40 smooth=10 npmin=50
>
> This displays fine as a raster, showing the seabed topography I expect.
>
> I then try to get GRASS to display this with terrain (aspect) shading,
> using the GRASS script below to create a new raster andes5m.shade
>
> shade.rel.sh altitude=20 azimuth=270 elevation=andes5m
>
> This is then displayed using
>
> d.his h=andes5m i=andes5m.shade
>
> This picture is very grainy, the overall impression of shading is OK, but
> the map appears to be built of bricks (about 32x32). I use the term bricks
> because each has its own shading within its boundary, so pixel is not
> appropriate, each brick comprises several pixels. I have tried changing
> tension & smoothing parameters, without making much difference.
>
> The output below describes the elevation raster. If anyone can offer ay
> advice to help resolve this, I would appreciate it.
>
> Thanks,
>
> Brent Wood
>
> +-----------------------------------------------------------------------+
> | Layer: andes5m Date: Fri Aug 8 02:19:48 2003 |
> | Mapset: PERMANENT Login of Creator: baw |
> | Location: andes |
> | DataBase: /home/baw/grassdb |
> | Title: ( andes5m ) |
> |-----------------------------------------------------------------------|
> | |
> | Type of Map: raster Number of Categories: 255 |
> | Data Type: FCELL |
> | Rows: 1548 |
> | Columns: 2268 |
> | Total Cells: 3510864 |
> | Projection: Latitude-Longitude (zone 0) |
> | N: 44:05:23.28S S: 44:14:40.56S Res: 0:00:00.36 |
> | E: 174:22:53.04W W: 174:36:29.52W Res: 0:00:00.36 |
> | Range of data: min = -1470.000000 max = 0.000000 |
> | |
> | Data Source: |
> | site file andes5m |
> | |
> | |
> | Data Description: |
> | generated by s.surf.rst |
> | |
> | Comments: |
> | tension=40.000000, smoothing=10.000000 |
> | dnorm=0.003973, dmin=0.000050, zmult=1.000000 |
> | segmax=40, npmin=50, rmsdevi=3.464404 |
> | zmin_data=-1470.000000, zmax_data=-485.000000 |
> | zmin_int=-1470.000000, zmax_int=-489.320737 |
> | @@t |
> | ]@(@@t |
> | ]@$ |
> | |
> +-----------------------------------------------------------------------+
>

--
David Finlayson
School of Oceanography
Box 357940
University of Washington
Seattle, WA 98195-7940
USA

Office: Marine Sciences Building, Room 112
Phone: (206) 616-9407
Web: http://students.washington.edu/dfinlays