0
|
10704 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
GROUPS:

# Help with map display

Posted 9 years ago
 Here is my code. (* Create empty lists *) xlist={}; ylist={}; zlist={}; (* Take inputs for ECEF *) (Label[startinput];x = Input["What is the x coordinate?"]; y = Input["What is the y coordinate?"]; z = Input["What is the z coordinate?"]; AppendTo [xlist, x] AppendTo [ylist, y] AppendTo [zlist, z] (Label[errorcontrol]; again=InputString["Enter more coords? Y for yes, N for no"]; If [again=="Y", Print["Okay!"];Goto[startinput]]; If [again!="N", Print["Sorry, this is an invalid input here!"];Goto[errorcontrol]]; If [again=="N", Print["Okay."]])); (* Debugging *) Print[xlist] Print[ylist] Print[zlist] Print[x] Print[y] Print[z] (* Combine Lists *) list=Transpose[{xlist,ylist,zlist}] (* More Debugging *) Print[list] (* Put in Coordinate Form *) GeoPositionXYZ[{x, y, z}, "ITRF00"]; (* Convert to LLA *) GeoPosition[%] (* Display Map *) GeoGraphics[GeoMarker[GeoPosition[%]],GeoRange -> "World", GeoProjection -> "Robinson"] (* Display 3D Plot *) ListPointPlot3D[list, DataRange -> {{-1000000, 1000000}, {-1000000, 1000000}}] The issue is: The map only displays the very last point entered. It should show all the points but I have absolutely no idea how to convert an entire list of cartesian coordinates to latitude longitude and then display them all on the map. Thanks for the help.
2 Replies
Sort By:
Posted 9 years ago
 del
Posted 9 years ago
 Perhaps you can look at this and see how to adapt it to display multiple points on the same map points = {}; For[i = 1, i < 6, i++, point = Input["What are the {x,y,z} coordinates?"]; AppendTo[points, GeoMarker[GeoPosition[point]]]; ]; GeoGraphics[points, GeoRange -> "World", GeoProjection -> "Robinson"] Note: You enter those x,y,z coordinates inside braces, like this,{13, 25, 37}for each point