Skip to content

Instantly share code, notes, and snippets.

View markgis's full-sized avatar

Mark Baguma Allen markgis

View GitHub Profile
@markgis
markgis / gdal-test.js
Created September 4, 2020 10:49
gdal-next geom error example
const gdal = require('gdal');
const gdalNext = require('gdal-next');
const wkt = "Polygon((311365.00 681925.00, 311370.00 681925.00, 311370.00 681935.00, 311375.00 681935.00, 311375.00 681940.00, 311380.00 681940.00, 311380.00 681950.00, 311385.00 681950.00, 311385.00 681955.00, 311390.00 681955.00, 311390.00 681960.00, 311395.00 681960.00, 311395.00 681970.00, 311400.00 681970.00, 311400.00 681990.00, 311405.00 681990.00, 311405.00 682025.00, 311410.00 682025.00, 311410.00 682030.00, 311405.00 682030.00, 311405.00 682025.00, 311390.00 682025.00, 311390.00 682020.00, 311375.00 682020.00, 311375.00 682015.00, 311360.00 682015.00, 311360.00 682010.00, 311350.00 682010.00, 311350.00 682005.00, 311335.00 682005.00, 311335.00 682000.00, 311320.00 682000.00, 311320.00 681995.00, 311305.00 681995.00, 311305.00 681990.00, 311295.00 681990.00, 311295.00 681985.00, 311280.00 681985.00, 311280.00 681980.00, 311260.00 681980.00, 311260.00 681975.00, 311230.00 681975.00, 311230.00 681970.00, 311225.00 681970.00, 311195.0
@markgis
markgis / open_data_wfs.xml
Created May 7, 2020 13:13
WFS return example
<wfs:member>
<inspire:public_rights_of_ways gml:id="public_rights_of_ways.fid-3456fdf5_171eeca3e0c_1955">
<gml:description>Llwybr troed / Footpath</gml:description>
<gml:boundedBy>
<gml:Envelope srsDimension="2" srsName="urn:ogc:def:crs:EPSG::27700">
<gml:lowerCorner>323812.7743896264 218788.65165482444</gml:lowerCorner>
<gml:upperCorner>324297.22944474395 218957.2134045252</gml:upperCorner>
</gml:Envelope>
</gml:boundedBy>
<inspire:ogc_fid>1429</inspire:ogc_fid>
@markgis
markgis / wms_get_request.txt
Created May 7, 2020 11:38
Simple WMS Geet Request
http://ows.mundialis.de/services/service?
REQUEST=GetMap&SERVICE=WMS
&LAYERS=OSM-WMS
&styles=
&version=1.1.1
&BBOX=-0.21363258,51.45497,-0.17277718,51.478069&SRS=EPSG:4326
&WIDTH=500&HEIGHT=500
&FORMAT=image/png
@markgis
markgis / config.json
Last active April 19, 2020 16:26
OS Zoomstack config for QGIS vector read plugin
{
"tilejson": "2.2.0",
"id": "os-zoom",
"name": "os-zoom",
"description": "OS Zoom Stack",
"minzoom": 0,
"maxzoom": 14,
"version": "1",
"scheme": "xyz",
"type": "overlay",
@markgis
markgis / basic-map-final.html
Last active August 7, 2021 16:24
basic-map-final
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
@markgis
markgis / basic-map-no-mapbox-styles.html
Created April 5, 2020 15:04
basic-map-no-mapbox-styles
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
@markgis
markgis / map-basic-loc-zoom.html
Created April 5, 2020 14:57
map-example-location-zoom
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
@markgis
markgis / map-style-edit.html
Last active April 5, 2020 14:52
first-map-edit
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<style>
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
@markgis
markgis / basic.html
Created April 5, 2020 14:20
Basic Mapbox Example
<script src='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.9.0/mapbox-gl.css' rel='stylesheet' />
<div id='map' style='width: 400px; height: 300px;'></div>
<script>
mapboxgl.accessToken =
'Your toek here';
var map = new mapboxgl.Map({