Using a shapefile from Natural earth, I am trying create a map of Europe with d3-geo’s new command-line interface. The following:
shp2json -n ne_50m_admin_0_countries/ne_50m_admin_0_countries.shp \
| ndjson-filter '["ALB", "AND", "AUT", "BEL", "BGR", "BIH", "BLR", "CHE", "CYP", "CZE", "DEU", "DNK", "ESP", "EST", "FIN", "FRA", "FRO", "GBR", "GIB", "GRC", "HRV", "HUN", "IMN", "IRL", "ISL", "ITA", "LIE", "LTU", "LUX", "LVA", "MCO", "MDA", "MDA", "MKD", "MLT", "MNE", "NLD", "NOR", "POL", "PRT", "ROU", "SMR", "SRB", "SVK", "SVN", "SWE", "UKR", "VAT", "XKX"].includes(d.properties.adm0_a3)' \
| ndjson-reduce \
| ndjson-map '{type: "FeatureCollection", features: d}' \
| geoproject 'd3.geoConicEqualArea().parallels([43, 62]).rotate([0, 0]).fitSize([960, 960], d)' \
| geo2svg -w 960 -h 960 \
> europe.svg
...creates this output:
How can I remove all the overseas territories (e.g. French Guyana) and distant islands, so I'm left with a map of just 'mainland' Europe? Nothing west of Portugal, nothing south of mainland Spain etc. More like this: