POST
|
Do we have local raster support in dotnet with latest version -perhaps 10.2.7 or 10.2.8(Quartz) ?
... View more
07-15-2016
07:32 AM
|
0
|
0
|
458
|
POST
|
I find strange behavior with below implementation in Scene examples.The movement appears to have unexpected heading changes along the path.I have a set of points which are perfectly interpolated and are working fine in 2D animation. public double generateBearing(double ox, double oy, double dx, double dy) { double bearing = 0.0; double lon1 = ToRad(ox); double lat1 = ToRad(oy); double lon2 = ToRad(dx); double lat2 = ToRad(dy); double dLon = lon2 - lon1; double y = Math.Sin(dLon) * Math.Cos(lat2); double x = Math.Cos(lat1) * Math.Sin(lat2) - Math.Sin(lat1) * Math.Cos(lat2) * Math.Cos(dLon); double bRad = Math.Atan2(y, x); double tmpB = ToDegrees(bRad); //bearing =360.0-(tmpB+270.0)%360.0; bearing = tmpB; return bearing; } private void CreateAnimationViewpoints() { _animationViewpoints = new List<Camera>(); Array.Reverse(x); Array.Reverse(y); heading = new double[nPointCount]; for (int i = 0; i < nPointCount-1; i++) { heading=generateBearing(x, y, x[i + 1], y[i + 1]); // heading = getBearing(x, y, x[i + 1], y[i + 1]); _animationViewpoints.Add(new Camera(new MapPoint(x, y, 50), heading, 70)); } } private async void MySceneView_SpatialReferenceChanged(object sender, System.EventArgs e) { MySceneView.SpatialReferenceChanged -= MySceneView_SpatialReferenceChanged; try { for (int i = 0; i < nPointCount; i++) { await MySceneView.SetViewAsync(_animationViewpoints, 1, false); } // Set navigation in the order we want to animate the camera } catch (Exception ex) { MessageBox.Show("Error occured while navigating to the target viewpoint", "An error occured"); Debug.WriteLine(ex.ToString()); } }
... View more
11-19-2015
06:57 AM
|
0
|
2
|
2085
|
POST
|
I am trying to load georaster as instructed in this link http://www.arcgis.com/home/item.html?id=1eec30bf5fa042a5a2227b094db89441 From my python program ,I imported ESRI specific gdal library.It looks like 'georaster' is not working from ESRI Python,others like 'geotiff' are working fine.However the same is working on standalone python and GDAL combination. from osgeo import gdal driver = gdal.GetDriverByName("georaster") type(driver) <type 'NoneType'>
... View more
11-18-2015
10:16 PM
|
0
|
0
|
2345
|
POST
|
Trying to run a geoprocessing task as in this example.The tool fails when submitted for execution with below error "System.ArgumentException: Only 'http' and 'https' schemes are allowed.\r\nParameter name: requestUri\r\n at System.Net.Http.HttpRequestMessage.InitializeValues(HttpMethod method, Uri requestUri)\r\n at System.Net.Http.HttpRequestMessage..ctor(HttpMethod method, Uri requestUri)\r\n at System.Net.Http.HttpClient.GetAsync(Uri requestUri, HttpCompletionOption completionOption, CancellationToken cancellationToken)\r\n at Esri.ArcGISRuntime.Http.ArcGISHttpClient.GetOrPostAsync(String requestUri, IEnumerable`1 parameters, CancellationToken cancellationToken, Boolean forcePost, HttpCompletionOption completionOption)\r\n at Esri.ArcGISRuntime.Tasks.Geoprocessing.Geoprocessor.<ExecuteInternal>d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at ArcGISRuntimeSDKDotNet_DesktopSamples.Samples.MyRaster.<ViewshedButton_Click>d__5.MoveNext() in C:\\Raster1\\Contour\\MainWindow.xaml.cs:line 82" private string gpkPath = @"C:\sapyexamples\contour\contour.gpk"; private string gpUrl = string.Empty; try { var gpService = new Esri.ArcGISRuntime.LocalServices.LocalGeoprocessingService(gpkPath, GeoprocessingServiceType.SubmitJobWithMapServerResult); await gpService.StartAsync(); gpUrl = gpService.UrlGeoprocessingService; var taskName = "contour"; // create Geoprocessor var gp = new Geoprocessor(new Uri(gpkPath + "/" + taskName)); // set up the parameters - see serviceURL for parameter info var parameter = new GPInputParameter(); var tifFile = new GPString("elevation", @"..\..\raster\contourdata.gdb\elevation"); var interval = new GPString("Interval", "400"); var shpFile = new GPString("Contour_Result", @"..\..\vector\scratch.gdb\aaaa.shp"); // add GPParameters to the parameter collection parameter.GPParameters.Add(tifFile); parameter.GPParameters.Add(interval); parameter.GPParameters.Add(shpFile); var result = await gp.ExecuteAsync(parameter);//FAILS HERE MessageBox.Show("Success"); } catch (Exception ex) { MessageBox.Show("No Luck"); MessageBox.Show(ex.ToString()); }
... View more
09-09-2015
03:30 AM
|
0
|
0
|
3062
|
POST
|
"ESRI could do a much better job in distinguishing the differences between the offerings and also outlining the future roadmap in regards to Desktop ArcObjects and Engine" @Owen Earley , As you rightly said I am looking for unambiguous roadmap from ESRI.
... View more
08-25-2015
08:34 AM
|
2
|
6
|
3800
|
POST
|
I am looking for clarifications on below What is ArcPro SDK for ? Is it replacement for ArcEngine(ArcObjects) ? For standalone applications ArcEngine(ArcObjects) is used for now.Will this get replaced by ArcPro SDK ? If ArcPro SDK is replacement for ArcEngine(ArcObjects) then How different is it from ESRI ArcGIS Run-time ? ESRI ArcGIS Runtime or ArcPro SDK what is right for long term ? What do you advise for GIS system designers who wants to plan now on choosing between ArcEngine or otherwise. Will I get some comparison table for ArcEngine vs ESRI ArcGIS Run-time vs ArcPro SDK
... View more
08-25-2015
12:22 AM
|
0
|
8
|
11532
|
POST
|
Thanks,I figured it out. tagRECT is giving me current extent. IActiveView activeView = ArcMap.Document.FocusMap as IActiveView; IDisplayTransformation DT = activeView.ScreenDisplay.DisplayTransformation; tagRECT deviceRECT = DT.get_DeviceFrame();
... View more
08-13-2015
03:02 AM
|
0
|
0
|
377
|
POST
|
I want to draw a graphic in current visible portion of the map.I am using DrawGraphic(0,0,0axMapControl.Width, axMapControl.Height) in stand-alone ArcEngine application.Both Height and Width in this case return Integer.What is the equivalent of this,if the same has to be done in ArcMap.?
... View more
08-11-2015
10:48 AM
|
0
|
2
|
2973
|
POST
|
The sample here makes use of .tpk file to handle raster Geoprocessing.How to make use of .tif , .img etc directly to perform Geoprocessing tasks using Runtime Local Server.I am looking for a sample code. How do you set GPRasterDataLayer to a local raster file ,for eg:- C:\TEMP\Denver.tif ? How do you set GPRasterDataLayer to a local raster file ,if the output is Slope ? How do you set GPFeatureRecordSetLayer to a local vector file for saving the output of Geoprocessing as Countour ?
... View more
07-28-2015
09:58 PM
|
0
|
4
|
4769
|
POST
|
I think I can live with the first error.Tried below code after enabling runtime on GPK - still getting more errors.Please let me know how to upload the gpk file.. private static string gpkPath = @"C:\arcgis-runtime-samples-dotnet-master\samples- data\geoprocessing\TableToExcel\TableToExcel.gpk"; private Geoprocessor _gpTask; private async void StartButton_Click(object sender, RoutedEventArgs e) { try { var gpService = new LocalGeoprocessingService(gpkPath, GeoprocessingServiceType.Execute); await gpService.StartAsync(); string gpUrl = gpService.UrlGeoprocessingService; _gpTask = new Geoprocessor(new Uri(gpUrl + "/TableToExcel")); GetServiceInfo(); } catch (Exception ex) { MessageBox.Show(ex.Message, "Sample Error"); } } private async void GetServiceInfo() { string message = null; try { var result = await _gpTask.GetTaskInfoAsync(); var sb = new StringBuilder(); if (result != null) { sb.Append("{"); sb.AppendLine(string.Format("\t\"name\" : \"{0}\",", result.Name)); sb.AppendLine(string.Format("\t\"displayName\" : \"{0}\",", result.DisplayName)); sb.AppendLine(string.Format("\t\"category\" : \"{0}\",", result.Category)); sb.AppendLine(string.Format("\t\"helpUrl\" : \"{0}\",", result.HelpUrl)); sb.AppendLine(string.Format("\t\"executionType\" : \"esriExecutionType{0}\",", result.ExecutionType)); sb.AppendLine("\t\"parameters\" : ["); foreach (var p in result.Parameters) { sb.AppendLine("\t{"); sb.AppendLine(string.Format("\t\t\"name\" : \"{0}\",", p.Name)); sb.AppendLine(string.Format("\t\t\"dataType\" : \"{0}\",", p.DataType)); sb.AppendLine(string.Format("\t\t\"displayName\" : \"{0}\",", p.DisplayName)); sb.AppendLine(string.Format("\t\t\"direction\" : \"esriGPParameterDirection{0}\",", p.Direction)); sb.AppendLine(string.Format("\t\t\"defaultValue\" : \"{0}\",", p.DefaultValue)); sb.AppendLine(string.Format("\t\t\"parameterType\" : \"esriGPParameterType{0}\",", p.ParameterType)); sb.AppendLine(string.Format("\t\t\"category\" : \"{0}\"", p.Category)); if (p.ChoiceList != null) { sb.AppendLine("\t\t\"choiceList\" : ["); foreach (var c in p.ChoiceList) sb.AppendLine(string.Format("\t\t\t\"{0}\"", c)); sb.AppendLine("\t\t\"]"); } sb.AppendLine("\t},"); } sb.AppendLine("\t]"); sb.Append("}"); message = sb.ToString(); } } catch (Exception ex) { message = ex.Message; } MessageBox.Show(message, "Service Info"); }
... View more
07-27-2015
12:09 AM
|
0
|
0
|
350
|
POST
|
I am facing similar problem using NET SDK. have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.6,I get below errors when running the application.I am not trying to Deploy yet. The application is running using developer license.The license is valid for development and testing only. Geoprocessor service failed.LocalServer start failed.executable not found. What is the correct procedure to solve this ? import arcpy from arcpy import env import os env.workspace = arcpy.GetParameter(0) fcList = arcpy.ListFeatureClasses() text_file = open("C:/Output242.txt", "w") for fc in fcList: print fc.rstrip(".shp") text_file.write(fc.rstrip(".shp")) text_file.close() I am using the below code in C# NET for consuming this gpk service. private string gpkPath = @"C:\Script2.gpk"; private string gpUrl = string.Empty; private async void StartLocalGpService() { var gpService = new LocalGeoprocessingService(gpkPath,GeoprocessingServiceType.Execute); await gpService.StartAsync();//Fails Here gpUrl = gpService.UrlGeoprocessingService; var geoprocessor = new Geoprocessor(new Uri(gpUrl +"/Script2")); }
... View more
07-23-2015
10:39 PM
|
0
|
4
|
3389
|
POST
|
Hi Lucas, I am facing similar problem using NET SDK. have created a gpk using the below python script in ArcGIS 10.3.When trying to consume as Local geoprocessing service in 10.2.6,I get below errors when running the application.I am not trying to Deploy yet. The application is running using developer license.The license is valid for development and testing only. Geoprocessor service failed.LocalServer start failed.executable not found. What is the correct procedure to solve this ? import arcpy from arcpy import env import os env.workspace = arcpy.GetParameter(0) fcList = arcpy.ListFeatureClasses() text_file = open("C:/Output242.txt", "w") for fc in fcList: print fc.rstrip(".shp") text_file.write(fc.rstrip(".shp")) text_file.close() I am using the below code in C# NET for consuming this gpk service. private string gpkPath = @"C:\Script2.gpk"; private string gpUrl = string.Empty; private async void StartLocalGpService() { var gpService = new LocalGeoprocessingService(gpkPath, GeoprocessingServiceType.Execute); await gpService.StartAsync();//Fails Here gpUrl = gpService.UrlGeoprocessingService; var geoprocessor = new Geoprocessor(new Uri(gpUrl + "/Script2")); }
... View more
07-23-2015
12:12 AM
|
0
|
1
|
795
|
POST
|
I have imported SRTM DEM into Oracle 11g using FME.The block size is set to 128X128.I am able to view the data in QGIS,Tatuk and play with it using GDAl command line.Unable to view the same in ArcMap. Never.Never faced any issue with vector though.Why Raster loading is not as simple as vector ? Apparently , all documentation that I have come across has evasive responses providing no clue at all on what to do in simple steps. ArcCatalog shows me The raster and RDT tables.I get the error "The specified raster column does not exist", when try to drag and drop. I have verified that my DBTUNE parameters are set SDO_GEORASTER. Am I missing something ?
... View more
01-27-2015
08:47 AM
|
0
|
0
|
2982
|
POST
|
I am using 9.3.1. Attaching the shape files that I used in UTM projection 1)Points.shp---My features of interest 2)BoundingBox.shp----Envelope for above points 3)BoundingBox_Centroid.shp---Centroiod of this envelope 4)BoundingBox_Centroid_Generat.dbf---Near table created by Proximity Analysis tool 5)BoundingCircle.shp---Buffer created using largest distance(3582.146565 meters in this case) FID 1275 is the farthest vertex in Points.shp from centroid ..this seems to lie oust side the BoundingCircle I noticed an interesting thing...I have used 'Smooth' tool from Advanced Editing feature,with a threshold of 0.09(which is the measured deviation from circle boundary to the outlier point).This is resulting in a circle that passes through the outlier point just as I need. Unfortunately,this is true only during editing session.The changes get lost when I save the changes brought in by 'smooth' .
... View more
12-05-2012
07:31 PM
|
0
|
0
|
188
|
Title | Kudos | Posted |
---|---|---|
2 | 08-25-2015 08:34 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|