POST
|
Thank you Thomas, that would be great. I was now able to get the necessary points from my underlying ElevationService to construct a side polygon this way: var url = "http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/ DGM025_cache_3D/ImageServer/getSamples"; var options = { query: { geometry: '{"paths" : [ [ [3450000, 5400000], [3455000, 5400000] ] ], "spatialReference" : {"wkid" : 31463}}', geometryType: 'esriGeometryPolyline', returnFirstValueOnly: false, sampleDistance: stepSize, f: 'pjson' }, responseType: 'json' }; esriRequest(url, options).then(function(response){ var polygonPointArray = []; for (var i = 0; i < response.data.samples.length; i++) { polygonPointArray.push( [xmin + (i * stepSize), ymin, parseFloat(response.data.samples.value)]); } polygonPointArray.push([xmax, ymin, 0]); polygonPointArray.push([xmin, ymin, 0]); polygonPointArray.push([xmin, ymin, parseFloat(response.data.samples[0].value)]); // This constuctor with sr is necessary due to special coordinate system var polygon = new Polygon({ rings: polygonPointArray, spatialReference: { wkid: 31463 } }); var fs = new SimpleFillSymbol({ color: [227, 139, 79, 0.8], outline: { color: [255, 255, 255], width: 1 } }); var polygonGraphic = new Graphic({ geometry: polygon, symbol: fs }); graphicsLayer.add(polygonGraphic); }); But it ends with a strange symbol behaviour, outline is drown but fill is missing! A similar behaviour was described here but never really cleared: SimpleFillSymbol style does not work In my case I need it in a SceenView and it works in this example: Add Graphics to a SceneView - 4.4 maybe related to local scene? I've no clue.
... View more
08-31-2017
07:43 AM
|
0
|
5
|
1013
|
POST
|
Hello, I was wondering if there`s a way to extrude a 3d surface in the Esri JavaScript API 4.4 to a specific height or maybe another surface. This was a very vommon task in good old ArcScene and it can be very helpful to create a 3d body from a 3d surface. Actually I have a local scene with a custom Elevation Layer and Topographic Map. That looks as follows: Now I would like to visualize the scene as a block scene so not only a surface but more like a block cutted out of the landscape to give the scene so more plasticity. Is this possible with build in functionality? Otherwise I would try to construct sides and border as single graphics and add them to the scene. Any help is very appreciated! Richard
... View more
08-31-2017
05:13 AM
|
0
|
7
|
1517
|
POST
|
Hi, I`m also encountering lock problems in the ArcGIS Pro SDK while creating and editing FGDB Feature Classes. Creation works without errors but the population with EditOperation only work once. I`m calling await Project.Current.SaveEditsAsync(); after my whole process is done, which should finish all remaining edit locks, or not? My code is shown here: Writing Features into FGDB very slow I`m repeating this multiple times in my running ArcGIS Pro session. User is selecting a MeasureSet, if its not availabale in FGDB it will be fetached from Postgres DB, written into FGDB and loaded into the map. This works only once. The second time, fc is created in DB but I never enter my EditOperation callback, instead I get "ArcGIS.Core.Data.GeodatabaseTableException". I have to reopen ArcGIS Pro to get it again work only once!!! So this also doesn`t get fixed when migrating to 2.x?
... View more
08-23-2017
03:05 AM
|
0
|
0
|
1068
|
POST
|
Hello Sean, we`re currently still using 1.3 and I`m not sure if we will update to 2.x, depends on the effort. So I guess there is for now no solution to increase the process. But glad to hear you guys are working on that. Because this is a really important feature. Shall I close the ticket?
... View more
08-15-2017
05:05 AM
|
0
|
3
|
1219
|
POST
|
I was now able to solve this issue. The problem was not an unmatch of the spatial reference systems between elevation and topographic service. They were both in 31436 from the beginning but we were missing a tile cache on the elevation service. We now calculated the cache with the same tiling scheme as the topographic base layer and it works now! Also important, it was not enougth to just do: const elevLayer = new ElevationLayer({ url: 'http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM025_cache_3D/ImageServer' }); var map = new Map({ basemap: basemap, ground: [ elevLayer ] }); I also had to execute map.ground.layers.add(elevLayer);
... View more
08-15-2017
12:32 AM
|
2
|
1
|
871
|
POST
|
Hello Thomas, if I`m doing it that way I don`t get any errors but also no terrain. If I check the network traffic in chrome dev tools then the elevation service isn`t called at all. I believe it`s maybe because our Elevation Service isn`t cached so we will first try to cache it with the same tiling sheme as the other map service. Is there any special documentation of how to publish a cached elevation service in a projected coordinate system and not global? I just want to understand, the local scenes are there to show local projected 3d map views in other coordinate system then web mercator. I can`t add ground: "world-elevation" as default there because it will never support the local coordinate system, so I need a custom ground base layer in my appropriate system.
... View more
08-14-2017
05:40 AM
|
0
|
1
|
871
|
POST
|
Hello Sean, I`ve tested my above script again and logged out time with stopwatch. For a single task with 11305 rows these are my times: 2017-08-14 10:25:30,622 [Main CIM thread] INFO - Start Write Package to FGDB: 0 seconds 2017-08-14 10:25:31,196 [Main CIM thread] INFO - Package Size: 11305 0,575 seconds 2017-08-14 10:25:31,259 [Main CIM thread] INFO - Start writing loop: 0,639 seconds 2017-08-14 10:25:31,260 [Main CIM thread] INFO - Before point transformation: 0,639 seconds 2017-08-14 10:25:31,268 [Main CIM thread] INFO - Before point transformation: 0,648 seconds 2017-08-14 10:25:31,273 [Main CIM thread] INFO - After rowbuffer filled: 0,652 seconds 2017-08-14 10:25:31,314 [Main CIM thread] INFO - After create row: 0,693 seconds 2017-08-14 10:25:31,316 [Main CIM thread] INFO - After invalidate row: 0,695 seconds 2017-08-14 10:25:57,724 [Main CIM thread] INFO - After loop: 27,102 seconds 2017-08-14 10:25:57,725 [Main CIM thread] INFO - Release rowbuffer: 27,102 seconds 2017-08-14 10:25:57,725 [Main CIM thread] INFO - Release rowbuffer end: 27,102 seconds 2017-08-14 10:25:57,725 [Main CIM thread] INFO - Release feature: 27,102 seconds 2017-08-14 10:25:57,725 [Main CIM thread] INFO - Release feature end: 27,102 seconds Or to add the times to the logged code lines: public Task<int> WriteDataIntoFeatureClass(string name, int index, Component selectedComponent, Config config, FeatureClassFieldInfo[] fieldInfos) { return QueuedTask.Run(() => { _stopWatch.Start(); _logger.Info("Start Write Package to FGDB: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0 s SpatialReference dhdn3_zone3 = SpatialReferenceBuilder.CreateSpatialReference(31467); SpatialReference wgs84 = SpatialReferences.WGS84; ProjectionTransformation customTransformation = ArcGIS.Core.Geometry.ProjectionTransformation.Create(wgs84, dhdn3_zone3); // Only write to feature class if it's empty if (selectedComponent.Measures.Count() != 0) { EditOperation editoperation = new EditOperation(); string message; int packageSize = Convert.ToInt16(Math.Floor(Convert.ToDouble(selectedComponent.Measures.Count() / 7))); _logger.Info("Package Size: " + packageSize.ToString() + " " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.575 s using (Geodatabase geodatabase = new Geodatabase(config.FGDB.Path)) { double progressStep = Convert.ToDouble(80) / Convert.ToDouble(selectedComponent.Measures.Count()); using (ArcGIS.Core.Data.FeatureClass featureClass = geodatabase.OpenDataset<ArcGIS.Core.Data.FeatureClass>(name + "_" + selectedComponent.Kid.ToString())) using (SpatialReferenceBuilder srbuilder = new SpatialReferenceBuilder(4326)) using (var rowbuffer = featureClass.CreateRowBuffer()) using (FeatureClassDefinition fcDefinition = featureClass.GetDefinition()) { editoperation.Callback(context => { Feature feature = null; try { _logger.Info("Start writing loop: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.639s for (var m = (index - 1) * packageSize; m < (index * packageSize) - 1; m++) { if (selectedComponent.Measures .Long != null && selectedComponent.Measures .Lat != null) // do not add measures without valid coords { if (m == (index - 1) * packageSize) _logger.Info("Before point transformation: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.639 s MapPoint point = MapPointBuilder.CreateMapPoint(Convert.ToDouble(selectedComponent.Measures .Long), Convert.ToDouble(selectedComponent.Measures .Lat)); MapPoint pointDhdn = GeometryEngine.ProjectEx(point, customTransformation) as MapPoint; if (m == (index - 1) * packageSize) _logger.Info("Before point transformation: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.648s rowbuffer[fcDefinition.GetShapeField()] = point; rowbuffer[fieldInfos[0].Name] = selectedComponent.Measures .Id; rowbuffer[fieldInfos[1].Name] = selectedComponent.Measures .Wert; rowbuffer[fieldInfos[2].Name] = selectedComponent.Measures .Zeit; rowbuffer[fieldInfos[3].Name] = selectedComponent.Measures .Status; rowbuffer[fieldInfos[4].Name] = pointDhdn.X; rowbuffer[fieldInfos[5].Name] = pointDhdn.Y; if (m == (index - 1) * packageSize) _logger.Info("After rowbuffer filled: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.652s feature = featureClass.CreateRow(rowbuffer); if (m == (index - 1) * packageSize) _logger.Info("After create row: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.693s context.Invalidate(feature); if (m == (index - 1) * packageSize) _logger.Info("After invalidate row: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 0.695s } var status = Convert.ToInt32((1 + m) * progressStep); } _logger.Info("After loop: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 27.102s } catch (GeodatabaseException exObj) { _logger.Error(exObj.Message + " " + exObj.InnerException); } finally { if (rowbuffer != null) { _logger.Info("Release rowbuffer: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 27.102 s rowbuffer.Dispose(); _logger.Info("Release rowbuffer end: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 27.102s } if (feature != null) { _logger.Info("Release feature: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 27.102s feature.Dispose(); _logger.Info("Release feature end: " + _stopWatch.ElapsedMilliseconds / 1000f + " seconds"); 27.102s } } }, featureClass); var task = editoperation.ExecuteAsync(); var creationResult = task.Result; if (!creationResult) message = editoperation.ErrorMessage; } } } return 20 + (index * 10); }); } You see one row costs 0.056s which sums in 27 s for 11305 features. The major cost is generated in line: feature = featureClass.CreateRow(rowbuffer); with alone 0.041s for one row Do you have any suggestions?
... View more
08-14-2017
01:40 AM
|
0
|
5
|
1219
|
POST
|
Hey everybody, I was asking myself if it`s already possible to create a local 3d scene in lets say srid 31463 with a custom ElevationLayer. I have a topographical TileService: RIPS_TK_Cache (MapServer) and an ElevationService http://ripsraster.lubw.bwl.de/arcgis/rest/services/Imageservices/DGM005/ImageServer Does anybody know how to do that? Thank you for any help!
... View more
08-08-2017
09:19 AM
|
0
|
5
|
1120
|
POST
|
Hello, in my ArcGIS Pro add-in project I`m writing features into a file geodatabase feature class. At the moment this process takes far to much time. This is why I split up my features. For example I want to write 7000 Features/Rows into the FeatureClass then I start 7 async Tasks with packages of each 1000 objects. This is what I`m doing: public Task<int> WriteDataIntoFeatureClass(string name, int index, Component selectedComponent, Config config, FeatureClassFieldInfo[] fieldInfos) { return QueuedTask.Run(() => { SpatialReference dhdn3_zone3 = SpatialReferenceBuilder.CreateSpatialReference(31467); SpatialReference wgs84 = SpatialReferences.WGS84; ProjectionTransformation customTransformation = ArcGIS.Core.Geometry.ProjectionTransformation.Create(wgs84, dhdn3_zone3); // Only write to feature class if it's empty if (selectedComponent.Measures.Count() != 0) { EditOperation editoperation = new EditOperation(); string message; int packageSize = Convert.ToInt16(Math.Floor(Convert.ToDouble(selectedComponent.Measures.Count() / 7))); using (Geodatabase geodatabase = new Geodatabase(config.FGDB.Path)) { double progressStep = Convert.ToDouble(80) / Convert.ToDouble(selectedComponent.Measures.Count()); using (ArcGIS.Core.Data.FeatureClass featureClass = geodatabase.OpenDataset<ArcGIS.Core.Data.FeatureClass> (name + "_" + selectedComponent.Kid.ToString())) using (SpatialReferenceBuilder srbuilder = new SpatialReferenceBuilder(4326)) using (var rowbuffer = featureClass.CreateRowBuffer()) using (FeatureClassDefinition fcDefinition = featureClass.GetDefinition()) { editoperation.Callback(context => { Feature feature = null; try { for (var m = (index - 1) * packageSize; m < (index * packageSize) - 1; m++) { if (selectedComponent.Measures .Long != null && selectedComponent.Measures .Lat != null) { MapPoint point = MapPointBuilder.CreateMapPoint( Convert.ToDouble(selectedComponent.Measures .Long), Convert.ToDouble(selectedComponent.Measures .Lat)); MapPoint pointDhdn = GeometryEngine.ProjectEx(point, customTransformation) as MapPoint; rowbuffer[fcDefinition.GetShapeField()] = point; rowbuffer[fieldInfos[0].Name] = selectedComponent.Measures .Id; rowbuffer[fieldInfos[1].Name] = selectedComponent.Measures .Wert; rowbuffer[fieldInfos[2].Name] = selectedComponent.Measures .Zeit; rowbuffer[fieldInfos[3].Name] = selectedComponent.Measures .Status; rowbuffer[fieldInfos[4].Name] = pointDhdn.X; rowbuffer[fieldInfos[5].Name] = pointDhdn.Y; feature = featureClass.CreateRow(rowbuffer); context.Invalidate(feature); } var status = Convert.ToInt32((1 + m) * progressStep); } } catch (GeodatabaseException exObj) { // ToDo throw meaningful exception Console.WriteLine(exObj); } finally { if (rowbuffer != null) rowbuffer.Dispose(); if (feature != null) feature.Dispose(); } }, featureClass); var task = editoperation.ExecuteAsync(); var creationResult = task.Result; if (!creationResult) message = editoperation.ErrorMessage; } } } return 20 + (index * 10); }); } I think I`m not doing much special action. Just creating rowBuffer like in the examples and assign my object properties to it. I`m doing an additional geometry transformation but also without it it seems to be to slow in comparison to same actions in arcpy for example. I tried to remove 'context.Invalidate(feature);'. If I do so my writing process goes much faster but the feature class is empty in the end. Am I doing something wrong? Can I improve this somehow? Thank you for any help!
... View more
08-07-2017
01:41 AM
|
1
|
7
|
1925
|
POST
|
Hi, I`ve just played around with custom theme development and I used the DartTheme to customize it in different ways. I found out a lot of things and now I know how I can change the icons of the widgetPool widgets but what about the icons of LayerList and Legend that come with DartController? Of course I can replace the icons in ..\client\stemapp\widgets\xxx\images but then the icon changes for all themes. Is there a way how I can set different icon-src in different styles? Will ESRI provide some more documentation to this topic in the future? I really like the web appbuilder development style but it still lacks documentation and training resources. For example on Esri Training there are anly two videos but in both cases many things didn`t work or they were not in depth enougth. In the documentation itself I found only one page for custom theme which was absolutely basic, not telling anything about doing own customizations. I'll go on to get into this stuff but it`s extremely hard. Best regards, Richard
... View more
01-11-2017
02:59 AM
|
0
|
0
|
640
|
POST
|
Hi, I`ve a question and I`m not sure if I`m encountering a bug or doing something wrong. I just played around with designing custom themes and I`m now ready so far. If I now choose my theme or any other and I switch to "Widgets" Tab, there I can add widgets to placeholders or controllers ... okay so far. If I do so, then on the next screen I get the option to change the widget symbol. When I now choose a PNG with transparency, the transparency will be ignored and I get a ugly background colour behind my icon. I`m using Web AppBuilder 2.2 and here`s what I found in my build_num.txt (maybe it helps you) origin/develop-a2c7d09b5fa36afca43c94191bc92697645a475c-2016/10/11-18:20:11.98-246 Can someone reproduce this behaviour? Best regards, Richard
... View more
01-11-2017
02:29 AM
|
1
|
7
|
2138
|
POST
|
Hi Uma, you were indeed right with the await keyword. I was missing it at style.SearchColorRampsAsync() too! Thank you again for this solution. I think it will still take a while for me to understand this whole async/await QueuedTask CourseGrained/FineGrained thing . Richard
... View more
12-16-2016
05:13 AM
|
0
|
0
|
536
|
POST
|
Hi Uma, thank you for that hint. Somehow I got the style file also when I didn't await it. Anyway now I await the style but I still cannot find color ramps in it, that's my major problem. Richard
... View more
12-16-2016
04:53 AM
|
0
|
0
|
536
|
POST
|
Hello, I`m currently in trouble with searching a StyleProjectItem for a specific ColorRamp / ColorRampStyleItem. First I have to say, I want to ship my style-file (*.stylx) with my addin project. So I created a *.stylx file and saved it under my addin project root folder. I`m also shipping the config.json with my project and for that I added both existing items into my VS project and set "always copy" for both files. That all seems to work fine. I can load the style into the project and I can get it from project by style-name but when I search for ColorRamps in the style by searchString I always get null. string stylePath = Path.Combine(JsonReader.addinAssemblyLocation(), "max_honsell_styles.stylx"); var styleLoaded = Project.Current.AddStyleAsync(stylePath); StyleProjectItem style = Project.Current.GetItems<StyleProjectItem>().First(x => x.Name == "max_honsell_styles"); IList<ColorRampStyleItem> colorRamps = style.SearchColorRampsAsync(MY SEARCH STRING AS PART OF COLOR RAMP NAME) as IList<ColorRampStyleItem>; I have no idea what could be wrong here. I also looked into the Assembly Cache, the stylx file is there! If I copy it and load it into ArcGIS pro manually, I see the colorScheme in it with the right name. Any idea would be very appreciated.
... View more
12-15-2016
05:08 AM
|
0
|
3
|
835
|
POST
|
Hi, sorry for my late answer. Yes I was able to solve it. Your layer will probably have an associated domain, please make sure your layer symbols are classified by this domain property. Then add a feature template to layer based on the domain calssification. Now if you publish the service you should have a "Types" section in your REST end point and your client problem should be solved.
... View more
10-12-2016
12:54 AM
|
0
|
0
|
405
|
Title | Kudos | Posted |
---|---|---|
1 | 06-04-2018 06:16 AM | |
1 | 06-04-2018 11:48 PM | |
1 | 10-29-2021 01:41 AM | |
1 | 01-22-2018 07:22 AM | |
1 | 09-29-2017 02:26 AM |
Online Status |
Offline
|
Date Last Visited |
08-15-2022
08:13 AM
|