Skip to content

Instantly share code, notes, and snippets.

Avatar

Thomas Guymer Guymer

View GitHub Profile
@Guymer
Guymer / cartopy_example.py
Last active Aug 17, 2020
An example of some basic Cartopy functionality, that is optionally augmented by PyGuymer3 functionality.
View cartopy_example.py
#!/usr/bin/env python3
"""
This example scripts shows you how to do a few simple things using Cartopy. It
assumes a basic knowledge of MatPlotLib. This script has duplicated features too
as it also shows you how I personally choose to augment the Cartopy functions
with my own functions. This is optional and controlled by the "bellsWhistles"
Boolean variable. Finally, there are two functions in this script that contain
the "resolution" keyword which is set to "10m". If you want a cruder, more
jagged, plot that is generated quicker then you should set this to "110m". There
@Guymer
Guymer / example-background-OS-image-raster.py
Last active Aug 17, 2020
script to demonstrate the Raster dataset from the Ordnance Survey
View example-background-OS-image-raster.py
#!/usr/bin/env python3
# Import standard modules ...
import json
import os
# Import special modules ...
try:
import cartopy
import cartopy.crs
@Guymer
Guymer / example-background-OS-image-overview.py
Last active Aug 17, 2020
script to demonstrate the Overview dataset from the Ordnance Survey
View example-background-OS-image-overview.py
#!/usr/bin/env python3
# Import standard modules ...
import json
import os
# Import special modules ...
try:
import cartopy
import cartopy.crs
@Guymer
Guymer / example-background-OS-image-miniscale.py
Last active Aug 17, 2020
script to demonstrate the Miniscale dataset from the Ordnance Survey
View example-background-OS-image-miniscale.py
#!/usr/bin/env python3
# Import standard modules ...
import json
import os
# Import special modules ...
try:
import cartopy
import cartopy.crs
@Guymer
Guymer / raster.json
Created May 22, 2020
JSON output from script to process the Raster dataset from the Ordnance Survey
View raster.json
{
"HP": {
"colour": "raster/colour/HP.png",
"extent": [
400000.0,
500000.0,
1200000.0,
1300000.0
],
"greyscale": "raster/greyscale/HP.png"
@Guymer
Guymer / overview.json
Created May 22, 2020
JSON output from script to process the Overview dataset from the Ordnance Survey
View overview.json
{
"GBOverview": {
"colour": "overview/colour/GBOverview.png",
"extent": [
-649749.9999999999,
1350250.0,
-150250.0,
1449750.0000000005
],
"greyscale": "overview/greyscale/GBOverview.png"
@Guymer
Guymer / miniscale.json
Created May 22, 2020
JSON output from script to process the Miniscale dataset from the Ordnance Survey
View miniscale.json
{
"MiniScale_(mono)_R22": {
"colour": "miniscale/colour/MiniScale_(mono)_R22.png",
"extent": [
0.0,
700000.0000027993,
0.0,
1300000.0000052003
],
"greyscale": "miniscale/greyscale/MiniScale_(mono)_R22.png"
@Guymer
Guymer / background-OS-images-raster.py
Last active Aug 17, 2020
script to process the Raster dataset from the Ordnance Survey
View background-OS-images-raster.py
#!/usr/bin/env python3
# NOTE: I downloaded the "1:250,000 Scale Colour Raster" dataset from the
# Ordnance Survey, see:
# * https://www.ordnancesurvey.co.uk/business-government/products/250k-raster
# This gave me the "ras250_gb.zip" file that is used here.
# Import standard modules ...
import io
import json
@Guymer
Guymer / background-OS-images-overview.py
Last active Aug 17, 2020
script to process the Overview dataset from the Ordnance Survey
View background-OS-images-overview.py
#!/usr/bin/env python3
# NOTE: I downloaded the "GB Overview Maps" dataset from the Ordnance Survey,
# see:
# * https://www.ordnancesurvey.co.uk/business-government/products/gb-overview
# This gave me the "Over_gb.zip" file that is used here.
# Import standard modules ...
import io
import json
@Guymer
Guymer / background-OS-images-miniscale.py
Last active Aug 17, 2020
script to process the Miniscale dataset from the Ordnance Survey
View background-OS-images-miniscale.py
#!/usr/bin/env python3
# NOTE: I downloaded the "MiniScale" dataset from the Ordnance Survey, see:
# * https://www.ordnancesurvey.co.uk/business-government/products/miniscale
# This gave me the "minisc_gb.zip" file that is used here.
# Import standard modules ...
import io
import json
import os
You can’t perform that action at this time.