Skip to content

Instantly share code, notes, and snippets.

@d3netxer
d3netxer / App.js
Created July 29, 2022 17:39
Deck.gl ArcLayer Example
/// app.js
import React, {useState} from 'react';
import DeckGL from '@deck.gl/react';
//import {LineLayer} from '@deck.gl/layers';
import {ArcLayer} from '@deck.gl/layers';
import {Map} from 'react-map-gl';
import mapboxgl from "mapbox-gl"; // This is a dependency of react-map-gl even if you didn't explicitly install it
// add to apply the following fix so that the basemap works in production: https://github.com/visgl/react-map-gl/issues/1266
// eslint-disable-next-line import/no-webpack-loader-syntax
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@d3netxer
d3netxer / Extract_features_from_vector_tiles_publish.ipynb
Created January 31, 2021 23:10
Extracting features from Vector Tiles
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Detailed Description of Layers

Functional Urban Areas (GHS-FUA 2015)

The GHS Functional Urban Areas (GHS-FUA) delineate the spatial entities representing the commuting area of the Urban Centres of 2015. (source: https://ghsl.jrc.ec.europa.eu/ghs_fua.php)

Urban Centers (WB calculation using GHS-POP 2015)

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"cloudformation:Describe*",
"cloudformation:List*",
"cloudformation:Get*",
"cloudformation:CreateStack",
// bbox covers saurimo
[out:csv(::timestamp,::user,::type)][timeout:25][bbox:-9.938605,19.873032,-9.428253,20.916046];
// gather results
(
  way["highway"];
);
// print results
out meta;
>;
// bbox covers saurimo
[out:csv(::timestamp,::user,::type)][timeout:25][bbox:-9.938605,19.873032,-9.428253,20.916046];
// gather results
(
  // query part for: “building”
  way["building"];
  relation["building"];
);
// print results
# - Close port 8080 for inbound networking
# - Edit your local_settings to use proxy /geonode (and not port 8080)
# - Add following to local_settings: AVATAR_GRAVATAR_SSL = True
# - make sure mod_ssl is active: $ a2enmod ssl
# add let´s encrypt repository
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
# install certbot
#from qgis.core import QgsProject,QgsPrintLayout
#https://data.library.virginia.edu/how-to-create-and-export-print-layouts-in-python-for-qgis-3/
import yaml
#envision that this script will use an input yaml file, something like below:
#
# - map1:
# data_dir:
# source_text: |
# source text line 1