Questions tagged [maps]

A map is a visual representation of an area—a symbolic depiction highlighting relationships between elements of that space such as objects, regions, and themes. For the key-value data structure, use dictionary tag instead.

Modern maps

Many maps are static two-dimensional, geometrically accurate (or approximately accurate) representations of three-dimensional space, while others are dynamic or interactive, even three-dimensional.

Although most commonly used to depict geography, maps may represent any space, real or imagined, without regard to context or scale; e.g. brain mapping, DNA mapping, and extraterrestrial mapping.

Many, but not all, maps are drawn to a scale, expressed as a ratio such as 1:10,000, meaning that 1 of any unit of measurement on the map corresponds exactly, or approximately, to 10,000 of that same unit on the ground.

Maps of the world or large areas are often either 'political' or 'physical'. Topographic maps show elevations and relief with contour lines or shading. Geological maps show not only the physical surface, but characteristics of the underlying rock, fault lines, and subsurface structures.

Maps that depict the surface of the Earth also use a projection, a way of translating the three-dimensional real surface of the geoid to a two-dimensional picture. Perhaps the best-known world-map projection is the Mercator projection, originally designed as a form of nautical chart.

Aeroplane pilots use aeronautical charts based on a Lambert conformal conic projection, in which a cone is laid over the section of the earth to be mapped.

From the last quarter of the 20th century, the indispensable tool of the cartographer has been the computer. Much of cartography, especially at the data-gathering survey level, has been subsumed by Geographic Information Systems (GIS).

A complex problem when dealing with maps is to calculate the distance between two points. The simplest approach is to work as if the map was a simple plane and use Euclidean distance function. However, this might be inadequate, especially in the case when we are dealing with large distances. In that case the differences between the real shape of the planet and a plane will get more accent. A significant improvement over this is to calculate the distance between two coordinates using the Haversine formula, but even this might be imprecise in some cases where high precision is needed, due to the differences of altitude or other geometrical, or non-geometrical distance modificators, like speed limits on roads, closed borders of countries, travel costs, etc.

More info on Wikipedia

9449 questions
2
votes
1 answer

pgAdmin geometry viewer not displaying all data?

I'm using the geometry viewer option in pgAdmin 4 to do some quick analysis of my spatial data. But looking at the map it's almost as if not all data is being displayed. The query returned over 6K results. But looking at the map there are barely 1K…
Fokke Dekker
  • 21
  • 1
  • 2
2
votes
1 answer

Behavior of "fill" argument in geom_polygon in R

I am trying to understand the behavior of the "fill" argument in geom_polygon for ggplot. I have a dataframe where I have multiple values from a measure of interest, obtained in different counties for each state. I have merged my database with the…
2
votes
1 answer

Is it possible to draw LineString with elevation (altitude) with Mapbox?

I'm using react-mapbox-gl and was trying to pass LineString with tree coordinates [[[58.7541522, 55.7444, 10], [48.7041522, 55.7444, 80]]] to GeoJSONLayer and to line-Layer
Gregory Orlov
  • 517
  • 1
  • 6
  • 15
2
votes
2 answers

Add additional onClick() to Navigation Control

Mapbox offers NavigationControls. A Compass (and others) come for free when using Mapbox. I can use the Compass to tilt the around the x and y Axis. When I tilted the map and click on the compass, the tilting is reverted. Is there a way to put an…
four-eyes
  • 10,740
  • 29
  • 111
  • 220
2
votes
1 answer

Iterating over Firestore array of maps

I'm trying to restructure a database and having wicked trouble trying to populate a table with the data from it after doing so. Here is the new structure of my database. So, we can see newLayout > User ID > reviews, which is an array of maps. I can…
2
votes
2 answers

Merging multiple maps with map value as custom case class instance

I want to merge multiple maps using Spark/Scala. The maps have a case class instance as value. Following is the relevant code: case class SampleClass(value1:Int,value2:Int) val sampleDataDs = Seq( ("a",25,Map(1->SampleClass(1,2))), …
2
votes
0 answers

Is it possible to calculate longitude / latitude of a point from a flat image

I have a game, where there is a planet, and that planet have points where people can build items. The point must be on solid ground and not in the water. I create a texture blue/green, that I apply on a sphere in the client. But I would like the…
Bobby
  • 4,372
  • 8
  • 47
  • 103
2
votes
0 answers

I cannot get my HERE Map javascript code to work in a Thingsboard Widget

I am trying to build a custom map widget in Thingsboard using Here Maps API for JavaScript, as a base map for IoT device reporting on an interactive map. The code comes back as no error, but it does not load. I am new to JavaScript and APIs. So I'm…
2
votes
1 answer

ggplot2 add continent names to a world map plot

I'm using maps and ggplot 2 to create a world map plot that shows continents in a different colour based on some results (that I've added to the country coordinates). So far, so good. However, I'm struggling with adding the continent names to the…
deschen
  • 10,012
  • 3
  • 27
  • 50
2
votes
1 answer

show leaflet marker popup from outside of map dynamically

I am using Leaflet javascript library to show some earthquake information. You are able to see few red circles on map. When you click that red circle it will display few details in popup. I want to show the popup when you click the link from outside…
Karuppiah RK
  • 3,894
  • 9
  • 40
  • 80
2
votes
1 answer

How to Concat two maps in Elixir

I have two maps in Elixir: mapA = %{"test1" => "result1"} mapB = %{"test2" => "result2"} I want my output to look like this: [%{"test1" => "result1"}, %{"test2" => "result2"}]
2
votes
1 answer

Overlaying Shapefile datapoints on Density Map

I am new to shapefiles and mapping in python so I was hoping to get some help with overlaying data points from a shapefile on a density map. To be honest, I am a beginner with mapping and reading in shapefiles so what I have so far not much. I have…
C.G
  • 87
  • 1
  • 7
2
votes
0 answers

Android Offline Maps - OSMDroid

I'm trying to make an Android application that lets you download map tiles for a particular bounding box (multiple zoom levels) and use them when the device isn't connected to network. I'm using OSMDroid as the maps library. These are the things…
Arjun Issar
  • 672
  • 4
  • 13
  • 32
2
votes
2 answers

Trying to display multiple markers on a map

I am trying to write a piece of code that plots a list of markers on a map. The markers are formatted by longitude and latitude: trip_markers[0:4]: [[40.64499, -73.78115], [40.766931, -73.982098], [40.77773, -73.951902], [40.795678,…
CarterB
  • 502
  • 1
  • 3
  • 13
2
votes
2 answers

How to replace a value in one map with the value of another map, based on a pattern match?

I have a map that has a few key value pairs, and I would like a way to go through those pairs and attempt to match the keys with the value of another map. If there's a match the values are substituted for each other. In other words, if there's a…
jjaguirre394
  • 161
  • 1
  • 8