[GRASSLIST:5508] Re: Newcomer Q:Missing libraries on OS X

Matt,

Well, it would be good if you have some metadata on these files. Where do they come from? You must have some information about them. Nevertheless, if you check the ‘extend extents…’ to match map checkbox, both v.in.ogr and r.in.gdal will automatically do this for you. This way, you don’t have to make sure that your region exactly matches the extents and resolution of the original data.

Michael

On 1/24/05 6:13 PM, “Matt Sakals” msakals@interchg.ubc.ca wrote:

Michael,
Thank you for your help.
How do I determine what the extents are? What are the units? How do I know what the extents are if I can’t open the data?

Matt Sakals, PAg, GIT
Sustainable Forest Management Laboratory
University of British Columbia
mailto:msakals@interchg.ubc.ca
http://sustain.forestry.ubc.ca/home.html
785 Dickens St., Trail, BC, V1R 2B7
ph. 250.368.3191
m. 250.231.0951


On 24 Jan 2005, at 15:57, Michael Barton wrote:

Matt,

Here are the steps to get your data into GRASS. The learning curve for GRASS is about the same as for ArcView (if you can remember starting from scratch). Knowing ArcView can be helpful and frustrating. You have some idea of what is possible, but the ways to do it are sometimes quite different—but not always. Now that I’ve mastered GRASS many things are much easier than in ArcView, some are harder, and others are just different. Hope this helps.

Michael

Use v.in.ogr (/files/import/vector/various formats using OGR) for the shape files.

  1. Make sure you are in a location with the correct projection parameters and extents.

  2. Put the path to directory with the files in the “OGR datasource name” box (path the DIRECTORY only, without the shapefile name).

  3. Put the new name of the GRASS vector file you want to create in the “name of output vector” field

  4. Put the name of the shapefile in the “OGR layer name” box WITHOUT the .shp extension. (You can check the List available layers… checkbox at the bottom to see a list of the names)

  5. You will probably have to check the “Override projection” checkbox because shape files don’t contain projection information (except with new ArcGIS).

  6. You may want to check the “Extend location extents…” box if the map is bigger than the region you are importing into.

This should work.

Use r.in.gdal for the ArcView grid file. (/files/import/raster/various formats using gdal).

  1. Browse to the hdr.adf file inside the grid folder (not the info folder) to put in the “Raster file to be imported” box

  2. Give a name to the new GRASS raster file you are creating

  3. You may have to check the “Override projections…” checkbox, and may want to check the “Extend location extents…” checkbox

This should import fine.

Once you have imported the files go to g.region (/gis/region/manage region) and set the region to match either of your maps. This makes sure that you are looking at the part of the world where you just imported data.

Use the GIS manager to display your data.

On 1/24/05 3:58 PM, “Matt Sakals” msakals@interchg.ubc.ca wrote:

Hi,
I am still having troubles getting going with GRASS and don’t know where to start. As I see it the big downside to continuous improvement is that the support documents are always out of date. This whole venture is extremely humbling as I am an advanced ArcView user, but can’t get going here.

