POST
|
Hi, We have a large table with line geometries of borehole paths on an EnterpriseDB on SQL Server which loads perfectly to the map in ArcGIS Pro. Now I created a view by joining the mentioned table with another table that is stored in a non-Enterprise DB but on the same SQL-Server. Unfortunately, I have no rights to do so in the EnterpriseDB. This query itself works. However, when loading the data into the map it takes a lot of time and only a small part of the data is actually shown. Loading the attribute table fails with "Error: The number of points is less than required for feature". According to the related help page the error could - among others - be caused by points laying at the same location. As the line geometries refer to borehole paths (X Y Z, X Y Z, ...) many of them are strait vertical with two points on top of each other (with different Z-values, of course). The few line geometries that show up in the map indeed are not strait vertical. This may be an indication that this location overlay could be the cause of the problem. If this is likely to be the issue, what would be the right solution? If this was is unlikely the cause, what could I do in order to get it work? Thank you, Torsten
... View more
04-19-2021
10:03 AM
|
0
|
1
|
691
|
POST
|
Ok, thank you, George! I think for the time beeing I have what I need. Regarding the registering I followed the documentation. I'll figure it out later.
... View more
10-20-2020
04:55 AM
|
0
|
0
|
1698
|
POST
|
Thank you for your answers! It took a bit, but as far as I can see, I got it right now. First issue was 4 unexpected double matches in the data view. Fixing, however, it didn't solve the problem. Then I created an extra table to hold unique OBJECTIDs for all objects from the queried tables, which also didn't solve the problem in the beginning. After a while I got the impression it may be related to the data type of the OBJECTID, which was bigint. Changing the type to int finally made it successful. Is type bigint an issue with ArcGIS? Also, trying to register the view in the geodatabase wasn't possible. Although, I read that registering is only required for doing certain things with the data in ArcGIS Pro and it could made reading a bit faster. However, the errors from the python command arcpy.RegisterWithGeodatabase_management("DATABASE.dbo.vw_boreholes", "OBJECTID","geom","POINT") were: ERROR 001050: Registrierung in der Geodatabase ist bereits erfolgt, oder das Dataset kann nicht geöffnet werden. -> Data set is already registered in the geodatabase or it can't be opend ERROR 000308: Ungültiger Feldtyp -> Invalid field typ ERROR 001050: I couldn't find any hint where in the database I could check if the view was already registered. How can it be done? Another issue could be related rigths on the database side. The connection is OS based, so, theoretically, everything should be fine? ERROR 000308: Not sure, what that means - could it be my geometry column? That's how it is created: geometry:: STGeomFromText('POINT(' + CAST(CAST(bores.XCOORD AS decimal(14, 6)) AS varchar) + ' ' + CAST(CAST(bores.YCOORD AS decimal(14, 6)) AS varchar) + ')', 25832 ) as geom
... View more
10-20-2020
03:48 AM
|
0
|
2
|
1698
|
POST
|
Yes, all queried tables are within the same database and the view is the only one. The point geometry column is added on the fly from X, Y coordinates. As you suggested, I created a simple view from only one table, which works perfectly. I guess, the problem is connected to the oid, that ArcGIS tries to create. By pulling the view from the catalog to the map, the simple view is opened with a dialog requesting the primary key columns, but the complex view is just loaded without any dialog. If I try to apply a definition query in the properties dialog of the dataset the ESRI_oid shows just values of 1 to 3 and the query cannot be applied (error message). To force assigning primary key columns I tried to use 'add data' -> 'query layer' which allows me to select the relevant key columns, but it doesn't change the behavior at all. The complex view covers 9 tables including subqueries and serveral unions. Could there be limitations regarding query complexity of views?
... View more
10-15-2020
08:09 AM
|
0
|
5
|
1698
|
POST
|
The SQL Server version is 14.0.1000.169. Unfortunately, our IT department doesn't update the ArcGIS Pro version quite often.
... View more
10-15-2020
04:24 AM
|
0
|
0
|
1698
|
POST
|
Hello, I successfully loaded a database view from an SQL Server DB into ArcGIS Pro (v2.3.2). Only problem: I cannot see any data in the attribute table. Also export to shape crashes ArcGIS Pro or is incomplete. I know, the data cannot be modified, but I need to review some of the content. Any suggestions? The error warning in the screenshot says: No page with row data available.
... View more
10-15-2020
03:20 AM
|
0
|
9
|
1775
|
POST
|
Thanks for your thoughts, Dan! Luck was on my side It turned out to be as tricky as simple. A member of staff of our local ArcGIS support asked me to perform some testings with very simple paths, as some raster functions seem to be sensitive here. He also suggested to change our system decimal delimiter, even though I was using strictly "." in my python scripts (German delimiter is ","). The last suggestion made the difference. I can now apply the range between 0 and 1 to the smoothing factor - no matter - as string or floating point.
... View more
02-24-2015
12:03 AM
|
0
|
1
|
1279
|
POST
|
I have some more screen shots now. I tried to use smoothing factors between 0 and 1, which doesn't work at all. Neither I can code the smoothing factor by floating point nor by string (0.9, "0.9"). The function actually takes for cell size and smoothing factor either values as strings or as number. But any smoothing factor between 0 and 1 crashes the process when it comes to smoothing, not matter if I give the value as floating point number or string: Fuer Zellgroesse 50 m... ( == this run is for 50 grid) java version "1.6.0_43" Java(TM) SE Runtime Environment (build 1.6.0_43-b01) Java HotSpot(TM) Client VM (build 20.14-b01, mixed mode) ERROR: 'Spline mit Barrieren' fehlgeschlagen ( == failed) ERROR: Traceback (most recent call last): File "contourgridder.py", line 189, in <module> outSplineBarriers = SplineWithBarriers(tmp_points, o.Z_field, tmp_stoerungen, cell_size, o.r_glaettung) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Functions.py", line 7079, in SplineWithBarriers Smoothing_Factor) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Utils.py", line 47, in swapper result = wrapper(*args, **kwargs) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\sa\Functions.py", line 7072, in Wrapper Smoothing_Factor) File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 498, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: 'Spline mit Barrieren' fehlgeschlagen Fehler beim Ausführen von (SplineWithBarriers). ( == Error during execution of SplineWithBarriers) Below are the new screen shots. See the huge difference between external script and sript in the ArcGIS python client. Actually, it looks to me now, that the smoothing factor indeed works, but maybe only as True or False (1 or 0) and that there is a difference in how smoothing is applied...? Screen shot 1: 50 m grid with smoothing factors 1 (blue) and 0 (yellow), isolines in red. Screen shot 2: 10 m grid with smoothing factors 1 (blue) and 0 (yellow), isolines in red. Screen shot 3: 10 m grid from within ArcGIS smoothing factor 1 (blue), isolines in red.
... View more
02-23-2015
01:53 AM
|
0
|
3
|
312
|
POST
|
Ok, that's how it looks. I got two screen shots, actually from our 3D geometrical modeling software to have a better view on the data. The grid cells are represented by the points now. What one can clearly see ist the difference between running from inside ArcGIS (graphical dialog or python client) and the from external script. Screen shot 1: inside Arcgis Screen shot 2: Result from external script
... View more
02-22-2015
09:27 PM
|
0
|
5
|
967
|
POST
|
Sorry, I wrote mistakable - its not like that. The isolines are every 10 m - like 250, 260, 270 etc. 'Guess, contour level was the appropriate term. Distances between 10 m isolines of less than 10 m don't exist. It's about a rather gentle morphology of geological layers - no steep gradients. I could provide some screen shots on monday...
... View more
02-21-2015
08:46 AM
|
0
|
7
|
967
|
POST
|
Thanks, Dan, I try your suggestion as soon as I'm at the desk again. I'm very on the edge , as I lost almost a day. Unfortunately (...or good) I don't have ArcGIS at home. Indeed, we actually running the splinewithbarrier() for two cell sizes, 50 m and 10 m and combine those in a later step with having 10 m density close to our faults or barriers, and 50 m elsewhere. So, the 50 m grid is smooth, but the 10 m grid has an ugly stepping, which is about 1 m between the steps. The original isoline distance is 10 m. I mean, for our purpose it's not completely bad, but it makes people uncertain. And that has to be improved. But, when thinking about, and scale effects are in play, than I wonder why from within the arcgis python client smoothing seems to be better. This would mean that internally some scale depend corrections to the smoothing factor are applied without notice in the help.
... View more
02-21-2015
04:34 AM
|
0
|
9
|
967
|
POST
|
Actually, as I wrote, I tried both, the version from the model builder and the version proposed in the ArcGIS-help. Both versions run without any error, but no smoothing. I can, however, easily adjust cell size or the field of the Z values in both versions. I'm aware of the inconsistency refereing to the different application of the cell size and smoothing parameters (string vs "numbers"). But these two versions are coming from ArcGIS itself. I have the problem, that running the exported model builder code inside the ArcGIS python client works perfect. If I run exactly the same code from the console smoothing doesn't happen. In the ArcGIS help, the smoothing factor is not applied in the examples. I'm also confused about the small difference in the function parameters: model builder: arcpy.gp.SplineWithBarriers_sa(points_shp, "id", faults_shp, "10", outGrid, "1") ArcGIS help: outSplineBarriers = SplineWithBarriers(points_shp, "id", faults_shp, 10,{1}) Seems, there happens some wrapping around some other code (e.g. the Java code that is used behind). So actually, it would be helpful to have a code snippet that is supposed to work including smoothing from an external script. Just to see if there are problems with the environment or with different python versions etc. There was a suggestion from a colleage that ArcGIS uses two Python versions (32 and 64 bit). Hmm...?
... View more
02-20-2015
10:45 PM
|
0
|
11
|
967
|
POST
|
Hi, I'm puzzled by different results I get from application of SplineWithBarrier (Spacial Analyst) using Modelbuilder and by external Python scripting: import arcpy points_shp = "pointShape.shp" faults_shp = "faultsShape.shp" outGrid = "r_out" arcpy.gp.SplineWithBarriers_sa(points_shp, "id", faults_shp, "10", outGrid, "1") This is the code I got from the model builder. While results there are as expected (smooth surface with discontinuities) I used it in an external script. The resulting surface derived from the external script, however, shows, that smoothing was skipped. Before I tried the version from model builder I followed the example from the ArcGIS help. Same result - the grid is created, but again smoothing step is skipped. My first code was: import arcpy points_shp = "pointShape.shp" faults_shp = "faultsShape.shp" outGrid = "r_out" arcpy.CheckOutExtension("Spatial") outSplineBarriers = SplineWithBarriers(points_shp, "id", faults_shp, 10, 1) outSplineBarriers.save(outGrid) That's the syntax from the help: SplineWithBarriers (Input_point_features, Z_value_field, {Input_barrier_features}, {Output_cell_size}, {Smoothing_Factor}) Why is smoothing not activated? Where is my fault? Thanks for any hint! Torsten
... View more
02-20-2015
08:34 AM
|
0
|
13
|
4874
|
POST
|
Hi Neil, thanks a lot - though late - for your hint! It wasn't clear to me that "Value table" really means it's a data type, though the table column states 'data type' in the header. Thought of an explanation like "table of values" - maybe a normal python list. I couldn't use your example as given, as the "insertRow"-method doesn't exist, but addRow. vTab = arcpy.ValueTable(2) vTab.addRow("ShapeA.shp" + " 1") vTab.addRow("ShapeB.shp" + " 2") arcpy.Integrate_management(vTab,0.01) Thanks again, Torsten
... View more
02-19-2015
09:59 PM
|
0
|
0
|
259
|
POST
|
Hi, I try to integrate two features (shapes) with their ranks using arcpy. -- arcpy.Integrate_management() -- I don't get a clue from the explanation/example in ArcGIS help. It's straight forward, however, to apply this tool from the graphical dialog. I would appreciate a working example having 2 shapes: a.shp (rank 1), b.shp (rank 2). I'm using ArcGIS 10.2 Thanks, Torsten
... View more
02-11-2015
10:55 PM
|
0
|
2
|
4082
|
Online Status |
Offline
|
Date Last Visited |
11-18-2022
09:49 PM
|