POST
|
I'm trying to display continuous-valued (floating point) rasters in ArcGIS Runtime v100.0 (for example, with values on the range [-2.5, 6.3] or [0.2, 0.44]. In the API Reference for the Stretch Renderer, the fourth parameter of the constructor is a ColorRamp object. public StretchRenderer(StretchParameters stretchParameters, IEnumerable<double> gammas, bool estimateStatistics, ColorRamp colorRamp) This object seems to have only a Create method - which creates a color ramp of a predefined type and size. public static ColorRamp Create(PresetColorRampType type, uint size = 256) The PresetColorRampType enumeration has only the following types: -1 (not defined), 0 (elevation), 1 (DEM for screen display) and 2 (DEM, light-colored). Can I create a custom ColorRamp that I can use to display my floating point raster data? Any insights will be greatly appreciated!
... View more
05-17-2017
12:28 PM
|
0
|
1
|
970
|
POST
|
I'm trying to union two valid (polygon) geometries (they both have valid extents and spatial references), but when I do the Union, I get an empty geometry with NaN extent: Geometry aGeom = GeometryEngine.Union(aGeom1, aGeom2); The input geometries (aGeom1, aGeom2) are rectangular polygons in the WGS84 spatial reference (WKID = 4326). I've even tried unioning one of the geometries with itself - and I still get an empty geometry. Please help!
... View more
03-29-2017
10:46 AM
|
0
|
2
|
2077
|
POST
|
I'm currently trying to add a number of DTED tiles (not always the same tiles or the same number) as a layer to a Map using ArcGIS Runtime for .NET (v100.0). The three RasterType values of greatest interest are 'Raster', 'MosaicDatasetRaster' and 'GeopackageRaster'. I was recently able to create an ElevationSource from multiple raster files in order to query elevation from a Surface. Is there an analog for a Raster object to be displayed in a RasterLayer? Specifically: Can the RasterType 'Raster' be used to do this? (My research to date indicates that it may only be possible to use this type for a single raster file, rather than a collection.) I know that a Mosaic Dataset (of multiple files) can be created in a file geodatabase, but didn't think the Runtime could consume data from a file geodatabase. So, what type of Mosaic Dataset is being referred to by the 'MosaicDatasetRaster' type? I was able to use the Desktop Create SQLite Database tool to create an empty SQLite geopackage (.gpkg) database. Are there any tools for adding raster files to one of these databases? Is the 'Unknown' RasterType an option? Has anyone used the 'Unknown' type to represent raster data in a layer? Any insights on any of these questions will be much appreciated. Thanks! Mark
... View more
03-22-2017
07:09 AM
|
0
|
1
|
1052
|
POST
|
Mike: Sorry, I didn't notice your reply. Initially, it was not in a SceneView. I added that, and now I can get elevation values OK. Thanks for you help! Mark
... View more
03-21-2017
12:39 PM
|
0
|
0
|
1713
|
POST
|
Another reply to self. Scene/SceneView apparently does support on-the-fly projection. I get the same elevation value whether I re-project the input MapPoint or not.
... View more
03-21-2017
12:21 PM
|
0
|
1
|
1713
|
POST
|
This is a reply to myself (and also for the consumption of anyone else who might be trying to do the above). I added the following right before the last line of code in my post above: SceneView aSceneView = new SceneView(); aSceneView.Scene = dtedScene; ...and was successful in getting an elevation value from the surface! The only thing I'm still trying to sort out is a possible projection issue. The spatial reference of the scene is WKID 4326 (WGS-84), but the spatial reference of the MapPoint that I'm passing into the GetElevationAsync method is WKID 3857 (Web Mercator Aux Sphere). So ... I'm getting a valid elevation, but am not sure if its for the correct spot in the scene. Does anyone know if Scene/SceneView does on-the-fly projection if the input MapPoint is in a different projection? Mark
... View more
03-21-2017
11:57 AM
|
0
|
2
|
1713
|
POST
|
Mike: I am trying to do this as well (get elevation values from a DTED1 surface) and have the following code (which is pretty similar to what you show above. (In this code dted1Files is an enumeration of DTED1 tiles and args.Location is a MapPoint - obtained via mouse click on a 2D map, not a scene.) RasterElevationSource dted1ElevSource = new RasterElevationSource(dted1Files); await dted1ElevSource.LoadAsync(); dted1ElevSource.Name = "DTED1"; Surface elevSurface = new Surface(); elevSurface.ElevationSources.Add(dted1ElevSource); elevSurface.Name = "DTED1 Surface"; await elevSurface.LoadAsync(); Scene dtedScene = new Scene(); dtedScene.BaseSurface = elevSurface; await dtedScene.LoadAsync(); double anElevation = await elevSurface.GetElevationAsync(args.Location); However, I get a null exception error on the last line (elevSurface.GetElevationAsync). The message on the error states that 'Elevation must be in a scene view before getting elevation'.Any thoughts on what I'm missing? Any insights are much appreciated. Thanks! Mark
... View more
03-21-2017
10:52 AM
|
0
|
6
|
1713
|
POST
|
I'm developing with the ArcGIS Runtime (v100.0) for .NET. The description of the ElevationsSources property for a Surface states that it can be used to get or set the collection of elevation sources in a surface. However, when I try to use the property, it is apparently read only. So, how do I go about setting the elevation sources for a surface? Any insight will be much appreciated. Thanks!
... View more
03-21-2017
07:46 AM
|
0
|
2
|
979
|
POST
|
From attending the recent Dev Summit and some additional on-line research, I know that it's possible to display the contents of individual raster files (or raster datasets stored in a file geodatabase) using the runtime for .net local server (desktop only). Has anyone tried to do this, and are there any code snippets available that are helpful? Any help will be much appreciated. Thanks!
... View more
03-14-2016
07:47 AM
|
2
|
0
|
1777
|
POST
|
I have a globe document with several layers draped on the globe surface (e.g., use globe elevation as their own). If I add an elevation layer programmatically (that is, one that provides elevation information to the globe), how can I get the draped layers to use that elevation?
... View more
12-16-2011
05:04 AM
|
0
|
1
|
470
|
POST
|
Sean: Thanks for your prompt response, but I'm still having difficulty - now with the distinction between the basemap layer (the container), and the layers inside it. When you say "For each basemap layer that you want to put in the snapping exclusion set...", are you referring to the container, or the layers inside it? Here's some sample code that might illustrate my misunderstanding better (anExclLyrSet is of type ISet): ILayer = aLyr = aMap.get_Layer(i); if (aLyr.Name == "Basemap") { IBasemapLayer aBmapLyr = (IBasemapLayer)aLyr; ICompositeLayer aCompLyr = (ICompositeLayer)aLyr; IBasemapSubLayer aBmapSubLyr = null; for (int j = 0; j < aCompLyr.Count; j++) { aLyr = aCompLyr.get_Layer(j); aBmapSubLyr = aBmapLyr.FindLayerWrapper(aLyr); if (aBmapSubLyr != null) anExclLyrSet.Add(aBmapSubLyr.Layer); } } When it gets to the aBmapSubLyr = aBmapLyr.FindLayerWrapper(aLyr); line, I get an error - probably because at this point aLyr is NOT a basemap layer (but one of the layers it contains). However, I'm not sure what else I could use as the ILayer argument of the FindLayerWrapper method? Mark C.
... View more
09-12-2011
04:55 AM
|
0
|
0
|
505
|
POST
|
I'm working with ArcObjects in C#, and am trying to exclude all map layers but one (the only one I want to snap to) from the snapping environment. I'm using the ISnappingEnvironment and IPointSnapper interfaces. I've put the following code in the OnClick method of the tool I'm using: m_Snapper = m_SnappingEnvironment.PointSnapper; ISet anExclLyrSet = new SetClass(); m_Snapper.ExcludedLayers(ref anExclLyrSet); ...loop through all map layers, adding all but the one of interest to anExclLyrSet m_Snapper.ClearCache(); Basically, I'm getting poor snapping performance due to the presence of a basemap layer that contains multiple feature layers. If I turn that layer off (make invisible), the performance is good. I've confirmed that all the layers (for composite type layers, I add each sub-layer to the exclusion as well) are being added to the exclusion set, but I can't seem to get the performance to improve without turning off that basemap layer. I'm not sure what I'm doing wrong - does the cache need to be cleared after each individual layer is excluded? I'd appreciate insights anyone might have regarding this. Thanks! Mark C.
... View more
09-09-2011
06:17 AM
|
0
|
8
|
1089
|
POST
|
Does anyone know if there's an issue with the ITopologicalOperator Union and Difference methods that depends on the earth hemisphere? I've been struggling with an issue of code that produces strange/wrong results on Union and/or Difference operations - but only with data in the Eastern Hemisphere! It always seems to run correctly with my Western Hemisphere data, but sometimes/often in the Eastern Hemisphere the results of polygon Unions and Differences come out incorrectly. Has anyone encountered this issue before? If so, is there a work-around? Mark C.
... View more
04-18-2011
10:08 AM
|
0
|
0
|
643
|
Title | Kudos | Posted |
---|---|---|
2 | 03-14-2016 07:47 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|