Skip to content

Instantly share code, notes, and snippets.

Mike Taves mwtoews

Block or report user

Report or block mwtoews

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
View lwrandom.c
/**********************************************************************
*
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.net
*
* PostGIS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
@mwtoews
mwtoews / testlwrandom.c
Created Jan 31, 2019
test portability of PRNG
View testlwrandom.c
/**********************************************************************
*
* PostGIS - Spatial Types for PostgreSQL
* http://postgis.net
*
* PostGIS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
@mwtoews
mwtoews / testlwrandom.out
Created Jan 31, 2019
output from testlwrandom.c
View testlwrandom.out
TEST10
R8_UNI computes pseudorandom values.
Two seeds, S1 and S2, are used.
R S1 S2
12345 34567
0.575025 493972830 1406600364
0.945577 390105768 506978341
View digital_root.py
import re
all = set(range(1, 10))
good = set([1, 4, 7])
bad = set([3, 6, 9])
neutral = set([2, 8, 5])
re_digits = re.compile(r'([\d\:\.\,]+)')
re_digit = re.compile(r'\d')
View fortran_makefile_dependencies.py
# -*- coding: utf-8 -*-
import os
import re
re_fn = re.compile(r'(.+?\.)(f|for|f90|fpp)$')
# sdir = '/home/mwtoews/src/GWM-2005/src'
sdir = '.'
fn_lines = {}
View osr_result_p27_win64.txt
opening C:\Program Files\GDAL\gdal-data\cubewerx_extra.wkt
opening C:\Program Files\GDAL\gdal-data\ecw_cs.wkt
opening C:\Program Files\GDAL\gdal-data\epsg.wkt
including: C:\Program Files\GDAL\gdal-data\esri_extra.wkt
opening C:\Program Files\GDAL\gdal-data\esri_extra.wkt
including: C:\Program Files\GDAL\gdal-data\cubewerx_extra.wkt
opening C:\Program Files\GDAL\gdal-data\cubewerx_extra.wkt
opening C:\Program Files\GDAL\gdal-data\esri_extra.wkt
opening C:\Program Files\GDAL\gdal-data\esri_StatePlane_extra.wkt
opening C:\Program Files\GDAL\gdal-data\esri_Wisconsin_extra.wkt
View osr_results_centos.txt
opening /amp/gw/sw/share/gdal/cubewerx_extra.wkt
opening /amp/gw/sw/share/gdal/ecw_cs.wkt
opening /amp/gw/sw/share/gdal/epsg.wkt
including: /amp/gw/sw/share/gdal/esri_extra.wkt
opening /amp/gw/sw/share/gdal/esri_extra.wkt
including: /amp/gw/sw/share/gdal/cubewerx_extra.wkt
opening /amp/gw/sw/share/gdal/cubewerx_extra.wkt
opening /amp/gw/sw/share/gdal/esri_extra.wkt
opening /amp/gw/sw/share/gdal/esri_StatePlane_extra.wkt
opening /amp/gw/sw/share/gdal/esri_Wisconsin_extra.wkt
View osr_roundtrips.py
#!/usr/bin/env python
import os
import difflib
import subprocess
from osgeo import gdal
from osgeo import osr
from glob import glob
gdal.UseExceptions()
osr.UseExceptions()
View ST_RedistributeVertices.sql
CREATE OR REPLACE FUNCTION ST_RedistributeVertices(
geom geometry,
distance double precision,
null_for_small boolean DEFAULT false)
RETURNS geometry AS $body$
DECLARE
perimeter numeric;
num_vert integer;
You can’t perform that action at this time.