4
$\begingroup$

I'm attempting to use Mathematica to manually create a graph from a set of GPS coordinates (vertices). This graph will define the paths an autonomous rover will travel along. Here's what I have so far with sample points:

names = {"p01", "p02", "p03", "p04", "p05", "p06"};
coordinates = 
  SetPrecision[
   Map[GeoPosition, {{-33.004560, 134.595354}, {-33.004757, 
      134.600941}, {-33.009869, 134.602529}, {-33.011276, 
      134.589902}, {-33.004574, 134.606091}, {-33.002037, 
      134.594315}}], 9];
bounds = {{-33.013276, -33.001649}, {134.588632, 134.607482}};
saltMap = 
  GeoImage[GeoRange -> bounds, GeoRangePadding -> None, 
   GeoProjection -> "Mercator"];

labeledCoordinates = MapThread[Labeled[#1, #2] &, {coordinates, names}];
GeoListPlot[labeledCoordinates, GeoRange -> bounds, GeoRangePadding -> None, GeoProjection -> "Mercator", 
      GeoBackground -> saltMap, ImageSize -> 800]

Which outputs this satellite map and some points What I want this program to do is to let me click pairs of vertices and draw an edge between them. Ideally It would also generate a Graph from these labeled vertices and edges, but simply displaying points and edges graphically would be good enough. The real data I will be using is of hundreds of points within about a square km but with sparse connections. Could some of you wizards please help? I'm very new to Mathematica. Cheers!

$\endgroup$
  • 1
    $\begingroup$ Have you seen this? $\endgroup$ – CA Trevillian May 22 at 21:00
  • $\begingroup$ I have now! Thank you very much. $\endgroup$ – Nicolas May 24 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.