Skip to content

Instantly share code, notes, and snippets.

@schwehr
schwehr / topo30_stats.ipynb
Created June 15, 2013 20:39
altitude (negative depth) histogram for the earth from the Sandwell et al. topo30
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
diff -ruN --exclude=.svn mb-system.orig/configure.in mb-system/configure.in
--- mb-system.orig/configure.in 2013-06-15 15:35:31.000000000 -0700
+++ mb-system/configure.in 2013-06-16 08:47:02.000000000 -0700
@@ -104,6 +104,13 @@
AC_ARG_WITH(otps_dir, [ --with-otps_dir=DIR Location of OSU Tidal Prediction Software], [OTPS_DIR=${withval}])
AC_SUBST(OTPS_DIR)
+AC_MSG_CHECKING([whether to build with Generic Sensor Format (GSF)])
+AC_ARG_WITH([gsf], AS_HELP_STRING([--without-gsf], [Disable unlicensed SAIC Generic Sensor Format (GSF)]), [ ], [with_gsf=yes])
+AC_MSG_RESULT([$with_gsf])
@schwehr
schwehr / gdal-1.10.0.info
Created June 17, 2013 04:52
Does not yet build with libspatialite on mac osx 10.8
Info3: <<
# FIX: bring back mysql when packaged
# FIX: add libkml support... package libkml
# FIX: Can we add any of these? LIBLZMA, xerces-c, GEORASTER, EPSILON, PCRaster, NAS, DODS, DWG, Poppler, OpenCL
Package: gdal%type_pkg[pgsql]
#Package: gdal%type_pkg[pgsql]%type_pkg[mysql]
Type: pgsql (. -pgsql)
#Type: pgsql (. -pgsql), mysql (. -mysql)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / mbsystem-const-demo.diff
Created February 19, 2014 17:29
What it takes to make a parameter const for a function. You must edit (at a minimum) both the function prototype and function definition. Here, I am making the verbose argument const.
svn diff mb_define.h mb_defaults.c
Index: mb_define.h
===================================================================
--- mb_define.h (revision 2165)
+++ mb_define.h (working copy)
@@ -315,7 +315,7 @@
#define MB_PROJECTION_PROJECTED 1
/* MBIO core function prototypes */
-int mb_defaults(int verbose, int *format, int *pings,
@schwehr
schwehr / cheetah3-start.diff
Created April 1, 2014 13:20
first couple changes to start cheetah towards python 3.4
diff --git a/SetupConfig.py b/SetupConfig.py
index 5620416..60bfb8d 100644
--- a/SetupConfig.py
+++ b/SetupConfig.py
@@ -14,8 +14,8 @@ packages = ['Cheetah',
'Cheetah.Tools',
'Cheetah.Utils',
]
-classifiers = [line.strip() for line in '''\
- #Development Status :: 4 - Beta
@schwehr
schwehr / states_fiona_shapely.ipynb
Created May 28, 2014 16:36
make a graph of adjacency of states in the United States
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@schwehr
schwehr / gist:7f1509c95f7acf7496ed
Last active August 29, 2015 14:14
libais + gpsd mangled output - fields that are strings
import json
msg = json.loads(
'{"class": "AIS", "device": "stdin", "libais_rot": 0.0, "spare": 0, '
'"raim": false, "mmsi": 412371205, "libais_special_manoeuvre": 0, '
'"maneuver": 0, "status": "15", "repeat": 0, "lat": -45.66791915893555, '
'"heading": 354, "libais_true_heading": 354, "libais_nav_status": 15, '
'"status_text": "Not defined", "turn": 0.0, "libais_mmsi": 412371205, '
'"libais_raim": false, "libais_x": -60.606895446777344, '
'"received_stations": 37, "speed": 0.5, "libais_rcvr": "rORBCOMM103", '
'"libais_rot_over_range": false, "course": 248.0, "scaled": true, '
@schwehr
schwehr / gist:757bae6bd28d9a7ffc4d
Created February 10, 2015 19:02
gdal 1.11.2 RC2 tests on mac osx 10.9 with fink - failures
grep -i fail results | grep TEST
TEST: ogr_cartodb_init ... HTTP service for https://gdalautotest2.cartodb.com is down (HTTP Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581))
TEST: ogr_shape_68 ... Fails on MacOSX. Not sure why.
TEST: ogr_wfs_deegree_wfs200 ... gml_id = 'SGID024_MUNICIPALITIES2004_EDITED_5' filter failed
TEST: gdal_api_proxy_3 ... Fails on MacOSX ('ERROR 1: posix_spawnp() failed'. Not sure why.
TEST: ecrgtoc_online_1 ... HTTP service for http://www.falconview.org/trac/FalconView/downloads/17 is down (HTTP Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581))
TEST: http_4 ... fail
TEST: jpeg_1 ... fail
TEST: jpeg2000_8 ... fail
TEST: lcp_17 ... expected_fail
@schwehr
schwehr / gist:c9e9fb595d0370e7eff7
Created February 12, 2015 19:50
gdal 1.11.2 RC2 on mac osx 10.9 with fink
Running tests from ogr/ogr_arcgen.py
TEST: ogr_arcgen_points ... success
TEST: ogr_arcgen_points25d ... success
TEST: ogr_arcgen_lines ... success
TEST: ogr_arcgen_lines25d ... success
TEST: ogr_arcgen_polygons ... success
TEST: ogr_arcgen_polygons25d ... success
Running tests from ogr/ogr_as_sqlite_extension.py
Running tests from ogr/ogr_avc.py
TEST: ogr_avc_1 ... success