Thursday, 17 September 2015

d3MapRenderer v0.9 released

v0.9 of the d3MapRenderer plugin to QGIS released.

Please visit the plugin homepage for details on how to install the pre-requisites of Node.js and the topojson package.

Change log:

  • Additional projections
  • Better support for Conic Conformal projection (and Albers)
  • Support for no brush and no pen
  • Fix for binding of first SVG path element

Additional projections

All but the more funky D3 extended projections now supported. These others will be supported in a future release, but you can always alter the JavaScript to experiment with them yourself. For details of which projections are supported see the full list at the bottom of this post.

Better support for Conic Conformal projection (and Albers)

The Conic Projections parallels, center and rotation are calculated from the binding box of the main layer. In the example below the rotation looks slightly off. This is because the center for the map is taken from the British Trust for Ornithology (BTO) Barnacle Geese Migration Zones, not the United Kingdom outline. If the results of an export do not match expectations simply adjust the angle of rotation:

    var projection = d3.geo.albers()
      .center([0, 58])
      .rotate([4, 0])
      .parallels([51, 66])
      .scale(1000)
      .translate([width / 2, height / 2]);

Support for no brush and no pen

Support for use of no brush and no pen added, which respectively cause the export to create transparent fill to a polygon or a transparent border.

Fix for binding of first SVG path element

The binding of the topojson data to the path element has now been fixed so that all features are displayed. Previously, the first feature was missing from the visualisation. For example, with a shapefile created by buffering features in another layer often contain only a single feature. Exporting the buffer layer resulted in nothing being displayed. This has now been fixed.

Just to test out the transparency, pen and border changes Migration Zone Shapefiles for Geese were downloaded from the BTO site, and combined with the data from the Migration timing in Barnacle Geese used in studies by Kölzsch et al. published by the Movebank Data Repository with DOI 10.5441/001/1.ps244r11. See www.datarepository.movebank.org/handle/10255/move.385.

Current list of supported projections

Aitoffd3.geo.aitoff
Albersd3.geo.albers
Albers Usad3.geo.albersUsa
Augustd3.geo.august
Baker Dinomicd3.geo.baker
Boggs Eumorphicd3.geo.boggs
Bromleyd3.geo.bromley
Collignond3.geo.collignon
Conic Equi-distantd3.geo.conicEquidistant
Craster Parabolicd3.geo.craster
Cylindrical Equal Aread3.geo.cylindricalEqualArea
Eckert Id3.geo.eckert1
Eckert IId3.geo.eckert2
Eckert IIId3.geo.eckert3
Eckert IVd3.geo.eckert4
Eckert Vd3.geo.eckert5
Eckert VId3.geo.eckert6
Eisenlohrd3.geo.eisenlohr
Equi Rectangular (Plate Carrée)d3.geo.equirectangular
Faheyd3.geo.fahey
Flat-Polar Parabolicd3.geo.mtFlatPolarParabolic
Flat-Polar Quarticd3.geo.mtFlatPolarQuartic
Flat-Polar Sinusoidald3.geo.mtFlatPolarSinusoidal
Ginzburg IVd3.geo.ginzburg4
Ginzburg Vd3.geo.ginzburg5
Ginzburg VId3.geo.ginzburg6
Ginzburg VIIId3.geo.ginzburg8
Ginzburg IXd3.geo.ginzburg9
Goode Homolosined3.geo.homolosine
Gringorten Equal-Aread3.geo.gringorten
Guyoud3.geo.guyou
Hammerd3.geo.hammer
HEALPixd3.geo.healpix
Hill Eucyclicd3.geo.hill
Kavrayskiy VIId3.geo.kavrayskiy7
Lagranged3.geo.lagrange
Lambert Conic Conformald3.geo.conicConformal
Larrivéed3.geo.larrivee
Laskowski Tri-Optimald3.geo.laskowski
Loximuthald3.geo.loximuthal
Mercatord3.geo.mercator
Millerd3.geo.miller
Mollweided3.geo.mollweide
Natural Earthd3.geo.naturalEarth
Nell–Hammerd3.geo.nellHammer
Patterson Cylindricald3.geo.patterson
Polyconicd3.geo.polyconic
Robinsond3.geo.robinson
Sinusoidald3.geo.sinusoidal
Timesd3.geo.times
Van der Grinten Id3.geo.vanDerGrinten
Van der Grinten IId3.geo.vanDerGrinten2
Van der Grinten IIId3.geo.vanDerGrinten3
Van der Grinten IVd3.geo.vanDerGrinten4
Wagner IVd3.geo.wagner4
Wagner VId3.geo.wagner6
Wagner VIId3.geo.wagner7
Winkel Tripeld3.geo.winkel3