Message Boards Message Boards

[?] Create a map with the coordinates of meteo stations of different class?

I have these data (coordinates of meteo stations) and the class (1, 2 ,3 ,4) :

{{36.867, 30.733}, {1}, {41.283, 2.067}, {2}, {41.133, 
  16.783}, {3}, {44.413, 8.838}, {2}, {40.977, 28.815}, {3}, {36.274, 
  23.017}, {1}, {36.667, -4.483}, {2}, {43.45, 5.233}, {2}, {43.658, 
  7.216}, {2}, {38.176, 13.091}, {3}, {42.74, 2.871}, {2}, {43.684, 
  10.393}, {4}, {36.405, 28.086}, {1}, {41.8, 12.233}, {4}, {40.52, 
  22.971}, {3}, {42.367, 19.25}, {4}, {45.677, 
  13.754}, {4}, {39.489, -0.482}, {2}}

And I want a map, with each station draw with a marker for each class Thanks A. Dauphine

POSTED BY: André Dauphiné
5 Replies

Add the option:

PlotMarkers -> {
    Style["\[FilledCircle]", FontSize -> 16],
    Style["\[FilledDiamond]", FontSize -> 16],
    Style["\[FilledSquare]", FontSize -> 16],
    Style["\[FilledUpTriangle]", FontSize -> 16]
  }

to the GeoListPlot...

POSTED BY: Sander Huisman

The solution 3 is good But can we have more big markers? Thanks A. D

POSTED BY: André Dauphiné

The format is a bit strange, but we can shape the data:

data={{36.867,30.733},{1},{41.283,2.067},{2},{41.133,16.783},{3},{44.413,8.838},{2},{40.977,28.815},{3},{36.274,23.017},{1},{36.667,-4.483},{2},{43.45,5.233},{2},{43.658,7.216},{2},{38.176,13.091},{3},{42.74,2.871},{2},{43.684,10.393},{4},{36.405,28.086},{1},{41.8,12.233},{4},{40.52,22.971},{3},{42.367,19.25},{4},{45.677,13.754},{4},{39.489,-0.482},{2}};
data=Partition[data,2]; (* take every 2 elements *)
data[[All,1]]=GeoPosition/@data[[All,1]]; (* each first elements is a gps coordinate *)
data=GatherBy[data,Last] (* put points with the same class together *)
GeoListPlot[data[[All,All,1]] (*all the coordinates*) ,PlotLegends->data[[All,1,-1,1]] (* all the labels *)]
POSTED BY: Sander Huisman
data = Partition[{{36.867, 30.733}, {1}, {41.283, 
    2.067}, {2}, {41.133, 16.783}, {3}, {44.413, 8.838}, {2}, {40.977,
     28.815}, {3}, {36.274, 
    23.017}, {1}, {36.667, -4.483}, {2}, {43.45, 5.233}, {2}, {43.658,
     7.216}, {2}, {38.176, 13.091}, {3}, {42.74, 2.871}, {2}, {43.684,
     10.393}, {4}, {36.405, 28.086}, {1}, {41.8, 12.233}, {4}, {40.52,
     22.971}, {3}, {42.367, 19.25}, {4}, {45.677, 
    13.754}, {4}, {39.489, -0.482}, {2}}, 2]
markers = 
  Map[GeoMarker[#[[1]], 
     Graphics[{Blue, Disk[], Black, Text[#[[2, 1]], {0, 0}]}]] &, 
   data];
GeoGraphics[markers]

enter image description here

POSTED BY: l van Veen
Posted 7 years ago

You can try this :

data = {{36.867, 30.733}, {1}, {41.283, 2.067}, {2}, {41.133, 
   16.783}, {3}, {44.413, 8.838}, {2}, {40.977, 28.815}, {3}, {36.274,
    23.017}, {1}, {36.667, -4.483}, {2}, {43.45, 5.233}, {2}, {43.658,
    7.216}, {2}, {38.176, 13.091}, {3}, {42.74, 2.871}, {2}, {43.684, 
   10.393}, {4}, {36.405, 28.086}, {1}, {41.8, 12.233}, {4}, {40.52, 
   22.971}, {3}, {42.367, 19.25}, {4}, {45.677, 
   13.754}, {4}, {39.489, -0.482}, {2}};

Rearrange the data-

mapData=Partition[data, 2]/.{x_, y_}:>Thread[{GeoPosition[x]->First@y}][[1]]

You can use GeoRegionPlot-

GeoRegionValuePlot[mapData, PlotMarkers -> GeoMarker]

The plot will be- enter image description here

POSTED BY: Girish Arabale
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract