Questions tagged [map-projections]

A map-projection transforms the coordinates of the spherical earth to a flat map in cartesian (x,y) space.

A map-projection transforms the coordinates of the spherical earth, usually given in degrees (latitude, longitude), to a flat cartesian (x,y) space.
There is no perfect projection, it can be proved that each projection has a drawback, one have minor others major ones.

448 questions
3
votes
1 answer

How to Reproject GeoJSON without crs property to WGS84 (to use React Leaflet)

(Please help I've been struggling with the same problem for more than three days...) I got GeoJSON file from National Statistical Office, which means it's official data- and the coordinates in this file look like this-…
dahyeko
  • 113
  • 1
  • 9
3
votes
0 answers

Cartopy platecarree and orthographic projection issues for streamplot with starting points

I want to plot a velocity field (u, v) as a function of (longitude, latitude) as a streamplot, in plate-carree (lon-lat) and orthographic projections, using the matplotlib function plt.streamplot with the Cartopy package. I want the starting points…
bproxauf
  • 1,076
  • 12
  • 23
3
votes
1 answer

How to add height to a d3.js globe marker, mimicking a push-pin?

When having a marker on a globe, the marker lays flat on the surface. Although there might be trouble the moment the marker rotates out of sight; is there a way to give this marker height? Instead of a dot on the surface of the globe, I'm trying to…
Jordy
  • 347
  • 2
  • 11
3
votes
1 answer

How to adjust the size of a d3.js globe?

I'm trying to set the size of this globe to 200 x 200px. I've learned that the projection is currently sized 960 x 500px. Changing the size of the SVG doesn't shrink the globe. I'm having trouble understanding why. Without luck I have tried to add…
Jordy
  • 347
  • 2
  • 11
3
votes
0 answers

Plotting a heatmap in galactic coordinates

EDIT: Ok I figured out a botchey way of doing this involving scipy.interpolate.griddata I have some maps that are in the form of two dimensional arrays 130x360 with each value in the array corresponding to the measurment at that point. These maps…
3
votes
1 answer

How to make geoAlbersUSA projection straight(not curved) like geoMercator?

I followed a guide to create a basic map of USA in d3js Guide link - http://bl.ocks.org/michellechandra/0b2ce4923dc9b5809922. I have understood the basics of GeoJSON and Map Projections. Currently my map looks like this - (Map 1) - this uses…
ebyt
  • 312
  • 1
  • 9
3
votes
1 answer

Is there a way to change the projection in a topojson file?

I am trying to create a topojson file projected using geoAlbersUsa, originating from the US Census's ZCTA (Zip Codes, essentially) shapefile. I was able to successfully get through the examples in the excellent…
CindyHoskey
  • 67
  • 1
  • 3
3
votes
1 answer

Inconsistent rendering of map by d3.geoEquirectangular()

I recently made some maps using D3 and had some problems with paths not closing properly as you can see in the first example below. I assume this is some kind of data issue around precision at -90 degrees latitude, but I'm not sure how to validate…
Al R.
  • 2,430
  • 4
  • 28
  • 40
3
votes
1 answer

Multiple maps with d3.js: change values of scale and center

I’m building a (d3 v4) cartographic visualization which allows the user to switch between many datasets (json files) and two different regions (administrative units of a country and smaller administrative units into its capital city). Actually the…
Olivier F
  • 33
  • 5
3
votes
1 answer

How to project two point line on the map into a curved line OpenLayers

As for my knowledge, there is no built-in feature in OpenLayers to project the straight line of two points into curved line following the curvature of the Earth. This was a problem when I got a route that was going straight through Madagascar: Is…
Mario Petrovic
  • 7,500
  • 14
  • 42
  • 62
3
votes
1 answer

d3 world map with country click and zoom almost working not quite

I am working on a world map that features a click to zoom feature. When clicking a country the map zooms in but the country is not always centered -- the same happens when you click out and repeat, it never seems to deliver the same result. Note: If…
sn4ke
  • 587
  • 1
  • 14
  • 30
3
votes
1 answer

Circles in Map Displayed Incorrect Location in D3 V4

I am using a tutorial to learn how to generate maps in D3.v3, but I am using D3.v4. I am just trying to get some circles to appear on the map (see below). The code works except that the circles are over Nevada and should be in the Bay Area. I…
jtam
  • 814
  • 1
  • 8
  • 24
3
votes
2 answers

reverse map-projection: how to get lat/lon coordinates from projected coordinates

I have a set of lat/lon coords which I can project using, for example, Mollweide projection. library(mapproj) set.seed(0) n <- 100 s <- data.frame(lon = rnorm(n, 0, 60), lat = rnorm(n, 0, 40)) p <- mapproject(s$lon, s$lat,…
Mark Heckmann
  • 10,943
  • 4
  • 56
  • 88
3
votes
1 answer

Lambert conic conformal projection in d3

I'm trying to project a set of points ([long, lat] tuples) on top of an SVG map of my home country Austria: https://commons.wikimedia.org/wiki/File:Austria-geographic_map-blank.svg The description of the SVG file on Wikimedia gives a projection name…
zinfandel
  • 428
  • 5
  • 12
3
votes
1 answer

syncing d3.js with THREE.js earth

I am trying to combine WebGL earth with d3.geo.satellite projection. I have managed to to overlay the 2 projections on top of each other and sync rotation, but I am having trouble to sync zooming. When I sync them to match size, WebGL projection…
nxtwrld
  • 1,942
  • 14
  • 15