Questions tagged [cartography]

127 questions
58
votes
5 answers

D3js: Automatic labels placement to avoid overlaps? (force repulsion)

How to apply force repulsion on map's labels so they find their right places automatically ? Bostock' "Let's Make a Map" Mike Bostock's Let's Make a Map (screenshot below). By default, labels are put at the point's coordinates and…
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
16
votes
5 answers

Drawing cartograms with Matplotlib?

In case somebody doesn't know: A cartogram is a type of map where some country/region-dependent numeric property scales the respective regions so that that property's density is (close to) constant. An example is from worldmapper.org. In this…
gspr
  • 11,144
  • 3
  • 41
  • 74
13
votes
3 answers

Algorithm for merging spatially close paths / line segments

I am looking for (the name of) a geometric algorithm for cartographic generalization of a street map. In my map data, I have many paths (ordered list of points, connected by line segments) that lay close and almost parallel to one another. How do I…
anroesti
  • 11,053
  • 3
  • 22
  • 33
11
votes
2 answers

Suggestions on manipulating an SVG map

I'm working on a map of the native languages of California for Wikipedia. The map contains areas that each correspond to a language. The original looks like this (click it to see the SVG): I want to make "locator maps" for each of those individual…
user18015
9
votes
5 answers

Quickly find and render terrain above a given elevation

Given an elevation map consisting of lat/lon/elevation pairs, what is the fastest way to find all points above a given elevation level (or better yet, just the the 2D concave hull)? I'm working on a GIS app where I need to render an overlay on top…
Charles
  • 6,199
  • 6
  • 50
  • 66
7
votes
2 answers

How to easily add a sub_axes with proper position and size in matplotlib and cartopy?

I want to add a 2nd axes at the top right corner of a 1st axes. After googling, I found two ways to do things like this: fig.add_axes(), and mpl_toolkits.axes_grid.inset_locator.inset_axes. But the fig.add_axes() doesn't accept transform arg. So the…
gepcel
  • 1,326
  • 11
  • 21
6
votes
2 answers

What earth radius should I use to calculate distances near the Poles?

I'm monitoring a GPS unit which is on it's way from Cape Discovery in Canada, to the North Pole. I need to keep track of the distance travelled and distance remaining each day, so I'm using the Haversine Formula, which I'm told is very accurate for…
gargantuan
  • 8,888
  • 16
  • 67
  • 108
5
votes
4 answers

How do I plot latitude/longitude coordinates on the screen?

I am trying to figure out how to plot WGS84 latitude/longitude points on a bitmap but cannot figure out the math required to turn lat/lon points into coordinates that would be plottable. Could anyone give me some pointers or examples on how to do…
colin
  • 2,983
  • 6
  • 41
  • 49
5
votes
1 answer

Get aspect ratio for lat-long plots

I know R has various ways to plot maps properly with projections. But just for a quick 'good enough' result using base functions, is there a function to calculate the aspect ratio for a particular latitude that if provided to R's typical asp…
geotheory
  • 22,624
  • 29
  • 119
  • 196
5
votes
1 answer

How to create a store map using LeafLet

Im looking to create a map that can be interactive. The best option that I found is leaflet, the thing is I don't find any resource explaining how to create my own map. Im looking to create a mall map where user can see all the stores, fountain…
Isaac
  • 983
  • 1
  • 7
  • 13
4
votes
2 answers

Toggle Layers with Mapbox GL JS

I'd like to toggle between layers in Mapbox GL JS. I've created some radio buttons that partly work in that you can switch from one layer to the other but not back or forth. Below is my code for toggling the layers so far: var layerList =…
4
votes
2 answers

Tool for the cartography of a complex information system

I am looking for a Visio-like tool that would help me draw my information system at the component level. The design will not fit on a single piece of paper and I would like a web tool with a sort of 'infinite' sheet of paper, and a proper navigation…
Jerome WAGNER
  • 21,986
  • 8
  • 62
  • 77
4
votes
1 answer

How to draw interior buffer or interior stroke on a polygon with OpenLayers 4

I'd like to recreate the same style that OSM use when editing polygons. I'm calling it an 'interior stroke' or 'interior buffer'. OSM example: I know that I can use an array of ol.style.Style, with one sending back geometry for the interior buffer.…
craig
  • 285
  • 2
  • 10
4
votes
0 answers

Translate latitude/longitude to point on svg map

Given an svg map like this one on Wikimedia, I'd like to add a circle centered on New York City (or any given latitude/longitude) by adding a line like this to the svg file: The hard part of course is knowing what X…
itzy
  • 11,275
  • 15
  • 63
  • 96
4
votes
1 answer

Cartography set constraint to variable

I have no idea how to set constrant.height to constant value: override func updateConstraints() { layout(view) { view in let viewHeight = 67 view.top == view.superview!.top view.left == view.superview!.left …
Nat
  • 12,032
  • 9
  • 56
  • 103
1
2 3
8 9