POST
|
Hello, I would like to query the status of an ArcGIS ImageServer using Python 3.x. When importing new image data, the time of which I do not know, the ArcGIS ImageServer is not available, so that my query goes nowhere and my script hangs. Is there a way to query the status (Available, Importing, etc.) of an ArcGIS ImageServer? If so, how would this look like using a Python function? Thank you very much.
... View more
06-29-2023
10:46 PM
|
0
|
0
|
226
|
POST
|
I would like to create a query in ArcPy without creating a temporary additional attribute first. Unfortunately I fail with the syntax for creating the expression. I want to check if a ratio of two existing attributes (RCT_WIDTH_MBG_Length_REWI and RCT_WIDTH_MBG_Width_REWID) falls below a certain value. My latest code is: expression = '!RCT_WIDTH_MBG_Length_REWI! / !RCT_WIDTH_MBG_Width_REWID! > 3'
arcpy.SelectLayerByAttribute_management('Clean_LYR', 'NEW_SELECTION', expression)
if int(arcpy.GetCount_management('Clean_LYR')[0]) > 0:
arcpy.DeleteFeatures_management('Clean_LYR') and during the script run I code the error message: ExecuteError: ERROR 000358: Invalid expression My question is, how will be the right syntax of the expression?
... View more
12-03-2021
10:16 AM
|
0
|
3
|
576
|
POST
|
Hello, I have a number of multipatch objects of which I would like to determine the highest point, i.e. I would like to get the information [X,Y,Z]. Currently I use the command "AddZInformation_3d" and get the value for [Z]. Then I convert my object into a PointCloud and search for all points with the same Z-value. Since the point density of the PointCloud has to be chosen quite closely, especially for filigree objects, the calculation process takes a correspondingly long time for several million objects. Now my question is whether there is a way in ArcGIS to get the information [X,Y,Z] for the highest point of an object faster and more efficiently?
... View more
04-13-2021
12:13 AM
|
0
|
0
|
493
|
POST
|
I have the task of detecting objects that exceed a certain height above the ground. These objects can be points, lines, polygons and also multipatches. All objects have 3D coordinates. Furthermore, there is of course a DEM which represents the ground = reference surface. Since the number of objects is several million, I am looking for an efficient solution. My current approach is proving to be too time-consuming and therefore impractical. Currently, I have a (small object-) DEM from each of the multipatches features and subtract this from the large DEM. If the difference is greater than the maximum limit, the object is played into a separate database. This method is still acceptable. For the point objects I add the height as an attribute and finally take the height from the height model. Finally, I calculate the difference and divide the objects according to the threshold value. I proceed similarly with the line and surface objects, except that I first increase the point density along the lines. Unfortunately, the query for start and end points is not sufficient, since, for example, the height above ground for bridges, cable cars or power lines etc. can be variable along the route. (Time)Critical, apart from the amount of data, are the height queries from the raster height model. Now I want to ask whether there is a more efficient way in ArcGIS (3D Analyst and Spatial Analyst Extension is available)? Many thanks for the support.
... View more
01-20-2021
12:44 AM
|
0
|
0
|
390
|
POST
|
Currently I am working on the extraction of building footprints using ArcGIS/ArcPy and Lastools. Using LasBoundary I extract all buildings from the lidar dataset and get the building outlines as 3D polygons (Polygon ZM). In order to improve/enhance the geometry of the outlines I perform a smoothing by means of "Regularize Building Footprint" as a subsequent step. arcpy.ddd.RegularizeBuildingFootprint(<input polygons>, <output polygons>, 'ANY_ANGLE', "0.20", "0.20", "0.15") Unfortunately I only get 2D-polygons as result. Is there a possibility to keep the 3D information or to add it again?
... View more
07-15-2020
02:22 AM
|
0
|
0
|
335
|
POST
|
Hi David, sorry for the missing syntax highlighting. I corrected my initial post, so it should be less confusing. Furthermore I tried your sugestion, but unfortuntaly I got the same error message: ValueError: max() arg is an empty sequence #creating a list ->"mast_value" with unique values of field [ID_1]
with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP','ID_1') as max_cursor:
for row in max_cursor:
mast_value = sorted({row[0] for row in max_cursor})
#iterate through the list to find highest value in field [pointz], but only in features which have the value of the element of the list "mast_value"
field = "ID_1"
for mast in mast_value:
abfrage = field + " = " + str(mast)
with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP',('POINT_Z', 'FID'), where_clause=abfrage) as mast_cursor:
mylist = []
for row1 in mast_cursor:
#print('ID ' + str(mast) + u': max altitude ' + str(max(mast_cursor)))
mylist.append(max(mast_cursor))
print(str(max(mast_cursor)))
... View more
06-02-2020
08:53 AM
|
0
|
1
|
669
|
POST
|
Hello, With the following script I was able to determine the maximum values of a column [POINT_Z] for certain groups from [ID_1]. #creating a list ->"mast_value" with unique values of field [ID_1]
with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP','ID_1') as max_cursor:
for row in max_cursor:
mast_value = sorted({row[0] for row in max_cursor})
#iterate through the list to find highest value in field [pointz], but only in features which have the value of the element of the list "mast_value"
field = "ID_1"
for mast in mast_value:
abfrage = field + " = " + str(mast)
with arcpy.da.SearchCursor(inLAS[:-4] + '_POLE_POINTS.SHP',('POINT_Z', 'FID'), where_clause=abfrage) as mast_cursor:
mylist = []
for row1 in mast_cursor:
#print('ID ' + str(mast) + u': max altitude ' + str(max(mast_cursor)))
print(str(max(mast_cursor))) With the output I can display the results. A manual check showed that the result is correct. ID 1: max altitude (477.56, 5997)
ID 7: max altitude (523.27, 3401)
ID 16: max altitude (495.69, 3203)
ID 38: max altitude (495.69, 5574)
ID 39: max altitude (470.16, 5986)
ID 44: max altitude (503.93, 4713)
ID 63: max altitude (503.97, 4185)
ID 73: max altitude (463.67, 4205)
ID 75: max altitude (518.59, 2880)
ID 77: max altitude (463.63, 5877)
ID 79: max altitude (485.91, 5594)
ID 87: max altitude (482.06, 853)
ID 88: max altitude (475.2, 1836)
ID 91: max altitude (492.0, 1074)
ID 97: max altitude (468.77, 1323)
ID 98: max altitude (462.52, 1546)
ID 99: max altitude (463.81, 1294) To continue working (selection), I need the corrosponding value [FID] (second value in the brackets) of the maximum value of [POINT_Z] as a variable. My attempt to write the result into a variable myMastList = str(max(mast_cursor)) fails with an error message. File "E:\Documents\LAS\Las_Wire.py", line 264, in masten myMastList = str(max(mast_cursor))ValueError: max() arg is an empty sequence How can I write the value of [FID] (second value in the brackets in the output) from the highest value of [POINT_Z] (or both [FID] and [POINT_Z]) into a variable?
... View more
06-02-2020
02:50 AM
|
0
|
3
|
735
|
POST
|
Hello, i have a large amount of 3D points that represent several (separate) linear elements. This means that these points partly have the similar/(same) x,y - coordinates and differ only in the height (z) (like power lines). But the single points have no relation to each other, i.e. the left point knows nothing about its right point or other points. Using the Near function I could only find the nearest point, but not the point on the other side of the point. My goal now is to create a single line for each line-like element. In the beginning I tried to do this with the point2Line command, but the line was quite crisscross, so I tried to correct this with a small buffer. The next step would be to generate a centerline of this polygon, but ArcGIS does not seem to support the generation of a centerline from closed polygons. Is there a way to create a polyline from 3D points with ArcGIS? A 2D line would be one approach, because then I could work it with this tutorial from next.
... View more
04-28-2020
08:38 AM
|
0
|
0
|
360
|
Online Status |
Offline
|
Date Last Visited |
07-06-2023
09:02 AM
|