I am trying to import .shp files and ArcView grids, they are projected according to BC Albers (http://srmwww.gov.bc.ca/gis/bceprojection.html)..) I am using GRASS 6.0 beta on OSX, would you be able to help me get off the ground?

Here is a sample data set of data I would like to work with:

Many thanks, it would be great if you can find the time to help me out,

Matt Sakals, PAg, GIT
Sustainable Forest Management Laboratory
University of British Columbia
mailto:msakals@interchg.ubc.ca
http://sustain.forestry.ubc.ca/home.html
785 Dickens St., Trail, BC, V1R 2B7
ph. 250.368.3191
m. 250.231.0951


On 19 Jan 2005, at 22:24, Michael Barton wrote:

On 1/19/05 8:30 AM, “Matt Sakals” msakals@interchange.ubc.ca wrote:

Hi,
I am trying to install GRASS, and have used the GRASS complete download for OS X from http://wwwamb.bologna.enea.it/forgrass/download.htm
but I don’t know if my libraries have been installed; I can’t find a grasslib folder on my computer anywhere.

Matt,

If you have run the install program for the grass libraries in Lorenzo Moretti’s GRASS complete, they are probably OK. They are located in /usr/local/grasslib. This is a ‘hidden’ directory on a Mac. You can check it by either…

  1. Using the terminal program and entering

cd /usr/local/grasslib
ls

  1. Selecting ‘Go to folder’ from the ‘Go’ menu in the finder. Enter /usr and press ‘Go’
    You should be able to navigate to /usr/local/grasslib then.

I don’t know if GRASS is working right or not because I am new, but in the tutorial it crashes when trying to import .shp files.

You don’t say which version of GRASS you are using. But I recommend using GRASS 6.0.0beta1. It is posted on my mirror site for Lorenzo’s files. I do NOT recommend using 5.7.0 because it is problematic. GRASS 5.4 is fine also, but 6.0 does more and generally does it more better. You should have no trouble importing a *.shp file using v.in.ogr in GRASS 6.0.

Hope this helps.

Michael


C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>


Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton


C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

On Tue, January 25, 2005 7:38, Michael Barton said:

Matt,

Well, it would be good if you have some metadata on these files. Where do
they come from? You must have some information about them. Nevertheless, if
you check the Œextend extents...¹ to match map checkbox, both v.in.ogr and
r.in.gdal will automatically do this for you. This way, you don¹t have to
make sure that your region exactly matches the extents and resolution of the
original data.

Michael

On 1/24/05 6:13 PM, "Matt Sakals" <msakals@interchg.ubc.ca> wrote:

Michael,
Thank you for your help.
How do I determine what the extents are? What are the units? How do I know
what the extents are if I can't open the data?

You can also just create any location (x,y with extent 1 in each direction is
ok) and then use the "location" option in either v.in.ogr or r.in.gdal to have
the program automatically create a new location with the correct projection
and extents. Once this is done, you have to leave the current (x,y) GRASS
session and restart GRASS into the newly created location.

I guess it would be great if this could be integrated into the GRASS start-up
dialog...

Moritz

Matt Sakals, PAg, GIT
Sustainable Forest Management Laboratory
University of British Columbia
mailto:msakals@interchg.ubc.ca
http://sustain.forestry.ubc.ca/home.html
785 Dickens St., Trail, BC, V1R 2B7
ph. 250.368.3191
m. 250.231.0951
__________________________________
On 24 Jan 2005, at 15:57, Michael Barton wrote:

Matt,

Here are the steps to get your data into GRASS. The learning curve for
GRASS
is about the same as for ArcView (if you can remember starting from
scratch).
Knowing ArcView can be helpful and frustrating. You have some idea of what
is
possible, but the ways to do it are sometimes quite different‹but not
always.
Now that I¹ve mastered GRASS many things are much easier than in ArcView,
some are harder, and others are just different. Hope this helps.

Michael

Use v.in.ogr (/files/import/vector/various formats using OGR) for the
shape
files.

1. Make sure you are in a location with the correct projection parameters
and extents.

2. Put the path to directory with the files in the ³OGR datasource name²
box
(path the DIRECTORY only, without the shapefile name).

3. Put the new name of the GRASS vector file you want to create in the
³name
of output vector² field

4. Put the name of the shapefile in the ³OGR layer name² box WITHOUT the
.shp extension. (You can check the List available layers... checkbox at the
bottom to see a list of the names)

5. You will probably have to check the ³Override projection² checkbox
because shape files don¹t contain projection information (except with new
ArcGIS).

6. You may want to check the ³Extend location extents...² box if the map
is
bigger than the region you are importing into.

This should work.

Use r.in.gdal for the ArcView grid file. (/files/import/raster/various
formats using gdal).

1. Browse to the hdr.adf file inside the grid folder (not the info folder)
to put in the ³Raster file to be imported² box

2. Give a name to the new GRASS raster file you are creating

3. You may have to check the ³Override projections...² checkbox, and may
want to check the ³Extend location extents...² checkbox

This should import fine.

Once you have imported the files go to g.region (/gis/region/manage
region)
and set the region to match either of your maps. This makes sure that you
are
looking at the part of the world where you just imported data.

Use the GIS manager to display your data.

On 1/24/05 3:58 PM, "Matt Sakals" <msakals@interchg.ubc.ca> wrote:

Hi,
I am still having troubles getting going with GRASS and don't know where
to
start. As I see it the big downside to continuous improvement is that the
support documents are always out of date. This whole venture is extremely
humbling as I am an advanced ArcView user, but can't get going here.

I am trying to import .shp files and ArcView grids, they are projected
according to BC Albers (http://srmwww.gov.bc.ca/gis/bceprojection.html). I
am
using GRASS 6.0 beta on OSX, would you be able to help me get off the
ground?

Here is a sample data set of data I would like to work with:

Many thanks, it would be great if you can find the time to help me out,

Matt Sakals, PAg, GIT
Sustainable Forest Management Laboratory
University of British Columbia
mailto:msakals@interchg.ubc.ca
http://sustain.forestry.ubc.ca/home.html
785 Dickens St., Trail, BC, V1R 2B7
ph. 250.368.3191
m. 250.231.0951
__________________________________
On 19 Jan 2005, at 22:24, Michael Barton wrote:

On 1/19/05 8:30 AM, "Matt Sakals" <msakals@interchange.ubc.ca> wrote:

Hi,
I am trying to install GRASS, and have used the GRASS complete download
for
OS X from http://wwwamb.bologna.enea.it/forgrass/download.htm
but I don't know if my libraries have been installed; I can't find a
grasslib folder on my computer anywhere.

Matt,

If you have run the install program for the grass libraries in Lorenzo
Moretti¹s GRASS complete, they are probably OK. They are located in
/usr/local/grasslib. This is a Œhidden¹ directory on a Mac. You can check
it
by either...
     1. Using the terminal program and entering
     >>cd /usr/local/grasslib
     >>ls

     2. Selecting ŒGo to folder¹ from the ŒGo¹ menu in the finder. Enter
/usr
and press ŒGo¹
     You should be able to navigate to /usr/local/grasslib then.

I don't know if GRASS is working right or not because I am new, but in the
tutorial it crashes when trying to import .shp files.

You don¹t say which version of GRASS you are using. But I recommend using
GRASS 6.0.0beta1. It is posted on my mirror site for Lorenzo¹s files. I do
NOT recommend using 5.7.0 because it is problematic. GRASS 5.4 is fine
also,
but 6.0 does more and generally does it more better. You should have no
trouble importing a *.shp file using v.in.ogr in GRASS 6.0.

Hope this helps.

Michael

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>

______________________________
Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
Arizona State University
Tempe, AZ 85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

____________________
C. Michael Barton, Professor of Anthropology
School of Human Evolution and Social Change
PO Box 872402
Arizona State University
Tempe, AZ 85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671
www: <www.public.asu.edu/~cmbarton>