POST
|
It seems what I want to do should be easy and obvious, but I can't find anything on it. I have a flex app that is updating SQL Server data in response to user inputs and displaying that data in real time. I have a polygon shapefile that I want to display according to fields in that SQL Server data and have the map update in real time along with the SQL Server data. Is there a way to join this data in Flex so that the SQL Server and the map can reside on different servers? If that's not possible and I join the shapefile to the SQL Server tables in a map document that I publish as a web service, will the map with the joined data update when the SQL Server table updates so that I can map changes live? Thanks, Karl
... View more
08-29-2012
07:09 AM
|
0
|
0
|
417
|
POST
|
I'm trying to call the geoprocessor from arcengine in c# code and I keep getting an error. I've used simple file and folder names, and the process works fine in ArcMap, but fails in arcengine. Here is the error message from the geoprocessor: Zonal statistics program failed Executing: ZonalStatisticsAsTable C:\testnes\subs.shp AREA_NAME C:\testnes\nonesurr C:\fortis\table6.dbf DATA Start Time: Tue Sep 06 09:25:46 2011 An error was encountered while executing ZonalStatisticsAsTable. ("esriGeoAnalyst.GridEngine") Zonal statistics program failed Error in executing grid expression Failed to execute (ZonalStatisticsAsTable). End Time: Tue Sep 06 09:25:51 2011 (Elapsed Time: 5.00 seconds) And here is the source code: GPHelper.GPZonalStats(@"C:\testnes\subs.shp", @"C:\testnes\nonesurr", "AREA_NAME", @"C:\fortis\table6.dbf"); GPHelper class functions: public static bool GPZonalStats(string strZoneRaster, string strValueRaster, string strZoneField, string strTable) { Geoprocessor pGP = new Geoprocessor(); ZonalStatisticsAsTable zonalStats = new ZonalStatisticsAsTable(); zonalStats.in_zone_data = strZoneRaster; zonalStats.in_value_raster = strValueRaster; zonalStats.zone_field = strZoneField; zonalStats.out_table = strTable; return RunGP(pGP, zonalStats, null); } public static bool RunGP(Geoprocessor geoprocessor, IGPProcess process, ITrackCancel TC) { // Set the overwrite output option to true //Debug.WriteLine(Convert.ToString(geoprocessor.GetEnvironmentValue("Workspace"))); geoprocessor.OverwriteOutput = true; // Execute the tool try { geoprocessor.Execute(process, null); return ReturnMessages(geoprocessor); } catch (Exception err) { Console.WriteLine(err.Message); return ReturnMessages(geoprocessor); } } // Function for returning the tool messages. private static bool ReturnMessages(Geoprocessor gp) { if (gp.MessageCount > 0) { string allMessages = null; for (int Count = 0; Count <= gp.MessageCount - 1; Count++) { Console.WriteLine(gp.GetMessage(Count)); allMessages += gp.GetMessage(Count); } if (allMessages.Contains("successfully")) { return true; } else return false; } else return false; }
... View more
09-06-2011
05:42 AM
|
0
|
1
|
1017
|
POST
|
I posted a similar question last week which got no responses, but I've done a little more digging and found some new and interesting details so, here goes again: I'm trying to migrate a standalone desktop application built on ArcEngine 9.3 to ArcEngine 10. I've gone through all the migration steps to get to a working program. The core algorithm includes a number of map algebra operations run using the RasterModel class and saving outputs as GRID files in a personal geodatabase. Two different sets of these run and work fine. At first I thought the third, which uses the ouputs from the first set as inputs, created a raster with max and min values of 3.4e10+38 and -3.4e10+38, which is, obviously, not the correct output from the map algebra. It displays as a gray field. I have since discovered that if I then go back and add another of these output rasters, it will now display correctly, with values in acceptable ranges. Only the first raster I add to my map document displays incorrectly. The same raster added after another raster will display correctly. Nevertheless, my code throws an error when attempting to work with these rasters: Value does not fall within the expected range at ESRI.ArcGIS.DataSourcesRaster.IRasterProps.set_NoDataValue. The line throwing the error is: pRasPropNew.NoDataValue = pRasProp.NoDataValue; where pRasPropNew is an IRasterProps interface on a newly created RasterDataset and pRasProp is an IRasterProps interface on the Raster described above that sometimes displays correctly and sometimes not. The program works fine and produces correct outputs when run with ArcEnine 9.2 or 9.3, none of the functional code for the map algebra has changed with the migration, so I'm inclined to blame this on some previously undiscovered bug or incompatibility between 9.3 and 10 having to do either with the RasterModel or with saving and opening rasters from personal geodatabases. I'm open to any possibility though. This is the map algebra statement: [out1] = [input0] * 10 + [input1] * -1 + [input2] * 5 + [input3] * 10 + 0.0
... View more
06-22-2011
12:43 PM
|
0
|
0
|
431
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|