POST
|
Hi, The problem is in the SQL query: it seems, there is no planer/optimiser in FileGDBApi. To execute the original SQL ($"SELECT count(*) FROM TableName WHERE OBJECTID=1 or OBJECTID=2") takes 4466 ms on my table but to execute this one is only 16 ms on first run and 1 ms on second run: "SELECT Count(*) FROM Original WHERE OBJECTID IN (1, 2);" The full code: RowCollection rows = GDB.ExecuteSQL("SELECT Count(*) FROM Original WHERE OBJECTID IN (1, 2);"); foreach (Row row in rows) // Just to be generic. { int i = (int)row.GetDouble(0); } Ákos Halmai
... View more
10-23-2018
03:10 AM
|
0
|
0
|
1188
|
POST
|
Dear Kory, I can't miss the route identify function, so I tried to write my own. Is this code OK, or there is a better/shorter option? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ArcGIS.Core.CIM; using ArcGIS.Core.Data; using ArcGIS.Core.Geometry; using ArcGIS.Desktop.Catalog; using ArcGIS.Desktop.Core; using ArcGIS.Desktop.Editing; using ArcGIS.Desktop.Extensions; using ArcGIS.Desktop.Framework; using ArcGIS.Desktop.Framework.Contracts; using ArcGIS.Desktop.Framework.Dialogs; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Mapping; namespace T2 { internal class MT2 : MapTool { public MT2() { IsSketchTool = true; SketchType = SketchGeometryType.Point; SketchOutputMode = SketchOutputMode.Map; } protected override Task OnToolActivateAsync(bool active) => base.OnToolActivateAsync(active); protected override async Task<bool> OnSketchCompleteAsync(Geometry geometry) { if (geometry != null && !geometry.IsEmpty && ActiveMapView != null) { string RetString = await QueuedTask.Run(() => { IReadOnlyList<Layer> LayerList = ActiveMapView.Map.GetLayersAsFlattenedList(); int LayerCount = LayerList.Count; if (LayerCount <= 0) return "There is no layer on this map/scene!"; List<FeatureLayer> M_Layers = new List<FeatureLayer>(LayerCount); for (int i = 0; i < LayerCount; i++) { FeatureLayer featureLayer = (FeatureLayer)LayerList; if (featureLayer != null) using (FeatureClassDefinition featureClassDefinition = featureLayer.GetFeatureClass().GetDefinition()) if (featureClassDefinition.HasM()) M_Layers.Add(featureLayer); } if (M_Layers.Count <= 0) return "There is no M-aware layer on this map/scene!"; IGeometryEngine engine = GeometryEngine.Instance; MapPoint mapPoint = (MapPoint)geometry; StringBuilder stringBuilder = new StringBuilder(); var LayerDictionary = ActiveMapView.GetFeatures(geometry); foreach (var item in M_Layers) if (LayerDictionary.ContainsKey(item)) { stringBuilder.AppendLine(item.Name + ":"); using (RowCursor cursor = item.Search(new QueryFilter() { ObjectIDs = LayerDictionary[item].AsReadOnly() })) while (cursor.MoveNext()) using (Feature feature = (Feature)cursor.Current) stringBuilder.AppendLine("\t" + engine.NearestPoint(feature.GetShape(), mapPoint).Point.M.ToString("0.####")); } return stringBuilder.ToString(); }); MessageBox.Show(RetString,"Hit results"); } return true; } } }
... View more
10-18-2018
12:20 PM
|
0
|
1
|
2982
|
POST
|
Utility Network is designed for Enterprise environments only. ArcGIS Pipeline Referencing looks more promising -- if there is no better option.
... View more
10-16-2018
05:00 AM
|
0
|
3
|
2982
|
POST
|
What is the alternative for Geometric Network in ArcGIS Pro? I’d like to deal with water courses (river kilometers, segments and events based on measurement values on polyline, some topology for connectivity, upstream & downstream selection). I’d like to work on a local machine, in File Geodatabase. I have 3D, Spatial and Geostatistical lic. on Advenced level. How can I query the measurement value along a polyline by clicking (like in ArcMap)? If I have an M-aware polyline feature class, how can I define the start & end M value during the (always existing) edit session? (In ArcMap there was a right click --> Measurement --> From/To option).
... View more
10-16-2018
04:30 AM
|
0
|
6
|
5207
|
IDEA
|
Sometimes, the data is already ordered and in these cases we won’t need to create a camouflage ‘order’ field.
... View more
08-02-2018
03:36 AM
|
1
|
0
|
371
|
POST
|
Geoprocessing.MakeValueArray function drops the vertical coordinate system from the passed SpatialReference objects. It looks like only the WKID is preserved as a string instead of the whole Wkt. SpatialReference EOVEOMA = await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => SpatialReferenceBuilder.CreateSpatialReference(23700, 5787)); IReadOnlyList<string> Parameters = Geoprocessing.MakeValueArray(GDBPath, FCName, "POINT", "", "DISABLED","ENABLED", EOVEOMA, "MAX_FILE_SIZE_4GB", "", "", "", Alias); And the result is just "23700" in the 7th item on the Parameters variable. The workaround: just pass the Wkt property of the SpatialReference object instead the object itself. It seems like a bug.
... View more
02-23-2018
05:11 AM
|
0
|
0
|
411
|
POST
|
We’re finished our 5 th GIS day at University of Pécs, Hungary. We had 209 participants & 12 presenters! Check out our event: GISDay a Pécsi Tudományegyetemen
... View more
11-15-2017
12:38 PM
|
5
|
2
|
3089
|
IDEA
|
I posted it as an idea, but from different point of view it could be a bug. Thanks! Bye! 2017-09-19 15:50 GMT+02:00 Kory Kramer <geonet@esri.com>: GeoNet <https://community.esri.com/?et=notification.mention> You have been mentioned by Kory Kramer <https://community.esri.com/people/KKramer-esristaff?et=notification.mention> *in Make the “Feature To Point” able geoprocess to create 3D point feature class as output feature class. in GeoNet* - View Kory Kramer's reference to you <https://community.esri.com/ideas/13957-make-able-the-feature-to-point-geoprocess-to-create-3d-point-feature-class-as-output-feature-class?commentID=51227&et=notification.mention#comment-51227>
... View more
09-19-2017
06:54 AM
|
0
|
1
|
1071
|
IDEA
|
Let’s imagine a triangle in a Cartesian (projected-) coordinate system, with the following coordinates: A(1, 1, 2), B(3, 1, 2) and C(1.5, 3, 2) where the fist number of the coordinate is measured in metes, along the X axis, the second number is measured along the Y axis, and the third one measured along the Z axis. The order of the coordinates is counter clockwise. Actually, the Z value is constantly 2 for all the points. How can we calculate the centroid of this polygon (triangle)? CentroidX= (AX+BX+CX)/3; CentroidY=(AY+BY+CY)/3; CentroidZ=(AZ+BZ+CZ)/3. The results are the following: Centroid(1.833333, 1.666666, 2). This coordinate point is inside, on the plane of the triangle. If I use the Feature to Point against this triangle the result is Centroid(1.833333, 1.666666, NaN), where the “NaN” means “Not a Number” (it represented as 0 on the user interface). The result in the XY plane is correct, but the Z coordinate is missing (or zeroed). In this case the output feature class is technically z aware, but there is no Z information inside. In arcpy the Polygon.centroid() function calculates the correct Centroid(1.833333, 1.666666, 2) value. It would be beneficial if the results would be the same. I think the algorithm of the “Feature to Point” was written before the introduction of the idea of Z aware feature classes.
... View more
09-19-2017
04:20 AM
|
2
|
1
|
1071
|
IDEA
|
I wasn’t precise enough… Technically it can produce 3D output and it does produce 3D output. However the Z values of the vertices is fulfilled with zeros (at least in case of multipatch and multipoint inputs). Which is not exactly 3D any more if the input features are several thousand feet above the reference surface. But yes, technically it is 3D. So it is already offered, but it’s never implemented and never going to be implemented. (Reading about something in a manual is helpful, but not enough. Someone have to try it in the reality)
... View more
09-18-2017
01:16 PM
|
0
|
1
|
1071
|
IDEA
|
Now—at least in case of multipatch inputs—the result is planar. I’d like to see results like points created by arcpy.PointGeometry.centroid and/or arcpy.PointGeometry.trueCentroid.
... View more
09-16-2017
08:30 AM
|
2
|
10
|
1344
|
POST
|
I heard several times on the UC in San Diego to avoid display drivers installed by the update service of the Windows 8.1/10 and use instead the “original” ones supplied by the card manufacturer. My question is quite simple: “Why?”.
... View more
09-08-2017
08:42 AM
|
0
|
1
|
382
|
POST
|
I think the triangulation method in ArcGIS Pro was replaced by a different one which can’t handle the true vertical polygons. In this case every second triangle has a different winding and that’s why the face culling removes them alternately. The true vertical polygons were always problematic and not fully supported—especially in arcpy and ArcSDE. I can’t provide you a solution, just a workaround: run a “Layer 3D To Feature Class” against your shapefile in ArcScene. It would result a multipatch feature class which rendered always correctly—even in ArcGIS Pro. If you can try to make triangulated or ring-based multipatch surfaces from your cross-section data. Ákos Halmai
... View more
03-29-2017
09:20 AM
|
0
|
0
|
941
|
Title | Kudos | Posted |
---|---|---|
1 | 08-01-2023 12:48 PM | |
3 | 07-12-2023 01:15 PM | |
6 | 08-21-2020 02:18 AM | |
1 | 10-06-2016 03:14 AM | |
1 | 02-19-2017 09:48 AM |
Online Status |
Offline
|
Date Last Visited |
a month ago
|