Europe in two projections:
Lambert Equal Area (green) - statistical analysis and display
Lambert Conformal Conic (red) - conformal pan-European mapping at
scales smaller or equal to 1:500,000
Source: Map Projections for Europe (pdf)
| license: gpl-3.0 | |
| height: 500 | |
| border: no |
Europe in two projections:
Lambert Equal Area (green) - statistical analysis and display
Lambert Conformal Conic (red) - conformal pan-European mapping at
scales smaller or equal to 1:500,000
Source: Map Projections for Europe (pdf)
| <!DOCTYPE html> | |
| <meta charset="utf-8"> | |
| <script src="//d3js.org/d3.v4.min.js"></script> | |
| <script src="//d3js.org/topojson.v2.min.js"></script> | |
| <style> | |
| .lcc { | |
| fill: none; | |
| stroke: red; | |
| opacity: 0.5; | |
| } | |
| .laea { | |
| fill: none; | |
| stroke: green; | |
| opacity: 0.5; | |
| } | |
| </style> | |
| <body> | |
| <script> | |
| var width = 960, | |
| height = 500; | |
| var projLcc = d3.geoConicConformal() | |
| .rotate([-10.0, 0.0]) | |
| .center([0.0, 52.0]) | |
| .parallels([35.0, 65.0]) | |
| .scale(600) | |
| .precision(.1); | |
| var projLaea = d3.geoAzimuthalEqualArea() | |
| .rotate([-10.0, -52.0]) | |
| .scale(600) | |
| .precision(.1); | |
| var pathLcc = d3.geoPath() | |
| .projection (projLcc); | |
| var pathLaea = d3.geoPath() | |
| .projection (projLaea); | |
| var graticule = d3.geoGraticule(); | |
| var svg = d3.select("body").append("svg") | |
| .attr("width", width) | |
| .attr("height", height); | |
| var featuresLcc = svg.append("g") | |
| .attr("class", "lcc"); | |
| var featuresLaea = svg.append("g") | |
| .attr("class", "laea"); | |
| d3.json("110m.json", function (error, europe) { | |
| if (error) throw error; | |
| var countries = topojson.feature(europe, europe.objects.countries).features; | |
| featuresLcc.append("path") | |
| .datum(graticule) | |
| .attr("d", pathLcc); | |
| featuresLcc.selectAll("countries") | |
| .data(countries) | |
| .enter().append("path") | |
| .attr("d", pathLcc); | |
| featuresLaea.append("path") | |
| .datum(graticule) | |
| .attr("d", pathLaea); | |
| featuresLaea.selectAll("countries") | |
| .data(countries) | |
| .enter().append("path") | |
| .attr("d", pathLaea); | |
| }); | |
| </script> |