POST
|
Looks nice simple and exactly what I was looking for. Thanks Zack!
... View more
09-15-2020
04:20 PM
|
1
|
0
|
1126
|
POST
|
So I realized I could convert from lat/lon points <---> UTM coordinates using CoordinateFormatter.ToUTM() <---> CoordinateFormatter.FromUTM(). If I convert into UTM coordinates then I should be able to find the angle between the two vertices using arctan2() and then recursively add points using ynew = r * sin(angle) + yprev, xnew = r * cos(angle) + xprev. Then convert back to lat/lon points and generate the mapPoints that way. I don't know if this is the most effecient way, but it's the first thing that came to my mind. I would still appreciate suggestions/responses.
... View more
09-15-2020
01:52 PM
|
0
|
0
|
1124
|
POST
|
I'm currently trying convert a Polyline into evenly spaced MapPoints. For instance if I have Polyline of two points such as: var builder = new PolylineBuilder(SpatialReference.Wgs84); var part = new List<MapPoint>(); part.Add(new MapPoint(x1, y1); part.Add(new MapPoint(x2,y2); builder.AddPart(part); var polyLine = builder.ToGeometry(); I would like to specify a certain spacing e.g. 10 meters, and then generate n different MapPoints along the Polyline. For example, if the total distance (L2) between the vertices(x1,y1), (x2,y2) on the Polyline is 95 meters then I would generate 9 MapPoints that are 10 meters spaced apart (the remaining 5 meters would be disregarded). To specify a little more, the distance between the two Polyline vertices will not be significantly large (they definitely will be in the same UTM zone) so it is safe to assume the line will not be curved, and is straight. Any suggestions?
... View more
09-15-2020
01:23 PM
|
0
|
3
|
1210
|
POST
|
But could I still associate a string label with the node when clicked?
... View more
09-03-2020
01:21 PM
|
0
|
1
|
822
|
POST
|
Hello, I was wondering if it is possible to label nodes (each with a distinct string labels e.g. A1, A2, A3, ... ) from a polyline and to only visually see the labels when a mouse hovers over a node? I'm working in C# .Net and was wondering if ArcGIS SDK supports this? Not sure if I have to override a built in class within the framework. Please, see the diagram below to get a visual representation of exactly what I would like to accomplish. Thank you guys!!
... View more
09-03-2020
09:22 AM
|
0
|
3
|
874
|
POST
|
Hi Michael, thanks for the article I'll take a look through it. As Morten, suggested I needed to create a Dispatcher to switch back to the UI thread- which worked great. I definitely need to read more up on multi threading. Thanks!
... View more
08-27-2020
01:24 PM
|
0
|
0
|
1610
|
POST
|
Hi Morten, Thanks for your help. You are spot. I wasn't able to update the UI from background thread so instead I used exactly what you said. I created a delegate object and then called the Dispatcher to switch back to the UI which worked perfectly. Thanks again for your help.
... View more
08-27-2020
01:20 PM
|
0
|
0
|
1610
|
POST
|
I'm new to ArcGIS SDK and using C# in general so please bare with me. I'm currently creating a .Net Application in C# that will display a GPS location of a robotic-vehicle in real time while also displaying other data from the vehicle e.g. engine speed, spray pressure, vehicle speed etc. The displaying of the vehicles location within the ArcGIS esri map works great and doesn't freeze that U.I. at all. I created two different threads, each with a socket, exclusively for receiving or sending data. The GPS position of the robotic-vehicle comes in through the receiving socket at ~ 20hz. However, when I send data to be displayed in an odometer that I made or even a simple text box then the U.I. completely freezes until the operation is complete or just shuts down. I have tried to create the operation of changing the text box/odometer in it's own thread and calling Thread.Sleep() within that function, but it has the same outcome where it doesn't show the incremental changes in the display, but rather the result after the entire operation is completed or shutdown completely. My MainWindow.xaml.cs looks something like the following: namespace ArcGISRuntime.WPF.Samples.SketchOnMap { private GraphicsOverlay _sketchOverlay; public SketchOnMap() { InitializeComponent(); // Call a function to set up the map and sketch editor Initialize(); } private void Initialize() { // Create a light gray canvas map Map myMap = new Map(Basemap.CreateImageryWithLabelsVector()); // Create central point where map is centered MapPoint centralPoint = new MapPoint(X, Y, SpatialReferences.Wgs84); // Create starting viewpoint Viewpoint startingViewpoint = new Viewpoint( centralPoint, 3000); // Set starting viewpoint myMap.InitialViewpoint = startingViewpoint; // Create graphics overlay to display sketch geometry _sketchOverlay = new GraphicsOverlay(); MyMapView.GraphicsOverlays.Add(_sketchOverlay); // Assign the map to the MapView MyMapView.Map = myMap; // Fill the combo box with choices for the sketch modes (shapes) SketchModeComboBox.ItemsSource = System.Enum.GetValues(typeof(SketchCreationMode)); SketchModeComboBox.SelectedIndex = 0; // Set the sketch editor as the page's data context DataContext = MyMapView.SketchEditor; } private void Update(){ for (int i = 0; i < 8000; i++){ textbox.Text = i.ToString(); Thread.Sleep(1000); } } private async void DrawButtonClick(object sender, RoutedEventArgs e){}.... private void ButtonSock_Click(Object sender, RoutedEventArgs e){ Thread th1 = new Thread(Update); th1.Start(); } } } Please let me know if you have any suggestions for this. To reiterate, I can continually display the robotic-vehicles location without freezing since I have a method within the same public partial class SketchOnMap that uses the following: private void Draw_Position(byte[] b_lat, byte[] b_lon){ double d_lat = ConvertByteArrayToDouble(b_lat); double d_lon = ConvertByteArrayToDouble(b_lon); MapPoint startingPoint = new MapPoint(d_lon, d_lat, SpatialReferences.Wgs84); // Create a symbol to symbolize the point SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(SimpleMarkerSymbolStyle.Circle, Color.Black, 10); // Create the graphic Graphic symbolGraphic = new Graphic(startingPoint, symbol); _sketchOverlay.Graphics.Add(symbolGraphic); }
... View more
08-26-2020
02:38 PM
|
0
|
4
|
1677
|
Title | Kudos | Posted |
---|---|---|
1 | 09-15-2020 04:20 PM |
Online Status |
Offline
|
Date Last Visited |
05-08-2021
08:29 AM
|