38 |
39 |
40 |
41 |
42 |
43 |
44 |
120 |
121 |
122 | {% endhighlight %}
123 |
--------------------------------------------------------------------------------
/code_samples/isobands-tooltip.html:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/code_samples/isobands.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/code_samples/isolines-labels-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing with labels"
4 | ---
5 | Drawing isolines with labels
6 | ----------------------------
7 | Canvas example from the [drawing isolines]({{ site.baseurl }}{% post_url 2016-12-13-isolines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
124 |
125 |
126 |
127 | {% endhighlight %}
128 |
--------------------------------------------------------------------------------
/code_samples/isolines-labels-svg-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing with labels"
4 | ---
5 | Drawing isolines with labels
6 | ----------------------------
7 | SVG example from the [drawing isolines]({{ site.baseurl }}{% post_url 2016-12-13-isolines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
137 |
138 |
139 | {% endhighlight %}
140 |
--------------------------------------------------------------------------------
/code_samples/isolines-labels-svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
127 |
128 |
129 |
--------------------------------------------------------------------------------
/code_samples/isolines-labels.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/code_samples/isolines-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing isolines"
4 | ---
5 | Drawing isolines
6 | ----------------
7 | Canvas example from the [drawing isolines]({{ site.baseurl }}{% post_url 2016-12-13-isolines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
85 |
86 |
87 | {% endhighlight %}
88 |
--------------------------------------------------------------------------------
/code_samples/isolines-svg-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing isolines"
4 | ---
5 | Drawing isolines
6 | ----------------
7 | SVG example from the [drawing isolines]({{ site.baseurl }}{% post_url 2016-12-13-isolines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
84 |
85 |
86 | {% endhighlight %}
87 |
--------------------------------------------------------------------------------
/code_samples/isolines-svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/code_samples/isolines.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
74 |
75 |
76 |
--------------------------------------------------------------------------------
/code_samples/raster-interpolation-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing GeoTIFF pixels"
4 | ---
5 | Drawing GeoTIFF pixels
6 | --------------------------
7 | Example from the [drawing raster data]({{ site.baseurl }}{% post_url 2016-12-07-drawing-raster-data %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
140 |
141 |
142 | {% endhighlight %}
143 |
--------------------------------------------------------------------------------
/code_samples/raster-interpolation-projected.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
162 |
163 |
164 |
--------------------------------------------------------------------------------
/code_samples/raster-interpolation.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
129 |
130 |
131 |
--------------------------------------------------------------------------------
/code_samples/raster-pixels-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing GeoTIFF pixels"
4 | ---
5 | Drawing GeoTIFF pixels
6 | --------------------------
7 | Example from the [drawing raster data]({{ site.baseurl }}{% post_url 2016-12-07-drawing-raster-data %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
17 |
18 |
19 |
20 |
21 |
22 |
125 |
126 |
127 | {% endhighlight %}
128 |
--------------------------------------------------------------------------------
/code_samples/raster-pixels.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/code_samples/raster-streamlines.min.js:
--------------------------------------------------------------------------------
1 | // raster-streamlines Version 0.0.1. Copyright 2016 Roger Veciana i Rovira.
2 | !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.rastertools=t.rastertools||{})}(this,function(t){"use strict";function e(t,e){if(t.length<=1||e.length<=1||t[0].length<=1||e[0].length<=1)throw new Error("Raster is too small");this.uData=t,this.vData=e,this.usedPixels=[];for(var a=0;a
=this.usedPixels[0].length||e<0||e>=this.usedPixels.length)return!1;for(var h=-a;h<=a;h++)for(var i=-a;i<=a;i++)if(e+i>=0&&e+i=0&&t+h=0&&o=0&&r=this.uData[0].length||r>=this.uData.length||this.usedPixels[Math.floor(r)][Math.floor(o)])break;l.push([o,r]),i=!0,this.usedPixels[Math.floor(r)][Math.floor(o)]=!0}for(o=t,r=e;o>=0&&o=0&&r=this.uData[0].length||r>=this.uData.length||this.usedPixels[Math.floor(r)][Math.floor(o)])break;l.unshift([o,r]),i=!0,this.usedPixels[Math.floor(r)][Math.floor(o)]=!0}return!!i&&(this.usedPixels[e][t]=!0,l)},e.prototype.applyGeoTransform=function(t,e){for(var a=[],h=0;h
10 |
11 | {% highlight js %}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
95 |
96 |
97 | {% endhighlight %}
98 |
--------------------------------------------------------------------------------
/code_samples/streamlines-arrows-svg-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing streamlines with arrows"
4 | ---
5 | Drawing streamlines with arrows
6 | -------------------------------
7 | SVG example from the [drawing streamlines]({{ site.baseurl }}{% post_url 2016-12-13-streamlines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
96 |
97 |
98 | {% endhighlight %}
99 |
--------------------------------------------------------------------------------
/code_samples/streamlines-arrows-svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/code_samples/streamlines-arrows.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
84 |
85 |
86 |
--------------------------------------------------------------------------------
/code_samples/streamlines-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing streamlines"
4 | ---
5 | Drawing streamlines
6 | -------------------
7 | Example from the [drawing streamlines]({{ site.baseurl }}{% post_url 2016-12-13-streamlines %}) section.
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
84 |
85 |
86 | {% endhighlight %}
87 |
--------------------------------------------------------------------------------
/code_samples/streamlines.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
73 |
74 |
75 |
--------------------------------------------------------------------------------
/code_samples/swiss-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Swiss data"
4 | ---
5 |
6 | The data from the Swiss region used in some examples is taken from two sources.
7 |
8 | DEM
9 | ---
10 |
11 | The [SRTM page offers the interface](http://srtm.csi.cgiar.org/SELECTION/inputCoord.asp
12 | ) to select the zone. In this case, the zones are *srtm_38_03* and *srtm_39_03*.
13 |
14 | To merge the zones and downscaling the resulting image, I resulting
15 |
16 | gdalwarp -te 5.7 45.7 10.7 47.9 -ts 1000 0 *tif swiss.tiff
17 |
18 | Which will create a width=1000 pixels image.
19 |
20 | Contour
21 | -------
22 |
23 | The border of switzerland is taken from this project: https://github.com/interactivethings/swiss-maps
24 |
25 | Clone the project and run:
26 |
27 | make topo/ch-country.json REPROJECT=true
28 |
--------------------------------------------------------------------------------
/code_samples/swiss.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/code_samples/swiss.tiff
--------------------------------------------------------------------------------
/code_samples/tz850.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/code_samples/tz850.tiff
--------------------------------------------------------------------------------
/code_samples/vardah.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Vardah cyclone file"
4 | ---
5 |
6 | vardah.tiff
7 | -----------
8 |
9 | vardah.tiff is the GFS model output for 12-des-2016, the day that [Vardah cyclone](https://en.wikipedia.org/wiki/Cyclone_Vardah) made landfall in India.
10 |
11 | This data is used in some examples, and was taken from: http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2016121200/
12 |
13 | Using gdalinfo I got the bands of interest, but, since the pressure is at the land surface, not corrected to the sea level, which is the common data to see, I made this small script to get the fields:
14 |
15 | {% highlight python %}
16 | import gdal
17 | import osr
18 | ds = gdal.Open("gfs.t00z.sfluxgrbf00.grib2")
19 | gph = ds.GetRasterBand(84).ReadAsArray()
20 | press = ds.GetRasterBand(54).ReadAsArray() / 100
21 | temp = ds.GetRasterBand(52).ReadAsArray()
22 | u = ds.GetRasterBand(50).ReadAsArray()
23 | v = ds.GetRasterBand(51).ReadAsArray()
24 |
25 | corr_press = press * (1 - (0.0065*gph/(0.0065*gph + temp + 273.15)))**-5.257
26 |
27 | driver = gdal.GetDriverByName('GTiff')
28 | outRaster = driver.Create("/tmp/vardah.tiff", ds.RasterXSize, ds.RasterYSize, 4, gdal.GDT_Float32)
29 | outRaster.SetGeoTransform(ds.GetGeoTransform())
30 |
31 | outband = outRaster.GetRasterBand(1)
32 | outband.WriteArray(corr_press)
33 | outband.SetMetadata({'name': 'press'})
34 |
35 | outband = outRaster.GetRasterBand(2)
36 | outband.WriteArray(temp)
37 | outband.SetMetadata({'name': 'temp'})
38 |
39 | outband = outRaster.GetRasterBand(3)
40 | outband.WriteArray(u)
41 | outband.SetMetadata({'name': 'u'})
42 |
43 | outband = outRaster.GetRasterBand(4)
44 | outband.WriteArray(v)
45 | outband.SetMetadata({'name': 'v'})
46 |
47 | outRasterSRS = osr.SpatialReference()
48 | outRasterSRS.ImportFromEPSG(4326)
49 | outRaster.SetProjection(outRasterSRS.ExportToWkt())
50 | outband.FlushCache()
51 |
52 | {% endhighlight %}
53 |
54 | Finally, runned
55 |
56 | gdal_translate -projwin 70 20 92 4 /tmp/gfs.tiff /tmp/vardah.tiff
57 |
58 | To clip the image around the cyclone and decrease the file size.
59 |
--------------------------------------------------------------------------------
/code_samples/vardah.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/code_samples/vardah.tiff
--------------------------------------------------------------------------------
/code_samples/wind-arrows-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing wind arrows"
4 | ---
5 | Drawing wind arrows
6 | -------------------
7 | Canvas example from the [arrows and barbs]({{ site.baseurl }}{% post_url 2016-12-11-arrows-and-barbs %}) section. The data and the code are based on this [wind barbs example]({{ site.baseurl }}/code_samples/wind-barbs-page.html).
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
118 |
119 |
120 | {% endhighlight %}
121 |
--------------------------------------------------------------------------------
/code_samples/wind-arrows-svg-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing wind arrows"
4 | ---
5 | Drawing wind arrows
6 | --------------------------
7 | SVG example from the [arrows and barbs]({{ site.baseurl }}{% post_url 2016-12-11-arrows-and-barbs %}) section. The data and the code are based on this [wind barbs example]({{ site.baseurl }}/code_samples/wind-barbs-svg-page.html).
8 |
9 |
10 |
11 | {% highlight js %}
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
105 |
106 | {% endhighlight %}
107 |
--------------------------------------------------------------------------------
/code_samples/wind-arrows-svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
94 |
95 |
--------------------------------------------------------------------------------
/code_samples/wind-arrows.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
107 |
108 |
109 |
--------------------------------------------------------------------------------
/code_samples/wind-barbs-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing wind barbs"
4 | ---
5 | Drawing wind barbs
6 | --------------------------
7 | Canvas example from the [arrows and barbs]({{ site.baseurl }}{% post_url 2016-12-11-arrows-and-barbs %}) section.
8 |
9 | The data is taken from the GFS model, following these steps:
10 |
11 | * Download at a link like this one (dates may not be available): http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2016112400/
12 | * Running *gdalinfo gfs.t00z.sfluxgrbf00.grib2*, see that the bands 50 and 51 are UGRD and VGRD at 10-HTGL (surface wind)
13 | * Run *gdal_translate -b 50 -b 51 -projwin 17 50 47 29 gfs.t00z.sfluxgrbf00.grib2 /tmp/gfs.tiff*
14 | * Note that the [geotiff-js](https://github.com/constantinius/geotiff.js) library has some problems with compression
15 | * This image, taken from [weatheronline](http://www.weatheronline.co.uk), shows that the barbs are coherent with other source images
16 |
17 |
18 |
19 |
20 |
21 | {% highlight js %}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
139 |
140 |
141 |
142 | {% endhighlight %}
143 |
--------------------------------------------------------------------------------
/code_samples/wind-barbs-projected.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
156 |
157 |
158 |
--------------------------------------------------------------------------------
/code_samples/wind-barbs-svg-page.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "Drawing wind barbs"
4 | ---
5 | Drawing wind barbs
6 | --------------------------
7 | SVG example from the [arrows and barbs]({{ site.baseurl }}{% post_url 2016-12-11-arrows-and-barbs %}) section.
8 |
9 | The data is taken from the GFS model, following these steps:
10 |
11 | * Download at a link like this one (dates may not be available): http://www.ftp.ncep.noaa.gov/data/nccf/com/gfs/prod/gfs.2016112400/
12 | * Running *gdalinfo gfs.t00z.sfluxgrbf00.grib2*, see that the bands 50 and 51 are UGRD and VGRD at 10-HTGL (surface wind)
13 | * Run *gdal_translate -b 50 -b 51 -projwin 17 50 47 29 gfs.t00z.sfluxgrbf00.grib2 /tmp/gfs.tiff*
14 | * Note that the [geotiff-js](https://github.com/constantinius/geotiff.js) library has some problems with compression
15 | * This image, taken from [weatheronline](http://www.weatheronline.co.uk), shows that the barbs are coherent with other source images
16 |
17 |
18 |
19 |
20 |
21 | {% highlight js %}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
149 |
150 |
151 | {% endhighlight %}
152 |
--------------------------------------------------------------------------------
/code_samples/wind-barbs-svg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
128 |
129 |
130 |
--------------------------------------------------------------------------------
/code_samples/wind-barbs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
118 |
119 |
120 |
--------------------------------------------------------------------------------
/code_samples/wrf.tiff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/code_samples/wrf.tiff
--------------------------------------------------------------------------------
/css/abzu.js:
--------------------------------------------------------------------------------
1 | console.log("Go Abzu go");
2 |
--------------------------------------------------------------------------------
/css/main.css:
--------------------------------------------------------------------------------
1 | body {
2 | font-weight: 400;
3 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);
4 | }
5 |
6 | pre, code, pre code {
7 | border: none;
8 | border-radius: 0;
9 | background-color: #f9f9f9;
10 | font-size: 0.85em;
11 | }
12 |
13 | .highlight {
14 | background-color: #f9f9f9;
15 | }
16 |
17 | pre {
18 | font-size: 1em;
19 | }
20 |
21 | code {
22 | color: inherit;
23 | }
24 |
25 | #header {
26 | border-bottom: 1px solid #eee;
27 | margin-bottom: 20px;
28 | }
29 |
30 | #header a:hover {
31 | text-decoration: none;
32 | }
33 |
34 | #footer {
35 | margin: 20px 0;
36 | font-size: 0.85em;
37 | color: #999;
38 | text-align: center;
39 | }
40 |
41 | #content > .page-header:first-child {
42 | margin-top: 0;
43 | }
44 |
45 | #content > .page-header:first-child h2 {
46 | margin-top: 0;
47 | }
48 |
49 |
50 | #navigation {
51 | font-size: 0.9em;
52 | }
53 |
54 | #navigation li a {
55 | padding-left: 10px;
56 | padding-right: 10px;
57 | }
58 |
59 | #navigation .nav-header {
60 | padding-left: 0;
61 | padding-right: 0;
62 | }
63 |
64 | body.rtl {
65 | direction: rtl;
66 | }
67 |
68 | body.rtl #header .brand {
69 | float: right;
70 | margin-left: 5px;
71 | }
72 | body.rtl .row-fluid [class*="span"] {
73 | float: right !important;
74 | margin-left: 0;
75 | margin-right: 2.564102564102564%;
76 | }
77 | body.rtl .row-fluid [class*="span"]:first-child {
78 | margin-right: 0;
79 | }
80 |
81 | body.rtl ul, body.rtl ol {
82 | margin: 0 25px 10px 0;
83 | }
84 |
85 | table {
86 | margin-bottom: 1rem;
87 | border: 1px solid #e5e5e5;
88 | border-collapse: collapse;
89 | }
90 |
91 | td, th {
92 | padding: .25rem .5rem;
93 | border: 1px solid #e5e5e5;
94 | }
95 |
96 |
97 | /**
98 | * Links
99 | */
100 | a {
101 | color: #6c916c;
102 | text-decoration: none;
103 |
104 | &:visited {
105 | color: #618261;
106 | }
107 |
108 | &:hover {
109 | color: #111;
110 | text-decoration: underline;
111 | }
112 | }
113 |
114 | .green-separator {
115 | border-top: 5px solid #5f805f;
116 | border-bottom: 1px solid #afebaf;
117 | min-height: 56px;
118 |
119 |
120 | // Positioning context for the mobile navigation icon
121 | position: relative;
122 | }
123 | .abzu{
124 | color:red;
125 | }
126 |
--------------------------------------------------------------------------------
/css/syntax.css:
--------------------------------------------------------------------------------
1 | .highlight .hll { background-color: #ffffcc }
2 | .highlight { background: #ffffff; }
3 | .highlight .c { color: #888888 } /* Comment */
4 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
5 | .highlight .k { color: #008800; font-weight: bold } /* Keyword */
6 | .highlight .cm { color: #888888 } /* Comment.Multiline */
7 | .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
8 | .highlight .c1 { color: #888888 } /* Comment.Single */
9 | .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
11 | .highlight .ge { font-style: italic } /* Generic.Emph */
12 | .highlight .gr { color: #aa0000 } /* Generic.Error */
13 | .highlight .gh { color: #333333 } /* Generic.Heading */
14 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
15 | .highlight .go { color: #888888 } /* Generic.Output */
16 | .highlight .gp { color: #555555 } /* Generic.Prompt */
17 | .highlight .gs { font-weight: bold } /* Generic.Strong */
18 | .highlight .gu { color: #666666 } /* Generic.Subheading */
19 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */
20 | .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
21 | .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
22 | .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
23 | .highlight .kp { color: #008800 } /* Keyword.Pseudo */
24 | .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
25 | .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
26 | .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
27 | .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
28 | .highlight .na { color: #336699 } /* Name.Attribute */
29 | .highlight .nb { color: #003388 } /* Name.Builtin */
30 | .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
31 | .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
32 | .highlight .nd { color: #555555 } /* Name.Decorator */
33 | .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
34 | .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
35 | .highlight .nl { color: #336699; font-style: italic } /* Name.Label */
36 | .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
37 | .highlight .py { color: #336699; font-weight: bold } /* Name.Property */
38 | .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
39 | .highlight .nv { color: #336699 } /* Name.Variable */
40 | .highlight .ow { color: #008800 } /* Operator.Word */
41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */
42 | .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
43 | .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
44 | .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
45 | .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
46 | .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
47 | .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
48 | .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
49 | .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
50 | .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
51 | .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
52 | .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
53 | .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
54 | .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
55 | .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
56 | .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
57 | .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
58 | .highlight .vc { color: #336699 } /* Name.Variable.Class */
59 | .highlight .vg { color: #dd7700 } /* Name.Variable.Global */
60 | .highlight .vi { color: #3333bb } /* Name.Variable.Instance */
61 | .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
62 |
--------------------------------------------------------------------------------
/images/color-scale/sample-scale.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/color-scale/sample-scale.png
--------------------------------------------------------------------------------
/images/examples/arrows.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/arrows.png
--------------------------------------------------------------------------------
/images/examples/barbs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/barbs.png
--------------------------------------------------------------------------------
/images/examples/color-scale-interpolation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/color-scale-interpolation.png
--------------------------------------------------------------------------------
/images/examples/color-scale-isobands.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/color-scale-isobands.png
--------------------------------------------------------------------------------
/images/examples/dem-colors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/dem-colors.png
--------------------------------------------------------------------------------
/images/examples/dem-shaded.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/dem-shaded.png
--------------------------------------------------------------------------------
/images/examples/howtocrop:
--------------------------------------------------------------------------------
1 | convert -crop 240x120+100+100 isolines-labels.png /home/darjiso/Software/d3-raster-tools-docs/images/examples/isolines-labels.png
2 |
--------------------------------------------------------------------------------
/images/examples/isobands.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/isobands.png
--------------------------------------------------------------------------------
/images/examples/isolines-labels.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/isolines-labels.png
--------------------------------------------------------------------------------
/images/examples/isolines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/isolines.png
--------------------------------------------------------------------------------
/images/examples/leaflet.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/leaflet.png
--------------------------------------------------------------------------------
/images/examples/projection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/projection.png
--------------------------------------------------------------------------------
/images/examples/raster-interpolate-projection.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/raster-interpolate-projection.png
--------------------------------------------------------------------------------
/images/examples/raster-interpolate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/raster-interpolate.png
--------------------------------------------------------------------------------
/images/examples/raster-pixel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/raster-pixel.png
--------------------------------------------------------------------------------
/images/examples/streamlines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/streamlines.png
--------------------------------------------------------------------------------
/images/examples/vardah-layers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/vardah-layers.png
--------------------------------------------------------------------------------
/images/examples/vardah-streamlines.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/examples/vardah-streamlines.png
--------------------------------------------------------------------------------
/images/projections/august.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/projections/august.png
--------------------------------------------------------------------------------
/images/projections/conicConformal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/projections/conicConformal.png
--------------------------------------------------------------------------------
/images/projections/equirectangular.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/projections/equirectangular.png
--------------------------------------------------------------------------------
/images/vectors-barbs/16112400_2400.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rveciana/d3-raster-tools-docs/d88c8db967d4762ef8b550366b9c5d9a7794ec06/images/vectors-barbs/16112400_2400.gif
--------------------------------------------------------------------------------
/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: "D3js raster tools docs"
4 | disqus: 1
5 | ---
6 |
7 | D3js raster tools docs
8 | ======================
9 |
10 | This small documentation explains how to work with raster data and the [d3js](https://d3js.org/) to create dynamic data visualizations.
11 |
12 | Usually, the examples show how to place points or polygons on a map. Those examples are working with [vectorial data](http://gis.stackexchange.com/questions/57142/what-is-the-difference-between-vector-and-raster-data-models ). But many datasets are rasters, so the lack of examples and libraries made difficult to use [d3js](https://d3js.org/) with meteorological data, [DEM data](https://en.wikipedia.org/wiki/Digital_elevation_model), etc.
13 |
14 | Some common representations could be easily done with existing libraries, others didn't have available tools. This tutorial will show how to use:
15 |
16 | * [geotiff](https://github.com/constantinius/geotiff.js): Reading the GeoTIFF data (not the projectiopn, which would be cool)
17 | * [raster-streamlines](https://github.com/rveciana/raster-streamlines): Drawing [streamlines](https://en.wikipedia.org/wiki/Streamlines,_streaklines,_and_pathlines) from vectorial fields
18 | * [raster-marching-squares](https://github.com/rveciana/raster-marching-squares): Creating the isobands with the wind speed
19 | * [reproject](https://github.com/perliedman/reproject): Reprojecting the generated GeoJSON
20 | * [proj4js](http://proj4js.org/): Reprojecting points
21 |
22 | And examples for all the common raster visualizations covered by the [Basemap library](http://basemaptutorial.readthedocs.io/en/latest/). All the examples have the *Canvas* and the *SVG* version so it's easy to use the most convenient.
23 |
24 | I would really appreciate all the feedback. Disqus comments are available on each page.
25 |
26 | Section Examples list
27 | ---------------------
28 |
29 | |----------|:-------------:|
30 | |[
Wind arrows]({{ site.baseurl }}/code_samples/wind-arrows-page.html) | [
Wind barbs]({{ site.baseurl }}/code_samples/wind-barbs-page.html) |
31 | |[
Raster interpolation]({{ site.baseurl }}/code_samples/raster-interpolation-page.html) | [
Raster original pixels]({{ site.baseurl }}/code_samples/raster-pixels-page.html) |
32 | |[
Isolines]({{ site.baseurl }}/code_samples/isolines-page.html) | [
Isolines with labels]({{ site.baseurl }}/code_samples/isolines-labels-page.html) |
33 | |[
Isobands]({{ site.baseurl }}/code_samples/isobands-page.html) | [
Streamlines]({{ site.baseurl }}/code_samples/streamlines-arrows-page.html) |
34 | |[
Projected GeoTIFF]({{ site.baseurl }}/code_samples/wind-barbs-projected-page.html) | [
Projected raster interpolation]({{ site.baseurl }}/code_samples/raster-interpolation-projected-page.html) |
35 | |[
Leaflet]({{ site.baseurl }}/code_samples/leaflet-page.html) | [
Shaded relief]({{ site.baseurl }}/code_samples/dem-shaded-page.html)|
36 |
37 | Other visualization examples
38 | ----------------------------
39 |
40 | |----------|:-------------:|
41 | |[
Layer selection]({{ site.baseurl }}/code_samples/vardah-layers-page.html) | [
Animated streamlines]({{ site.baseurl }}/code_samples/vardah-streamlines-page.html) |
42 | |[
Color scale isobands]({{ site.baseurl }}/code_samples/color-scale-isobands-page.html) | [
Color scale shaded relief]({{ site.baseurl }}/code_samples/color-scale-interpolation-page.html) |
43 |
--------------------------------------------------------------------------------