Skip to content

Instantly share code, notes, and snippets.

Alexander Salveson Nossum alexanno

Block or report user

Report or block alexanno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alexanno
alexanno / printing_python_qgis.py
Created Mar 8, 2015
Printing with Python and QGIS
View printing_python_qgis.py
#http://kartoza.com/how-to-create-a-qgis-pdf-report-with-a-few-lines-of-python/
# coding=utf-8
# A simple demonstration of to generate a PDF using a QGIS project
# and a QGIS layout template.
#
# This code is public domain, use if for any purpose you see fit.
# Tim Sutton 2015
View sublime-oppsett.md

sourcetree, node, npm, webpack -g, eslint -g

sublime

  • package manager
  • sublime config
  • Babel, SublimeLinter og SublimeLinter-contrib-eslint

package.json .eslintrc

View index.html
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- Include css for: bootstrap, wa-search -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link rel="stylesheet" href="http://www.webatlas.no/mediakart/static/maps/eiendomsskatt/eiendomsskatt.min.css"/>
View a.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexanno
alexanno / NTNU - postgis-kurs
Last active Apr 13, 2016
NTNU kurs i postgis / cartodb
View NTNU - postgis-kurs
Introduksjon
-------
* NORKART
* https://vimeo.com/92617228
* Webinar:
* http://www.norkart.no/kurs/gratis-webinar-laer-alt-du-vil-vite-om-fme-og-open-source-27/
* http://www.norkart.no/kurs/gratis-webinar-cartodb-og-mediakart-3/
* Sommerjobb i Trondheim
* Utvikler - JS, HTML, PostGIS, linux/devop
View wms leaflet
var globalCartoDB_SQL_Layer = null;
$("#btn_runquery").click(function() {
var query = $("#sqlcommand").text();
var cartocss = $("#cartocss").text();
runSQL_API(query);
updatemap(query, cartocss);
})
function createMap() {
View sql-notater.sql
-- http://overpass-turbo.eu/
-- https://gist.github.com/atlefren/60234fb68d8299136c05
-- http://www.norkart.no/produkt/datavarehus/
-- toalett og kommunekart
SELECT
f.cartodb_id,
f.the_geom_webmercator,
f.the_geom,
View webinar-01.04.16
Klippe raster til et polygon for visning
* Du har en WMS
** Eksporter det område du vil ha som geotiff
*** Save as image (rimelig ok oppløsning)
*** Print composer (~300dpi)
** Last inn igjen og sett projeksjonen eksplisitt (raster-projection-assign projection)
* Finn frem favorittpolygonet ditt
** Eller tegn på frihånd et scratch layer
View cartodb-json-flattener.sql
SELECT *,
(select string_agg(value->>'tekstfelt',', ') a from
json_array_elements(tekstfelt::json) m) tekstfelt_streng
FROM mellomlag m
@alexanno
alexanno / cartodb-kurs-nmbu.md
Last active Feb 3, 2016
Kurs og bedriftspresentasjon for NMBU 3. februar 2016
View cartodb-kurs-nmbu.md
You can’t perform that action at this time.