Skip to content

Instantly share code, notes, and snippets.

View springmeyer's full-sized avatar

Dane Springmeyer springmeyer

View GitHub Profile
In file included from ../fss/node_fss.cpp:20:
../fss/geocoder/fss.hpp:135:31: warning: comparison of integers of different signs: 'const int' and 'size_type'
(aka 'unsigned long') [-Wsign-compare]
if (index < base_dict_.size())
~~~~~ ^ ~~~~~~~~~~~~~~~~~
../fss/node_fss.cpp:349:33: note: in instantiation of member function
'geocoder::fss_engine<geocoder::damerau_levenshtein_distance<std::__1::basic_string<char32_t,
std::__1::char_traits<char32_t>, std::__1::allocator<char32_t> > >,
std::__1::hash<std::__1::basic_string<char32_t, std::__1::char_traits<char32_t>,
std::__1::allocator<char32_t> > > >::search' requested here
@springmeyer
springmeyer / kivalina-lidar-process.sh
Last active October 17, 2022 13:48
processing lidar with liblas and gdal
# depends on liblas built with laszip and ogr support
mkdir -p laz
cd laz
# download from noaa
if [ ! -f 20040805A_ak302_2_000037_p13.laz ]; then
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000037_p13.laz
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000038_p13.laz
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000039_p13.laz
wget http://www.csc.noaa.gov/htdata/lidar1_z/geoid12a/data/23/20040805A_ak302_2_000040_p13.laz

UPDATE: The Vector Tiles are not being served at this time by Openstreetmap. Try later or a different provider (example) Services seem to have resumed

A simple test of extending the L.TileLayer to fetch geoJSON tiles from openstreetmap and render them with d3. This is probably not the most efficient way to do this, as we accept empty image tags (from the standard TileLayer) and use them as containers for the data/requests.

@springmeyer
springmeyer / open-streets-dc.xml.diff
Created June 14, 2013 19:18
diff between carto v0.9.3 produced xml (the version included in last TileMill 0.10.1 release) and master carto at ff0fc2b1c82ac37953480ea86242268d94bac456 https://github.com/mapbox/carto/issues/247
--- v0.9.3.xml 2013-06-14 12:16:29.000000000 -0700
+++ m.xml 2013-06-14 12:15:44.000000000 -0700
@@ -3235,12 +3235,6 @@
<Rule>
<MaxScaleDenominator>750000</MaxScaleDenominator>
<MinScaleDenominator>100000</MinScaleDenominator>
- <Filter>([type] = 'trunk_link') and ([tunnel] = 1)</Filter>
- <LineSymbolizer stroke="#f56544" stroke-linecap="butt" stroke-dasharray="6, 3" stroke-linejoin="round" stroke-width="0" />
- </Rule>
- <Rule>
@springmeyer
springmeyer / mapnik-ios-sdk.md
Last active December 22, 2015 14:26
Setup Mapnik iOS SDK v2.2.0

Setup and Test Mapnik iOS SDK v2.2.0

First set up a project directory to hold your work:

cd ~/projects
mkdir mapnik-ios-test
cd mapnik-ios-test
@springmeyer
springmeyer / ios-v2.2.0.diff
Created June 4, 2013 22:38
patch for mapnik iOS build/cross compile against v2.2.0
diff --git a/SConstruct b/SConstruct
index d581389..e3deac7 100644
--- a/SConstruct
+++ b/SConstruct
@@ -448,7 +448,8 @@ pickle_store = [# Scons internal variables
'SVG_RENDERER',
'SQLITE_LINKFLAGS',
'BOOST_LIB_VERSION_FROM_HEADER',
- 'BIGINT'
+ 'BIGINT',
@springmeyer
springmeyer / cairo-osx-mapnik-v2.2.0-crash.txt
Created June 4, 2013 16:36
cairo-osx-mapnik-v2.2.0-crash.txt
Process: Python [40569]
Path: /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.2 (2.7.2)
Code Type: X86-64 (Native)
Parent Process: sh [40568]
User ID: 501
PlugIn Path: /Users/USER/*/Mapnik.framework/unix/lib/python2.6/site-packages/cairo/_cairo.so
PlugIn Identifier: _cairo.so
@springmeyer
springmeyer / font_engine_freetype.diff
Last active December 18, 2015 00:19
loading font from memory stream
diff --git a/src/font_engine_freetype.cpp b/src/font_engine_freetype.cpp
index 5f14544..a579989 100644
--- a/src/font_engine_freetype.cpp
+++ b/src/font_engine_freetype.cpp
@@ -30,6 +30,7 @@
#include <mapnik/pixel_position.hpp>
#include <mapnik/font_util.hpp>
#include <mapnik/util/fs.hpp>
+#include <mapnik/utils.hpp>
@springmeyer
springmeyer / test-mapnik-v2.2.0-unix.md
Last active December 17, 2015 18:18
Test Mapnik 2.2.0 release candidate for unix systems
diff --git a/src/agg/agg_renderer.cpp b/src/agg/agg_renderer.cpp
index f3e6cea..0afa940 100644
--- a/src/agg/agg_renderer.cpp
+++ b/src/agg/agg_renderer.cpp
@@ -337,7 +337,9 @@ void agg_renderer<T>::render_marker(pixel_position const& pos,
renderer_type,
pixfmt_comp_type> svg_renderer(svg_path,
(*marker.get_vector_data())->attributes());
-
+ // https://github.com/mapnik/mapnik/issues/1316