16

I'm quite new to QGIS and I'm searching for a simple way to create a Database that allows me to use the tables in QGIS and R. I have a lot of data stored in Excel spreadsheets wich will be used for the statistical analysis in R.

My tasks in more detail: My first task will be visiualizing the data by joining the tables to a shapefile. Second I want to make some spatial transformations within QGIS with shapefiles and use the newly created data in my statistical analyse. Therefore I will have to join this data to my database.

Last but not least I wan't to assure that the data is stored in a good way for future analises in QGIS and R since the database will be used in other contexts.

Some tolled me that MS Access is a good way to do so. Can anyone of you give me some advice? Maybe on literature and stuff like that too.

mgri
  • 16,159
  • 6
  • 47
  • 80
Dspanes
  • 1,401
  • 5
  • 17
  • 22

2 Answers2

15

Aside from Spatialite, you might also want to consider PostGIS. Think of it as Spatialite's big brother ;-) It's just another data source for QGIS while you can connect to it using the RODBC package in R.

R.K.
  • 17,405
  • 3
  • 59
  • 110
  • 1
    You can (probably) also get to PostGIS and Spatialite datasets in R using the rgdal package... I say probably because you just need the right drivers. – Spacedman Sep 24 '12 at 14:19
9

Not sure if you will be able to work with MS Access in QGIS (plus I haven't heard about any respectable GIS-project that would use MS databases); MSSQL - is supported (but never tried it myself and never will ;-) ).

Consider possibility to use Spatialite (spatial extension of SQLite). It will be quite suitable to operate Spatialite DB in QGIS and you can easily access Spatialite via R packages: SQLiteMap; RSQlite. This is the recipe I would use for myself.

EDIT: As was mentioned in comments (and I implied it), Spatialite require no server configuration, users administration, etc. And it is easily transportable to another computer by just coping database file.

SS_Rebelious
  • 5,621
  • 3
  • 27
  • 62
  • 5
    +1 Don't use MS Access if you don't really have to. – underdark Sep 24 '12 at 14:26
  • all right. thanks for your repllies. I think i'll try out PostGIS! – Dspanes Sep 24 '12 at 14:50
  • 3
    +1 - Spatialite is a great option - QGIS reads both spatial and non-spatial tables directly, and the RSQLite package in R lets you read sqlite databases.

    Spatialite's great advantage is that you don't need to install and maintain a database - for all the advantages of PostGIS and MySQL, they need rather a lot of setup. The transportable, no-install nature of SQLite is convenient for your own use as well as sharing.

    – Simbamangu Sep 25 '12 at 18:30
  • 1
    Spatialite = No server configuration! You can copy your database and send it to someone without having to connect anyone to a server. – Roy Sep 25 '12 at 18:59