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
2 answers

Groovy: How to add a list as key and another list as values to a Map

How can I add mylist as keys and myanotherlist as values to myMap def mylist = [ John, Paul, Emily ] def myanotherlist = [ 23, 45, 56 ] def myMap = [:] // println "myMap: ${myMap}" println "Age of Paul is: ${myMap['Paul']}" Desired output: …
Jill448
  • 1,745
  • 10
  • 37
  • 62
2
votes
3 answers

javascript - reduce array of objects to a key value pair map retaining duplicate entries in a value array

I need to reduce an array of objects, but reduce on a specific key property in the object, and have all objects with the same key value placed into an array in the associated value array. An example of what I need: Objects var obj1 = { name:…
CybeX
  • 2,060
  • 3
  • 48
  • 115
2
votes
0 answers

Baidu map Cluster differentiates by changing the Zone

Default clusters for baidu map are changing when the number of markers clustering together changes but in the google map you can set it to have different colours outside of a specific zone for example having grey colour for clusters outside of a…
N.Taa
  • 21
  • 1
2
votes
2 answers

Leaflet: .bindPopup with layer groups opens popup in the same spot for all features

I'm building a Leaflet map of recent earthquakes that pulls from three APIs to create three layer groups on a map. I'm also building a sidebar with a list of earthquakes from just one of the three API links. When a user clicks on a map marker, a…
KateB
  • 35
  • 7
2
votes
2 answers

Matching pincodes with latitude and longitude (India)

I am trying to get corresponding latitudes and longitudes for a particular pincode for India. For pincode I have the following file. https://data.gov.in/sites/default/files/all_india_PO_list_without_APS_offices_ver2_lat_long.csv The data has 15…
Ravi
  • 612
  • 1
  • 6
  • 17
2
votes
2 answers

incompatible types in assignment of 'std::string {aka std::basic_string}' to

int main() { std::string my_string= "16657"; std::map m_msg_int; std::string arrId[2]; arrId[0] = "ABC"; arrId[1] = "XYZ/CDE"; m_msg_int[my_string] = arrId[2]; std::cout<<"MSGID"<
2
votes
3 answers

Groovy: Remove duplicates from a list of maps by multiple values

Having a list of maps as this def listOfMaps = [ ["car": "A", "color": "A", "motor": "A", "anything": "meh"], ["car": "A", "color": "A", "motor": "A", "anything": "doesn't matter"], ["car": "A", "color": "A", "motor": "B", "anything":…
TestingTheTest
  • 57
  • 1
  • 10
2
votes
1 answer

Flutter listView(or any scrolling widget) handling google map widget events

I am using flutter. And I want to put google map widget in listView. But events live zoom in/out, rotate, move... the map are not working. Then I noticed that listView handling all events even the once that it has not like zoom in/out. Any idea what…
2
votes
0 answers

Customize legend labels for continuous variables cut into several categories in ggplot2

I am drawing a choropleth map for US counties. I randomly created a variable dumb that is uniformly distributed between 1 and 100 and cut it into 6 categories, which is stored as dumb_quantiles. I then mapped dumb_quantiles categories to counties of…
Patrick
  • 1,057
  • 9
  • 23
2
votes
2 answers

java Stream collect to TreeMap in reverse order

I have the following code to collect a map from the stream, and convert it to a treemap Map result = myMap.values().stream().collect(Collectors.toMap(Person::getScore, Person::getName)); return new TreeMap<>(result); Is there a…
Jeeppp
  • 1,553
  • 3
  • 17
  • 39
2
votes
1 answer

In R, how can I plot the location of item with their source on europe map using ggplot?

I want to plot the location("longitude" and "latitude") of each item with their "source" (e.g. English, French, Korean or Japanese) like Below picture. To do this, I prepare a 'csv' file including "longitude", "latitude" and "source" like below,…
user12388610
  • 167
  • 1
  • 11
2
votes
1 answer

How to get raw traffic flow data

Creating application to use car count data from traffic. How do I access the live google maps, waze or bing maps data?
Jeff Gribbon
  • 33
  • 1
  • 3
2
votes
2 answers

Leaflet map not filling area

I am using Leaflet to produce different maps on a button click, but the map is not filling the whole area. The click event grabs various longitudes and latitudes that were stored in my database and sent to the page in a datatable. The button click…
John Beasley
  • 2,577
  • 9
  • 43
  • 89
2
votes
1 answer

Android: Launch Google Maps App

I saw in another Stack Overflow post you can open the Google maps application from your application by passing two address as parameters in the URL. String url = "http://maps.google.com/maps?saddr=some+address&daddr=another+Address" Intent intent =…
2
votes
0 answers

How to cache weather forecast data?

I'd like to create a smart cache for my weather forecast API requests (temperature, wind, etc. for a given point). I query the forecast provider by specifying coordinates of the point I want to get the data from. Sometimes, I query the same points…
Defozo
  • 2,946
  • 6
  • 32
  • 51