For those potential GI users who are too busy to learn GIS skills but need to know where those boundaries are, this could be the answer for you. Through a simple leaflet map we can connect directly into our spatial data in PostgreSQL/PostGIS data with 'R' and 'Shiny'. For more information click the link.
In the example below we are going to install 'RStudio-Server' on an Ubuntu 18.04 LTS server in order to run an 'R' script although I could just as easily have created this script using any other IDE or text editor if preferred. 'RStudio' is a complete environment for prototyping web apps (known as 'Shiny' apps) which allow the user to interact with the data imported from various sources for example to look into changes over a ten year timescale interactively from an excel spreadsheet.
'RStudio-Server' is a free and open-source integrated development environment (IDE) for R, a programming language for primarily statistical computing, graphics and mapping analysis (it is a full gis with input, analysis and output 'packages' utilising many of our familiar OSGEO libraries used in QGIS, SAGA, GRASS, i.e. GDAL, PROJ4, GEOS etc but more focused on statistical and web output).
The 'RStudio' Interface, 'script' top left, 'console' lower left and 'output' lower right.
I admit here that I am not a developer or coder but it is really easy to pick up once you get started. A great tool for fast prototyping. There is also an interesting discussion around 'R Shiny' v 'Power BI' if anyone is interested.
I'd been looking for a tool to get map data stored in a Postgres/PostGIS tables on the web quickly for non traditional GIS users to be able to view the data and for me to be able to modify the code changing features on the fly without having to restart the server.
I never thought I would need a 'to-do' list or a 'note taking' application before. I turn up at meetings with my trusty black pocket book and a pen. How 'old school' I hear you say but I am always late to the party. I signed up to Evernote some years ago but that is as far as I got. Now I cannot stop adding stuff to remember in 'Joplin'. So what is so different about this syncing 'to-do' app (compared to the Evernote free version)?
Evernote has no 'markdown' support. Evernote has no 'end to end' encryption. Evernote has a two device limit. Evernote cannot work offline. Evernote isn't open source.
The name 'Joplin' comes from composer Scott Joplin
"Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organised into notebooks. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in Markdown format.
Notes exported from Evernote via .enex files can be imported into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported.
The notes can be synchronised with various cloud services including Nextcloud, Dropbox, OneDrive, WebDAV or the file system (for example with a network directory). When synchronising the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around.
The application is available for Windows, Linux, macOS, Android and iOS. A Web Clipper, to save web pages and screenshots from your browser, is also available for Firefox and Chrome". Source:-
Create a database and a user for access Replace DATABASE_NAME_HERE and USER_NAME_HERE with the values you want to use. # this will prompt you for a database password...also note the capital letter 'O' not number '0' (zero) below:-
Finally...you can check your terminal output with the one below:-
:~$ sudo apt install -y postgresql postgresql-contrib [sudo] password for xxxx: Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: postgresql-doc The following NEW packages will be installed postgresql postgresql-contrib 0 to upgrade, 2 to newly install, 0 to remove and 27 not to upgrade. Need to get 11.6 kB of archives. After this operation, 127 kB of additional disk space will be used. Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 postgresql all 10+190 [5,784 B] Get:2 http://gb.archive.ubuntu.com/ubuntu bionic/main amd64 postgresql-contrib all 10+190 [5,796B] Fetched 11.6 kB in 0s (101 kB/s) Selecting previously unselected package postgresql. (Reading database ... 399415 files and directories currently installed.) Preparing to unpack .../postgresql_10+190_all.deb ... Unpacking postgresql (10+190) ... Selecting previously unselected package postgresql-contrib. Preparing to unpack .../postgresql-contrib_10+190_all.deb ... Unpacking postgresql-contrib (10+190) ... Setting up postgresql-contrib (10+190) ... Setting up postgresql (10+190) ... :~$ sudo -u postgres createuser -P postgis Enter password for new role: xxxx (your password) Enter it again: xxxx (your password) :~$ sudo -u postgres createdb -O postgis webgis createdb: database creation failed: ERROR: database "webgis" already exists :~$ sudo -u postgres createdb -O postgis polybase :~$ psql -h localhost -U postgis polybase Password for user postgis: psql (10.6 (Ubuntu 10.6-0ubuntu0.18.04.1), server 9.6.8) SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off) Type "help" for help.
:~$ sudo apt install -y postgis postgresql-10-postgis-2.4 Reading package lists... Done Building dependency tree Reading state information... Done postgis is already the newest version (2.4.3+dfsg-4). The following NEW packages will be installed libprotobuf-c1 postgresql-10-postgis-2.4 0 to upgrade, 2 to newly install, 0 to remove and 27 not to upgrade. Need to get 578 kB of archives. After this operation, 1,748 kB of additional disk space will be used. Get:1 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 libprotobuf-c1 amd64 1.2.1-2[19.0 kB] Get:2 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 postgresql-10-postgis-2.4 amd64 2.4.3+dfsg-4 [559 kB] Fetched 578 kB in 0s (2,861 kB/s) Selecting previously unselected package libprotobuf-c1:amd64. (Reading database ... 399421 files and directories currently installed.) Preparing to unpack .../libprotobuf-c1_1.2.1-2_amd64.deb ... Unpacking libprotobuf-c1:amd64 (1.2.1-2) ... Selecting previously unselected package postgresql-10-postgis-2.4. Preparing to unpack .../postgresql-10-postgis-2.4_2.4.3+dfsg-4_amd64.deb ... Unpacking postgresql-10-postgis-2.4 (2.4.3+dfsg-4) ... Setting up libprotobuf-c1:amd64 (1.2.1-2) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up postgresql-10-postgis-2.4 (2.4.3+dfsg-4) ... :~$ sudo -u postgres psql -c "CREATE EXTENSION postgis; CREATE EXTENSION postgis_topology;"polybase ERROR: syntax error at or near "polybase" LINE 1: ...XTENSION postgis; CREATE EXTENSION postgis_topology;polybase ^ :~$ sudo apt install pgadmin4 Reading package lists... Done Building dependency tree Reading state information... Done Package pgadmin4 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source
E: Package 'pgadmin4' has no installation candidate
:~$ sudo apt install pgadmin3 Reading package lists... Done Building dependency tree Reading state information... Done pgadmin3 is already the newest version (1.22.2-4). 0 to upgrade, 0 to newly install, 0 to remove and 27 not to upgrade.
My previous post didn't mention how to setup the Ordnance Survey layers (or any other raster and vector combination) in a single GeoPackage from virtual rasters, so I thought i would elaborate on the 'gdal_translate' part. It's quite easy...you can simply cut and paste this command in Linux or Windows. Remember to substitute with your own paths with your virtual raster layers.
The advantages of the GeoPackage format in QGIS3 are not only speed of map scrolling and zooming but the ability to store (in a database table) your map 'styles' and zoom levels (for vector layers) within when needing to work offline or with Qfield. Also remember that you do not need to include the .vrt extension.
Before you start install and open QGIS 3.0 and then open the 'Browser' and select 'GeoPackage' then right click 'Create database'.
You will then see the panel below. Enter a database name for your new GeoPackage and leave everything else as 'default', then press 'OK'. You should now see a new empty GeoPackage at the location you specified.
Now open the Terminal/Commandline and type the following one layer/block at a time depending on the number of .vrt layers you have.