POST
|
I've tried several different approaches to getting the simple geoprocessing package that I created to execute from my C# project . . . ESRI.ArcGIS.Client.Tasks.Geoprocessor _localGPService = null; string gpkPath = ConfigurationManager.AppSettings["EsriRuntimeGeoPackageLocation"]; string geoObjectPath = ConfigurationManager.AppSettings["EsriRuntimeGeoProcessorObject"]; LocalGeoprocessingService.GetServiceAsync(gpkPath, GPServiceType.Execute, (gpService) => { if (gpService.Error != null) { MessageBox.Show(gpService.Error.Message); } _localGPService = new ESRI.ArcGIS.Client.Tasks.Geoprocessor(gpService.UrlGeoprocessingService + geoObjectPath); DataContext = this; }); List<ESRI.ArcGIS.Client.Tasks.GPParameter> parameters = new List<ESRI.ArcGIS.Client.Tasks.GPParameter>(); _localGPService.ExecuteAsync(parameters); I've also tried the following . . . private LocalGeoprocessingService _localGPService = null; string gpkPath = ConfigurationManager.AppSettings["EsriRuntimeGeoPackageLocation"]; _localGPService = new LocalGeoprocessingService(gpkPath, GPServiceType.Execute); _localGPService.StartAsync((callback) => { if (callback.Error == null) { CoverButton.IsEnabled = true; } else { MessageBox.Show("Error starting gp service"); } }); string geoObjectPath = ConfigurationManager.AppSettings["EsriRuntimeGeoProcessorObject"]; ESRI.ArcGIS.Client.Tasks.Geoprocessor gp = new ESRI.ArcGIS.Client.Tasks.Geoprocessor(_localGPService.UrlGeoprocessingService + geoObjectPath); List<ESRI.ArcGIS.Client.Tasks.GPParameter> parameters = new List<ESRI.ArcGIS.Client.Tasks.GPParameter>(); gp.ExecuteAsync(parameters); When it gets to the last line (execute), I don't get an error, but it also doesn't do anything. I've been tracing through the code, and the geoprocessor object does get created and invoked with a URL, so I don't know why it does nothing. Tracing through, it appears as if everything is OK. The tool that the gpk was created from runs OK when I execute it in ArcMap. There are no input or output parameters in the model (tool). Any ideas as to what might cause this? I just don't know what to look for anymore. Thanks!
... View more
07-15-2013
10:50 AM
|
0
|
11
|
2816
|
POST
|
Evidently there is no tool that can find all tiles that intersect an AOI. The answer lies in creating a Python script from my C# code that does this.
... View more
06-14-2013
10:40 AM
|
0
|
0
|
274
|
POST
|
I ended up using ???Data Management tools???->???Rasters???->???Raster Processing???->???Clip Tool??? in my model. I was able to create a geoprocessing package from that.
... View more
06-14-2013
10:38 AM
|
0
|
0
|
158
|
POST
|
@GeoffAppleby I did look into the Select By Location tool. However I must not be using it correctly because it only displayed as "selected" the one layer that I indicated as input. It didn't select any overlapping rasters (which is what I would need). Somehow I don't think that this is the kind of selection that I need in this case. Thanks so much for your suggestion though.
... View more
06-11-2013
02:44 PM
|
0
|
0
|
274
|
POST
|
Can ModelBuilder toolbox tools be written in C#? I know that they can be created using ModelBuilder and Python. Thanks!
... View more
06-11-2013
10:11 AM
|
0
|
1
|
551
|
POST
|
Does a geoprocessing tool exist that can find all DTED tiles that intersect an AOI (or Polygon feature class)? I have a area of interest represented by a polygon and DTED tiles (some of which intersect with the AOI). Is there a tool that I can use to find which tiles intersect? Thanks!
... View more
06-11-2013
09:51 AM
|
0
|
5
|
558
|
POST
|
I am in need of a combination of geoprocessing tools that could replace Extract By Mask for use with WPF Runtime. The "Extract by Mask" tool is one of the tools that is not supported with Runtime. Also "Reclassify" is one tool that is not being supported by Spatial Analyst extension. However, right now I just want to concentrate on the Extract By Mask. When I use that tool in my model, run the model and then try to create a geoprocessing package (gpk) from that result, I get an error message letting me know that that tool is not supported. Therefore I need a combination of tools that could be used in my model, that would accomplish the same goal. Thanks, Renee
... View more
06-11-2013
09:47 AM
|
0
|
1
|
529
|
POST
|
Evidently I was proceeding from the wrong assumption. The ModelBuilder Toolbox is not something that I would add in. I just needed to select "Insert", "Iterators" and "Rasters" in the model builder window.
... View more
03-07-2013
04:21 AM
|
0
|
0
|
119
|
POST
|
Right now I'm attempting to iterate through rasters collected in a file geodatabase, in a model that I've created using the model builder in ArcGIS. I don't have the ModelBuilder Toolbox, otherwise this would be a lot simpler to do. Is there a way (without using the Iterate Rasters tool) that I can loop through the rasters in a gdb? Thanks, Renee
... View more
03-07-2013
03:59 AM
|
0
|
1
|
704
|
POST
|
I was able to do this with the following code snippit . . . // ********************* Convert from IGeometry to runtime geometry ********************* // Create a new instance of one Graphic. ESRI.ArcGIS.Client.Graphic aGraphic = new ESRI.ArcGIS.Client.Graphic(); // Create a SpatialReference for the Graphic. Point Graphics are known as MapPoint objects ESRI.ArcGIS.Client.Geometry.SpatialReference aSpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(4326); // Create a MapPoint object and set its SpatialReference and coordinate (X,Y,Z) information. ESRI.ArcGIS.Client.Geometry.MapPoint aMapPoint = new ESRI.ArcGIS.Client.Geometry.MapPoint(); aMapPoint.SpatialReference = aSpatialReference; aMapPoint.X = Point.X;// Point is an IPoint object aMapPoint.Y = Point.Y; aMapPoint.Z = Point.Z; // Create a new instance of a SimpleMarkerSymbol and set its Style, and Size Properties. ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol aSimpleMarkerSymbol = new ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol(); aSimpleMarkerSymbol.Style = ESRI.ArcGIS.Client.Symbols.SimpleMarkerSymbol.SimpleMarkerStyle.Circle; aSimpleMarkerSymbol.Size = 10; // Apply the Graphic's Geometry and Symbol Properties. aGraphic.Geometry = (ESRI.ArcGIS.Client.Geometry.Geometry)aMapPoint; aGraphic.Symbol = (ESRI.ArcGIS.Client.Symbols.Symbol)aSimpleMarkerSymbol; _graphicsLayer.Graphics.Add(aGraphic);
... View more
01-18-2013
10:22 AM
|
0
|
0
|
126
|
POST
|
I am attempting to write a method in C# that will accept as input, an ESRI.ArcGIS.Geometry.ISpatialReference object and convert it to an ESRI.ArcGIS.Client.Geometry.SpatialReference object. I need this for converting an IPoint to a MapPoint. Are there any online resources for this? I've looked at these two objects in the ArcObjects API reference, but couldn't figure out exactly how to create a routine for doing this. Thanks!
... View more
01-18-2013
10:15 AM
|
0
|
0
|
413
|
POST
|
How do I convert from an ESRI.ArcGIS.Geometry.IPoint to an ESRI.ArcGIS.Client.Graphic point object? In other words, I'm wanting to convert from an IGeometry to a runtime geometry, I guess. Thanks!
... View more
01-15-2013
04:58 AM
|
0
|
1
|
836
|
POST
|
I was able to determine that the reason the code wasn't running right was because I needed to change GPFeatureRecordSetLayer("Input Locations") to GPFeatureRecordSetLayer("Input_Locations") Such a minor thing, and I must have looked at the URL for the local runtime server a dozen times and didn't think about this because the name of the input parameters in the model had the space and not the underscore, and there was never an error or anything.
... View more
01-04-2013
09:07 AM
|
0
|
0
|
138
|
POST
|
Sorry for the late reply, I am now struggling with other issues regarding this. Anyway, I learned that the Network Dataset needs to be in a File Geodatabase, rather than just a regular folder. Once I made that change, the geoprocessing package was created with no problem. I don't know if this will resolve your problem, though. Unfortunately, the error messages related to using these Arc Objects are not exactly insightful.
... View more
12-24-2012
05:00 AM
|
0
|
0
|
341
|
POST
|
I went through the following two examples to get an idea of how to create a custom, local Routing Task. This is a walkthrough that takes you step by step through the creation of your first routing geoprocessing package: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/How_to_author_and_publish_a_geoprocessing_model/0170000000m5000000/. And here is the second part, that completes the picture and shows you how to run it from code: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/How_to_develop_a_point_to_point_routing_application/0170000000m6000000/ I was able to get it to run using my map package that I created (with my own vector data). However, when it runs and I click the "Solve" button, I can only get the Route graphic to display, that was displayed when I created the gpk from the result. The two points that I click on when running the code are obviously not used by the code to create the resulting Route graphic. I don�??t know what I�??m doing wrong with this example. Aren�??t you supposed to be able to use a gpk file to (in a sense) run that same model, but with different data each time? I was not able to get the actual data to upload (which includes the gpk and mpk files) so I don't know how much help the attached code will be. Thanks, Renee
... View more
11-12-2012
04:19 AM
|
0
|
1
|
1542
|
Title | Kudos | Posted |
---|---|---|
1 | 05-02-2017 07:16 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|