|
POST
|
Hello, when trying to run the Sketch Editor sample from Android Studio 3.6.3, Windows 10, Runtime SDK 100.7, with an emulated device (e.g. Pixel C or Nexus 5X, API 29), I can successfully create points and multipoints on the map. But when I try to set the second vertex of a polyline or polygon, the app crashes with the following exception: com.esri.arcgisruntime.ArcGISRuntimeException: Internal error exception: GL Uniform not found: ubo_ps.u_tex_size
at com.esri.arcgisruntime.internal.jni.CoreGeoView.nativeDraw(Native Method)
at com.esri.arcgisruntime.internal.jni.CoreGeoView.a(SourceFile:346)
at com.esri.arcgisruntime.internal.h.b.o.a(SourceFile:132)
at com.esri.arcgisruntime.mapping.view.MapView.onDrawFrame(SourceFile:156)
at com.esri.arcgisruntime.mapping.view.GeoView$b.onDrawFrame(SourceFile:1363)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1573)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272) The sample works great on a real device. Is this a known limit of the emulator, or does somebody know how to fix this? Thanks Fridjof
... View more
05-06-2020
09:59 AM
|
0
|
2
|
1237
|
|
POST
|
Thank you Gayle, good to know that you are looking into this!
... View more
05-06-2020
09:46 AM
|
0
|
0
|
959
|
|
POST
|
Hello folks, Starting from Raster Layer GeoPackage | ArcGIS for Developers I wrote some code that loads rasters from a GeoPackage into a map. This works as expected. But up to now I am unable to tell which raster is which, because the name of the raster in the GeoPackage does not appear anywhere. What I tried: for (GeoPackageRaster r: rasters) {
r.addDoneLoadingListener(() -> {
String desc = r.getDescription();
String path = r.getPath();
Log.d(TAG, "Raster Path: " + path + ", Description: " + desc);
});
// create a layer to show the raster
RasterLayer geoPackageRasterLayer = new RasterLayer(r);
geoPackageRasterLayer.addDoneLoadingListener(() -> {
String name = geoPackageRasterLayer.getName();
String desc = geoPackageRasterLayer.getDescription();
Log.d(TAG, "Layer Name: " + name + ", Description: " + desc);
});
mMapView.getMap().getOperationalLayers().add(geoPackageRasterLayer);
} What seems strange to me is that the raster path always returns the path to the GeoPackage, but not to the raster within the GeoPackage. Is this a bug? Also, the description returns an empty string, and a getName method does not exist. I wouldn't expect the RasterLayer to return a name or description if it was not set explicitly, but I tried just to make sure (and it doesn't). In my app, I need to tell the rasters apart in order to assign scale ranges etc. to the layers. Storing each raster in a separate GeoPackage is not an option. Shouldn't there be a property or method to get more info about a GeoPackage raster? Thanks for any suggestions Fridjof
... View more
04-29-2020
04:00 AM
|
0
|
2
|
1006
|
|
IDEA
|
As opposed to QGIS, ArcGIS Desktop + Pro do not store or use extent information when storing feature classes in a GeoPackage. The following screenshot is from a GeoPackage gpkg_contents table where the first 3 feature classes where created by QGIS and the last one by ArcGIS Desktop. When adding a GeoPackage feature class with many hundreds of thousands of features to ArcMap as a feature layer, it takes quite a long time to calculate its extent. This could be avoided if ArcMap used the extent information from the gpkg_contents table instead. Therefore, all ArcGIS applications should write this information to the GeoPackage and use it when accessing the data.
... View more
03-26-2020
05:41 AM
|
2
|
0
|
534
|
|
IDEA
|
It would be great to have some more options in the the AddRasterToGeoPackage tool in ArcGIS Desktop and ArcGIS Pro. At present, for example, it is impossible to control: the number of bands in the GeoPackage output raster the compression type (PNG, JPEG or other, as far as supported by the GeoPackage standard) the compression level when using JPEG compression the resampling method for building pyramids (nearest neighbour/bilinear/bicubic) whether or not to create pyramids at all and up to which level To my knowledge, ArcGIS uses the GDAL library for converting the rasters. Therefore it should be possible to hand the available and applicable options on to the geoprocessing tools.
... View more
03-26-2020
05:22 AM
|
2
|
1
|
729
|
|
POST
|
I found what I was looking for. There is a Generalize3D method in the ArcObjects interface IPolycurve3D. It just hasn't been exposed in a toolbox tool.
... View more
07-20-2016
06:01 AM
|
0
|
0
|
2440
|
|
POST
|
Hi Dan, Just found this discussion, and I have another application case where I would need 3D generalization. My customer maintains a road network and wants to print kilometrage on maps that can be used by car drivers and should be consistent with their trip meters. Since part of the network is in mountainous terrain, we decided to use 3D length derived from a 10m DGM and accumulate it in M values. In a first step, we get the Z component onto the road nethwork with the Interpolate Surface tool, so that we can calculate the 3D length. You might argue that this does not represent the "true" length of the road, but it is certainly closer to reality than the 2D length. The tool densifies the road network with vertices at about every 10 m, blowing up the size of the dataset by about 100%. We now want to generalize the dataset to get rid of vertices that do not have an influence on 3D length and the M values - that is, vertices that fall on a straight line in 3D space (straight line in XY space and zero or constant slope). My approach for now is this: From the densified and 3D length calibrated road network, extract all vertices to points and add X, Y, Z, M attributes Generalize the road network (all vertices on straight lines in the XY space will drop out) Locate features along routes to get updated M values for the extracted vertices along the generalized routes Determine the difference between M values before and after generalization - those points where the difference is greater than a tolerance value we need to add back (this is a subset of the points that dropped out before) Re-calibrate the road network with its vertices plus the points identified in step 4 - this will add only the relevant vertices back I still think that the Douglas Peucker algorithm should not be too difficult to be implemented in 3D space, so maybe I will give it a try some day as an alternative.
... View more
07-13-2016
08:14 AM
|
0
|
1
|
2440
|
|
POST
|
Mark, There is now an idea at ideas.arcgis.com Support unit testing in ArcGIS Pro and ArcGIS Runtime .NET SDKs. Anyone who reads this, if this issue matters to you, please promote the idea. The mocking framework I used in my previous post was Telerik JustMock. There are also Typemock Isolator and MS Fakes where things like this are possible. All of them are commercial products and not cheap. Apparently, Esri uses MS Fakes, but this is only available at the Enterprise level of Visual Studio. Fridjof
... View more
11-15-2015
07:34 AM
|
0
|
0
|
3469
|
|
POST
|
Juho, There is now an idea at ideas.arcgis.com: Support unit testing in ArcGIS Pro and ArcGIS Runtime .NET SDKs. If this seems important to you, please promote the idea. I don't consider this question answered. Apparently, Esri uses MS Fakes internally for writing their unit test, i.e., they can isolate their code from dependencies by using Shims. However, MS Fakes is only available for the Enterprise edition of Visual Studio. Both the ArcGIS Runtime SDK .NET and the ArcGIS Pro SDK support all editions of Visual Studio.
... View more
11-15-2015
07:25 AM
|
2
|
0
|
749
|
|
POST
|
Richard, While I had the same issue with events from a filebased GDB, I tried your suggestion, reloading lyr files within ArcObjects, but without success. I also tried to re-create the RouteEventSourceName for the layers and do a IDataLayer2.Disconnect/Connect, nothing worked. The cache seems to be clever enough to understand that I'm still referencing the same event table, but too stupid to refresh itself. What finally helped me out was setting the DWORD decimal value of HKEY_CURRENT_USER\Software\ESRI\ArcMap\DynSeg\UseOptimization to 0 in the registry as described in 34350 - How are updates to event layers handled in ArcGIS Server? . Maybe this helps if anyone else is looking for a solution to the same problem here. Fridjof
... View more
10-28-2015
01:52 AM
|
0
|
0
|
580
|
|
POST
|
Luke, Tugba, You may get this kind of error if you don't bind to an ArcObjects license before running the test. You can do so in the Arrange section of your test or in a setup method that is run before all tests. For example, with NUnit, if you have all your tests in one assembly, it is sufficient to have one class with the SetUpFixture attribute and a one-line method to bind the license: [SetUpFixture]
public class GetLicense
{
[SetUp]
public void TestSetUp()
{
RuntimeManager.BindLicense(ProductCode.Desktop, LicenseLevel.Standard)
}
} With regard to mocking, I prefer using NUnit with NSubstitute, and it works quite well. Luckily, in ArcObjects everything has an interface and can be mocked. Sometimes you need to mock several interfaces in one object, but NSubstitute lets you do this, or you can write your own interface and inherit as many of the ArcObjects interfaces as you need and then mock them with NSubstitute.
... View more
10-15-2015
11:17 AM
|
0
|
1
|
1351
|
|
POST
|
Mark, This is a great post, and while I have been trying out the ArcGIS Pro and the SDK (both are great), with regard to unit testing I am inclined to painting it as black as you did. I really hope that Esri will listen to their TDD developers and make their new frameworks more testable. This is an issue not only for the ArcGIS Pro SDK but also for the ArcGIS Runtime SDK for .NET, for example. Some days ago I had the opportunity to test an unconstrained mocking framework that allows unit testing against anything, and I wrote a test against the GetCityLayerCount method of the original class you posted in your first code listing. This is what the test looks like: [Test]
public void GetCityLayerCount_OneMatchingFeature_ReturnsOne()
{
// create some mock objects
var queryFilter = Mock.Create<QueryFilter>();
var selectedLayer = Mock.Create<FeatureLayer>();
// Arrange mock objects
var selectedLayers = new List<FeatureLayer> { selectedLayer };
Mock.Arrange(() => new QueryFilter()).Returns(queryFilter);
Mock.Arrange(() => MapView.Active.GetSelectedLayers().OfType<FeatureLayer>()).Returns(selectedLayers);
// Set them up so the function eventually calls MoveNext() on our mock rows object.
Mock.Arrange(() => selectedLayer.Search(queryFilter)).Returns(rows);
// rows.MoveNext() must be set up to return true the first time it is called, and false the second time.
Mock.Arrange(() => rows.MoveNext()).Returns(true).InSequence();
Mock.Arrange(() => rows.MoveNext()).Returns(false).InSequence();
// Run the function under test.
var featureLayerCounter = new FeatureLayerCounter();
var actualCount = featureLayerCounter.GetCityLayerCount();
Assert.That(actualCount, Is.EqualTo(1));
} Now I should mention that this mocking framework is a commercial product that costs a few hundred bucks per seat, not a free one like NSubstitute. I know there are at least two commercial mocking frameworks that allow this kind of mocking, and I'm not a big fan of either, even though their capabilities are fascinating. I think that once you've taken a few steps forward in becoming a TDD developer, designing your apps more carefully according to the SOLID principles of object oriented software design and finding them to become more testable, an unconstrained mocking framework will give you just too much freedom to fall back into old habits and your design will suffer. I prefer your approach of extracting interfaces and refactoring static calls to instance calls. Maybe even a code generator might help to generate some kind of proxy layer from Esri's libraries for that matter, although this may soon become complicated when dealing with generic types and collections. Therefore, please don't take this contribution as an answer to your question. I'd rather see it as a workaround, and I really support your concern. We should push Esri to provide better support for building testable applications with their new SDKs.
... View more
09-29-2015
07:08 AM
|
3
|
2
|
3469
|
|
POST
|
I'm surprised this still isn't supported, since the 10.2 documentation states: "The records returned by SearchCursor can be constrained to match attribute criteria or spatial criteria." But how to constrain the records to match spatial criteria?
... View more
07-17-2015
05:29 AM
|
2
|
0
|
1282
|
|
BLOG
|
Schicke Sache! Ich hatte die .NET-Lösung genau wie beschrieben bei mir zum Laufen gebracht und wollte sie gerade näher anschauen, bekomme jetzt aber in ArcGISPortalWebMapItemsViewModel.SearchArcgisOnline() eine Exception bei: await featureLayer.InitializeAsync(); Meldung: "Invalid argument : Invalid JSON. PictureMarker contentType unknown." Stimmt da vielleicht was mit Eurem Layer http://services.arcgis.com/OLiydejKCZTGhvWg/arcgis/rest/services/Schadensmeldung/FeatureServer/0 nicht...? In der DrawingInfo steht: "contentType":"", gehört das so? Ich verwende das ArcGIS Runtime SDK 10.2.5.0.
... View more
03-31-2015
03:22 AM
|
0
|
0
|
709
|
|
POST
|
Typemock Isolator is great, I know... and there are other commercial frameworks that use the Profiling APIs, such as JustMock and MS Fakes, with similar abilities that are very helpful, especially for legacy code. I was just hoping NOT to need them and to stay with my favourite, free and easy-to-use NSubstitute. In my opinion, when writing new software from scratch, creating fakes with dynamic proxies (like NSub does) should be perfectly sufficient. I particularly like that this approach forces you to think about design goals more seriously, leading to cleaner code.
... View more
03-02-2015
01:37 AM
|
0
|
0
|
749
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-16-2022 09:21 AM | |
| 1 | 05-19-2025 12:15 AM | |
| 2 | 03-27-2023 07:31 AM | |
| 1 | 03-01-2023 10:59 PM | |
| 1 | 11-18-2022 06:55 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-26-2025
11:19 PM
|