Connect to your database, example using psql command line
\connect mydb
then install extensions
#!/bin/bash | |
# setup repository | |
sudo wget -qO- http://apt.opengeo.org/gpg.key | apt-key add - | |
sudo chmod 655 /etc/apt/sources.list | |
sudo echo "deb http://apt.opengeo.org/ubuntu lucid main" >> /etc/apt/sources.list | |
sudo chmod 644 /etc/apt/sources.list | |
sudo apt-get update | |
# install opengeo suite |
#LiveCD on the commandline | |
#https://help.ubuntu.com/community/LiveCDCustomization | |
#DIR=`dirname ${0}` | |
#VERSION=`cat "$DIR"/../VERSION.txt` | |
VERSION="6.0beta6" | |
PACKAGE_NAME="osgeo-live" | |
ISO_NAME="${PACKAGE_NAME}-${VERSION}" | |
sudo apt-get install squashfs-tools genisoimage |
# code used for the following map : http://datagistips.blogspot.fr/ | |
library(raster) | |
library(rgdal) | |
library(rgeos) | |
clc = raster("DATAS/CLC12_RIDF_RGF.tif") # here is the 200m Corine Land Cover GeoTiff | |
reg = readOGR("DATAS", "idf_geofla") # ile de france GéoFla Departments | |
# RECLASS |
#!/bin/bash | |
# source: https://gist.github.com/francoisromain/e28069c18ebe8f3244f8e4bf2af6b2cb | |
# and another script to create the directories deleted by this script | |
# project-create.sh: https://gist.github.com/francoisromain/58cabf43c2977e48ef0804848dee46c3 | |
# Call this file with `bash ./project-delete.sh project-name` | |
# - project-name is mandatory | |
# This will delete 4 directories |
cd %USERPROFILE% | |
REM create the venv | |
C:\Python33\python.exe C:\Python33\Tools\Scripts\pyvenv.py %USERPROFILE%\venv | |
REM download get-pip.py and distribute_setup.py | |
powershell.exe -Command (new-object System.Net.WebClient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py','%USERPROFILE%\get-pip.py') | |
import os | |
import json | |
from pathlib import Path | |
from urllib.parse import urljoin | |
import jsonschema | |
def add_local_schemas_to(resolver, schema_folder, base_uri, schema_ext='.schema.json'): | |
''' Add local schema instances to a resolver schema cache. | |
# This must be run with Administrator privileges in order to set environment variables | |
# http://code.activestate.com/recipes/55993/, Wolfgang Strobl | |
import _winreg | |
import sys | |
import traceback | |
import win32gui | |
import win32api | |
# this ensures that changes propagate immediately |
rem Assumes visual studio build tools installed | |
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat | |
conda activate <env name> | |
conda install -c conda-forge gdal | |
rem Uninstalling pre-installed python bindings to show that we can compile ourselves | |
pip uninstall gdal | |
rem Set environment variables | |
set INCLUDE=C:\<conda install location>\envs\<env name>\Library\include;%INCLUDE% |