0

I am brand new to GRASS GIS (and GIS in general) and I am trying to use this for some real estate research. However, before even going down that path, I'm attempting to follow the Quick wxGUI tutorial (https://grasswiki.osgeo.org/wiki/Quick_wxGUI_tutorial) just to see if I can open a map. I am having difficultly even doing this. Here is what I'm attempting to do:

  • I have installed Grass GIS 7.4.0 in Mint Linux
  • I downloaded the 'GRASS 7 full data' in zip format (nc_spm, 145MB)
  • I have created a GIS Data Directory i '/home/me/grassdata'
  • in the 'grassdata' folder, I have 3 directories (landsat, PERMANENT, user1) and 3 files (CREDITS.txt, HISTORY.txt, VERSION.txt)
  • When I open GRASS GIS, I navigate to the 'grassdata' folder, it indicates 'No GRASS location found in /home/me/grassdata'. Create a new location or choose different GRASS database directory'

Which directory do I need to browse to for the 'Grass GIS database directory'?

Also, I don't see 'nc_spm_08' or 'spearfish60'.

9
  • What if you navigate to /home/me/? grassdata is the LOCATION. The folders within are the MAPSETS.
    – mankoff
    Commented Feb 21, 2018 at 21:20
  • Hmm, when I select 'browse', then navigate to /home/me, and then choose 'grassdata', I receive that error. As mentioned in my post, if I go to the file system in look in the 'grassdata' folder, I have 3 folders, and 3 files.
    – gil_happy
    Commented Feb 21, 2018 at 21:24
  • Don't choose "grassdata". Choose "me".
    – mankoff
    Commented Feb 22, 2018 at 6:23
  • Thank you 'mankoff'! Ugh, no wonder the most basic step didn't work - the tutuorial or Wiki is incorrect. I no longer receive the error.
    – gil_happy
    Commented Feb 22, 2018 at 17:15
  • I want to download the the US Zip boundaries from the US Census Bureau (map with all of the US zip codes mapped out) Here is the link: census.gov/geo/maps-data/data/tiger.html Do I need? TIGER/Line Shapefiles - New 2017 Shapefile or Cartographic Boundary Shapefiles When I download and extract either of them, it seems like there a number of files (cpg, dbf, prj, shp, xml, shx) and when I put all of those files into Grass 7 (into the /home/me/grassdata), I'm getting the same error as originally reported even after selecting the 'me' directory as mentioned by 'mankoff'
    – gil_happy
    Commented Feb 22, 2018 at 17:17

1 Answer 1

1

(I'm graduating my comments to a full answer)

Here's the procedure:

  1. First delete the grassdata directory. (Make sure you have first moved all the components of the shapefile to somewhere else)
  2. Now recreate that directory.
  3. Unzip the nc_spm zip file into that new directory. BTW, you can also use a smaller subset of that data "nc_spm_basic", downloaded from here. Since this location will only be used for demos, you can begin with the subset. Later, if you want to go thru all the fancy examples, you can choose to download the full nc_spm.
  4. Start GRASS, and select the directory /home/me/grassdata as the GRASS database directory. You should then see the nc_spm location in the left window, and the two mapsets user1 and PERMANENT in the right. Choose user1, and then try some of the GRASS modules to get a feel.
  5. Now TIGER: The shapefiles are in a different coordinate system (Long/Lat with the NAD83 datum) from the North Caroline demo location. So you must create a new location. Close and restart GRASS, and in the initial window click the "New" button in the center to create a new location. In the New Location window you type in a name, such as "TIGER". Then in the next window choose to "Read projection and datum from a georeferenced file". Click next then browse to where you downloaded and unzipped the TIGER data. (again NOT in the grassdata directory). Select the file with the *.shp extension.
  6. You will then get a window suggesting to import the shapefile into this new location. You can click Yes, then (when it finishes importing) click "Start GRASS Session". You are now in a GRASS session, running under the TIGER location and PERMANENT mapset.
  7. You will now have, beneath the grassdata directory two subdirs: nc_spm, and TIGER. Under the TIGER directory you will see PERMANENT. That's the mapset that contains the imported layers. All of the files and directories under "grassdata" and handled internally by GRASS. So there's no need to touch anything there. Just use the various GRASS import commands to get shapefiles into GRASS.
  8. Last comment: Shapefiles, and all other spatial data can be imported only into a location/mapset with a matching coordinate system. So you'll import into the TIGER location only data that is referenced in Long/Lat NAD83 (AKA epsg code: 4369).
  9. To actually display the map layers, shift to the "Data" tab in the Layer Manager window and right-click -> Display layer. Then, in case your region settings are not correct, go back to the Layers tab, right-click -> Zoom to Selected map.

HTH

10
  • regarding #8: Don't r.import and v.import work with non-matching coordinate systems? It is the other commands (e.g. r.in.gdal and v.in.ogr) that require the data to match the LOCATION.
    – mankoff
    Commented Feb 25, 2018 at 16:10
  • Thank you so much for this info Micha... I couple of things: - for step 3, I figured out why I could not select /home/me/grassdata. I need the following directory structure: /home/me/grassdata/nc_basic_spm_grass7 with all of the files in the nc_basic_spm_grass7. Before, I just put all of the files into /home/me/grassdata without creating a nc_basic_spm_grass7 directory.
    – gil_happy
    Commented Feb 25, 2018 at 20:55
  • - in step 4, once I click on 'Start GRASS session', 2 windows open; one that has a layers, console, modules, data, and python tab at the bottom of the screen (layer manager) and then another window that has zoom icons, vector items, etc (GIS Map Display). I don't see any type of map in either window.
    – gil_happy
    Commented Feb 25, 2018 at 20:55
  • - I then appear to successfully complete step 5 and step 6. Again, once I select 'Start Grass Session' in step 6, 2 windows open again - one window is GRASS GIS Layer Manager that has 5 tabs at the bottom (Layers, Console, Modules, Data, Python), the second window - GRASS GIS Map Display TIGER/PERMANENT. Again, same as I mentioned in step 4, I don't see any type of map in either window at this stage either.
    – gil_happy
    Commented Feb 25, 2018 at 20:56
  • - For step 7, you say I should see 2 sub directories below the 'grassdata' directory. When or where should I see this? As a reminder, I still have the 2 open windows from step 6. Do I need to close GRASS open and then reopen it see the the 2 listed folders? If the answer is 'yes', will this affect my import from step 5? Thank you
    – gil_happy
    Commented Feb 25, 2018 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.