0

I am converting boundaries queried with overpass-turbo (GeoJSON) into SVG with mapshaper. The resulting SVG has a with of 800 (mapshaper default, pixels) and a height of 520 - the resulting map seems "vertically squished" as compared to overpass-turbo's / OSM's map view.

What's the cause and how can it be fixed?

1 Answer 1

1

https://wiki.openstreetmap.org/wiki/A_projected_version_of_an_OSM_extract

Projection
Most slippy maps, including OSM's main slippy map layer, are projected in EPSG:3857. Raw OSM Data (found in extracts, planet.osm), is in EPSG:4326, aka WGS84.

https://wiki.openstreetmap.org/wiki/EPSG:3857

EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap.

Using the console

$ mapshaper -version
0.6.5
$ mapshaper -projections
Proj4 projections
  aea      Albers Equal Area
  aeqd     Azimuthal Equidistant
  airy     Airy
  aitoff   Aitoff
  alsk     Mod Stereographic of Alaska
  apian    Apian Globular I
  august   August Epicycloidal
  bacon    Bacon Globular
  bertin1953  Bertin 1953
  boggs    Boggs Eumorphic
  bonne    Bonne (Werner lat_1=90)
  cass     Cassini
  cea      Equal Area Cylindrical
  chamb    Chamberlin Trimetric
  crast    Craster Parabolic (Putnins P4)
  cupola   Cupola
  denoy    Denoyer Semi-Elliptical
  eck1     Eckert I
  eck2     Eckert II
  eck3     Eckert III
  eck4     Eckert IV
  eck5     Eckert V
  eck6     Eckert VI
  eqc      Equidistant Cylindrical (Plate Caree)
  eqdc     Equidistant Conic
  eqearth  Equal Earth
  etmerc   Extended Transverse Mercator
  euler    Euler
  fouc     Foucaut
  gall     Gall (Gall Stereographic)
  geocent  Geocentric
  gilbert  Gilbert Two World Perspective
  gins8    Ginsburg VIII (TsNIIGAiK)
  gn_sinu  General Sinusoidal Series
  gnom     Gnomonic
  goode    Goode Homolosine
  gs48     Mod Stereographic of 48 U.S.
  gs50     Mod Stereographic of 50 U.S.
  hammer   Hammer & Eckert-Greifendorff
  hatano   Hatano Asymmetrical Equal Area
  healpix  HEALPix
  hill     Hill Eucyclic
  kav5     Kavraisky V
  kav7     Kavraisky VII
  krovak   Krovak
  laea     Lambert Azimuthal Equal Area
  latlon   Lat/long (Geodetic alias)
  latlong  Lat/long (Geodetic alias)
  lcc      Lambert Conformal Conic
  leac     Lambert Equal Area Conic
  lee_os   Lee Oblated Stereographic
  longlat  Lat/long (Geodetic alias)
  lonlat   Lat/long (Geodetic)
  loxim    Loximuthal
  mbt_fpp  McBride-Thomas Flat-Polar Parabolic
  mbt_fpq  McBryde-Thomas Flat-Polar Quartic
  mbt_fps  McBryde-Thomas Flat-Pole Sine (No. 2)
  mbt_s    McBryde-Thomas Flat-Polar Sine (No. 1)
  mbtfps   McBryde-Thomas Flat-Polar Sinusoidal
  merc     Mercator
  mil_os   Miller Oblated Stereographic
  mill     Miller Cylindrical
  moll     Mollweide
  murd1    Murdoch I
  murd2    Murdoch II
  murd3    Murdoch III
  natearth  Natural Earth
  natearth2  Natural Earth 2
  nell     Nell
  nell_h   Nell-Hammer
  nsper    Near-sided perspective
  nzmg     New Zealand Map Grid
  ob_tran  General Oblique Transformation
  ocea     Oblique Cylindrical Equal Area
  omerc    Oblique Mercator
  ortel    Ortelius Oval
  ortho    Orthographic
  patterson  Patterson Cylindrical
  pconic   Perspective Conic
  poly     Polyconic (American)
  putp1    Putnins P1
  putp2    Putnins P2
  putp3    Putnins P3
  putp3p   Putnins P3'
  putp4p   Putnins P4'
  putp5    Putnins P5
  putp5p   Putnins P5'
  putp6    Putnins P6
  putp6p   Putnins P6'
  qsc      Quadrilateralized Spherical Cube
  qua_aut  Quartic Authalic
  rhealpix  rHEALPix
  robin    Robinson
  sinu     Sinusoidal (Sanson-Flamsteed)
  somerc   Swiss. Obl. Mercator
  stere    Stereographic
  sterea   Oblique Stereographic Alternative
  tcea     Transverse Cylindrical Equal Area
  times    Times
  tissot   Tissot
  tmerc    Transverse Mercator
  tpeqd    Two Point Equidistant
  tpers    Tilted perspective
  ups      Universal Polar Stereographic
  urm5     Urmaev V
  urmfps   Urmaev Flat-Polar Sinusoidal
  utm      Universal Transverse Mercator (UTM)
  vandg    van der Grinten (I)
  vandg2   van der Grinten II
  vandg3   van der Grinten III
  vandg4   van der Grinten IV
  vitk1    Vitkovsky I
  wag1     Wagner I (Kavraisky VI)
  wag2     Wagner II
  wag3     Wagner III
  wag4     Wagner IV
  wag5     Wagner V
  wag6     Wagner VI
  wag7     Wagner VII
  weren    Werenskiold I
  wink1    Winkel I
  wink2    Winkel II
  wintri   Winkel Tripel

Aliases
  albersusa
  robinson
  webmercator
  wgs84

For some reason, "EPSG:3857" is not listed, but accepted:

To convert online, use

$ proj EPSG:3857

or with the Node.js CLI tool (npm install -g mapshaper)

$ mapshaper in.geojson -proj EPSG:3857 -o out.svg
[o] Wrote out.svg

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.