[GRASSLIST:6493] m.proj s.in.ascii s.to.rast

Hi,

I just installed GRASS6.0, the installation was a lot easier (as I recall) than installing 5.0 a year ago.

Last time I worked with GRASS (Feb 2004), I was trying to calculate the landcover statistics in a 500km radius around a research site using the NLCD from USGS:

a) I used m.proj2 to convert my site location to the appropriate projection.
b) defined the site with s.in.ascii, and converted it to a raster using s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help figuring out how to do this in 6.0.

Thanks.

Martin

[Originally posted to win-Grass, so I apologize for multiple posting]

Well,
there's information in here:
<http://grass.gdf-hannover.de/twiki/bin/view/GRASS/ModulePortingList&gt;
But, essentially:
m.proj hasn't been ported to GRASS 6.0
s.in.ascii is now v.in.ascii
s.to.rast is now v.to.rast

The rationale behind this has been the move away from sites and
vectors into vectors, with points (former sites) being a particular
type of vector. Or so I understand it!
Hope that helps.

On 4/15/05, Martin du Saire <mdusaire@umn.edu> wrote:

Hi,

I just installed GRASS6.0, the installation was a lot easier (as I recall)
than installing 5.0 a year ago.

Last time I worked with GRASS (Feb 2004), I was trying to calculate the
landcover statistics in a 500km radius around a research site using the
NLCD from USGS:

a) I used m.proj2 to convert my site location to the appropriate
projection.
b) defined the site with s.in.ascii, and converted it to a raster using
s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help
figuring out how to do this in 6.0.

Thanks.

Martin

[Originally posted to win-Grass, so I apologize for multiple posting]

Hi

Sites no longer exists in 5.7+. Replaced by vector points. Thus:
s.in.ascii = v.in.ascii
m.proj2 = v.proj
s.to.rast = v.to.rast

Or go for the "old" Grass 5.4 - much improved and cleaner than 5.0, easy to build, and still using sites. However note that there will be no more developmnet in the 5.x branch, we may expect only releases fixing major bugs. So the sooner we users get used to new vector engine the better for us :).

Maciek

----- Original Message ----- From: "Martin du Saire" <mdusaire@umn.edu>
To: <GRASSLIST@baylor.edu>
Sent: Friday, April 15, 2005 7:11 PM
Subject: [GRASSLIST:6493] m.proj s.in.ascii s.to.rast

Hi,

I just installed GRASS6.0, the installation was a lot easier (as I recall) than installing 5.0 a year ago.

Last time I worked with GRASS (Feb 2004), I was trying to calculate the landcover statistics in a 500km radius around a research site using the NLCD from USGS:

a) I used m.proj2 to convert my site location to the appropriate projection.
b) defined the site with s.in.ascii, and converted it to a raster using s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help figuring out how to do this in 6.0.

Thanks.

Martin

[Originally posted to win-Grass, so I apologize for multiple posting]

Martin du Saire wrote:

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help
figuring out how to do this in 6.0.

m.proj2 just duplicates the functionality of the proj/cs2cs programs
from the PROJ distribution. Use proj or cs2cs instead (cs2cs does
combined projection and datum conversions, proj just does
projections).

GRASS 6.x doesn't have a separate "sites" map type; site maps are now
just vector maps. Look at v.in.ascii and v.to.rast.

--
Glynn Clements <glynn@gclements.plus.com>

Thanks for all your help on the sites to vector question. I think I'm on my way to figuring it out.

Next question:

Is the process I am using to obtain the data I need a reasonable way to go about it, or am I missing something (not having any real GIS training or experience)?

a) I used m.proj2 to convert my site location to the appropriate projection.
b) defined the site with s.in.ascii, and converted it to a raster using s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

Thanks.

M

At 02:13 PM 4/15/2005, you wrote:

Hi

Sites no longer exists in 5.7+. Replaced by vector points. Thus:
s.in.ascii = v.in.ascii
m.proj2 = v.proj
s.to.rast = v.to.rast

Or go for the "old" Grass 5.4 - much improved and cleaner than 5.0, easy to build, and still using sites. However note that there will be no more developmnet in the 5.x branch, we may expect only releases fixing major bugs. So the sooner we users get used to new vector engine the better for us :).

Maciek

----- Original Message ----- From: "Martin du Saire" <mdusaire@umn.edu>
To: <GRASSLIST@baylor.edu>
Sent: Friday, April 15, 2005 7:11 PM
Subject: [GRASSLIST:6493] m.proj s.in.ascii s.to.rast

Hi,

I just installed GRASS6.0, the installation was a lot easier (as I recall) than installing 5.0 a year ago.

Last time I worked with GRASS (Feb 2004), I was trying to calculate the landcover statistics in a 500km radius around a research site using the NLCD from USGS:

a) I used m.proj2 to convert my site location to the appropriate projection.
b) defined the site with s.in.ascii, and converted it to a raster using s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help figuring out how to do this in 6.0.

Thanks.

Martin

[Originally posted to win-Grass, so I apologize for multiple posting]

On Fri, 15 Apr 2005 15:58:14 -0500
Martin du Saire <mdusaire@umn.edu> wrote:

Thanks for all your help on the sites to vector question. I think I'm on
my way to figuring it out.

Next question:

Is the process I am using to obtain the data I need a reasonable way to go
about it, or am I missing something (not having any real GIS training or
experience)?

a) I used m.proj2 to convert my site location to the appropriate projection.
b) defined the site with s.in.ascii, and converted it to a raster using
s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

Thanks.

M

I think that should work. If you want to sample within a specific buffer distance of your sites however, I wrote a modified version of v.sample called v.sample.buffer (a bash script) which is still not ready for submission or general use, as I have to set it up to run with the GRASS parser interface and write some user documentation, etc. Basically what it does go through the vector points layer site by site and extracts information from one or more raster layers within a user specified buffer radius around the points and adds the calculated results (min, max, mean....) to the attribute table of the sites vector layer. It hasn't gone through any testing yet. If this is what you want to do, I can send you the files (I called a python script in it as I wanted to calculate mode percent). I should have the script in a form good enough to be uploaded on the GRASS wiki site in a month or two if you prefer to wait.

T
--
Trevor Wiens
twiens@interbaun.com

The significant problems that we face cannot be solved at the same
level of thinking we were at when we created them.
(Albert Einstein)

> What happened to m.proj(2), s.in.ascii, and s.to.rast?
>
> I gather these commands no longer exist. In that case I need some
> help figuring out how to do this in 6.0.

Glynn:

m.proj2 just duplicates the functionality of the proj/cs2cs programs
from the PROJ distribution. Use proj or cs2cs instead (cs2cs does
combined projection and datum conversions, proj just does
projections).

note you can use g.proj to make cs2cs easy.

e.g., transform Lat/Lon WGS84 points to the current GRASS location's
projection:

IN_PROJ="+proj=longlat +towgs84=0.000,0.000,0.000"
OUT_PROJ="`g.proj -jf`"

cat input.txt | cs2cs -f %.7f $IN_PROJ +to $OUT_PROJ > output.txt

These few lines would be in GRASS already as a replacement for m.proj2
if I could figure out how to optionally pipe input to the script with a
bit better control than "read" gives and a good name for it (no more m.*
modules).

Hamish

On Fri, Apr 15, 2005 at 12:11:22PM -0500, Martin du Saire wrote:

Hi,

I just installed GRASS6.0, the installation was a lot easier (as I recall)
than installing 5.0 a year ago.

Last time I worked with GRASS (Feb 2004), I was trying to calculate the
landcover statistics in a 500km radius around a research site using the
NLCD from USGS:

a) I used m.proj2 to convert my site location to the appropriate
projection.
b) defined the site with s.in.ascii, and converted it to a raster using
s.to.rast.
c) created the buffer zone using r.buffer
d) patched the landcover map in the buffer zone with r.patch -z
e) calculated statistics with r.stat -c

What happened to m.proj(2), s.in.ascii, and s.to.rast?

I gather these commands no longer exist. In that case I need some help
figuring out how to do this in 6.0.

Please have a look at

http://grass.gdf-hannover.de/twiki/bin/view/GRASS/ModulePortingList#Miscellaneous_Commands

to find out what happend to these modules.

Markus

Is there a way to change the weight/width of a displayed vector line to make
it wider than 1 pixel?

This is a question that came up earlier, but I thought that I'd ask again.
In January the answer someone else received was no. If this is still true,
would it be possible to alter the display driver to give this option
(apologies for my ignorance about that part). Just checking to see if this
has changed possibly in 6.0.

Thank you.

Teague

Teague O'Mara
Department of Anthropology
Arizona State University
Box 872402
Tempe, AZ 85287-2402
480.965.6213

Teague O'Mara wrote:

Is there a way to change the weight/width of a displayed vector line to make
it wider than 1 pixel?

No.

This is a question that came up earlier, but I thought that I'd ask again.
In January the answer someone else received was no. If this is still true,
would it be possible to alter the display driver to give this option
(apologies for my ignorance about that part).

You could modify the display driver, but there are likely to be
programs which wouldn't behave correctly with the modified driver. The
line-drawing functions aren't used solely for drawing vector maps.

Just checking to see if this has changed possibly in 6.0.

No, nothing has changed in that regard.

--
Glynn Clements <glynn@gclements.plus.com>

Is there a way to change the weight/width of a displayed vector line to make
it wider than 1 pixel?

with d.vect the answer is no, but there are always other paths:

a) use ps.map which can do it
b) use v.buffer and then d.vect the resultant area
c) use QGIS's GRASS plugin to load & render the map, which can do it

Hamish