POST
|
Well, just tried to run the same code in python3 and it works...
... View more
04-23-2021
04:23 AM
|
0
|
0
|
1034
|
POST
|
While my views was simple, I didnt realize that I joined it with another view. The other view contained a where x not in (select x from y) This caused the very poor performance. I changed the view to use "except" instead of the subquery in the where, at now i performs very nice
... View more
04-23-2021
02:47 AM
|
0
|
0
|
474
|
POST
|
Im trying to create a shapefile with input from a featurelayer it fails with: WARNING: Failed to convert: MyLayer. ERROR 000210: Cannot create output c:\temp\Shapes\MyLayer.shp Failed to execute (CopyFeatures). fc = r"c:\connections\MyEditor@MyDb.sde\mydb.measurement.Line"
arcpy.MakeFeatureLayer_management(fc,"MyLayer")
print(arcpy.GetCount_management("MyLayer"))
arcpy.FeatureClassToShapefile_conversion("MyLayer", "c:\\temp\\Shapes") #<-- This fails
#If I in the FeatureClassToShapefile_conversion uses the featureclass instead of the featurlayer it works.
arcpy.FeatureClassToShapefile_conversion(fc, "c:\\temp\\Shapes") #<-- This works What can I be doing wrong? The count returns 420504 so the featuerlayer contains data
... View more
04-23-2021
02:44 AM
|
0
|
5
|
1080
|
POST
|
Hi My DB is hosted on a MS SQL server. I have created a view (its very simple just a join of 2 tables ) When I access tje view from older version of arcpy it is fast, but when i try from newer version it very slow. Here is some example code import arcpy
import sys
from datetime import datetime
version = arcpy.GetInstallInfo()
pyVersion = sys.version
print("ProductName: {}".format(version['ProductName']))
print("Version: {}".format(version['Version']))
print("Python version: {}".format(pyVersion))
start = datetime.now()
arcpy.GetCount_management(r"C:\Connections\SDE@MyDB.sde\simpelView")
end = datetime.now()
print(end-start) When i run the code from the old version of python af arcpy this is the result: ProductName: Desktop Version: 10.2.1 Python version: 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] 0:00:17.431000 I took about 17sec Now i execute the same code, on the same computer, with the same connectionfile, but using newer version of arcpy and python ProductName: ArcGISPro Version: 2.5 Python version: 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)] 3:00:01.225900 I takes 3 hours. Why is there such a huge diffrence?
... View more
04-15-2021
01:52 AM
|
1
|
2
|
569
|
POST
|
Hi Derek Thank you for the answer. Not what I hoped for, but still thank you
... View more
08-19-2020
11:15 PM
|
1
|
0
|
626
|
POST
|
Can webmaps inherit from other webmaps? So if I have the following: Can I create a webmap base and inherit from it like this? Or how does webmaps share common functionality?
... View more
08-19-2020
01:50 AM
|
0
|
2
|
664
|
POST
|
Hi Xander Bakker We tried to removed all attributes from the table except objectid and globalid, the it worked, after re-adding the attributes it stil works. So the service might have been in some undefineable state
... View more
08-12-2020
04:28 AM
|
1
|
0
|
1067
|
POST
|
Hi Xander Bakker Its on our entreprise installation. Ive just tried a table from another service, and it works perfect. Guess we will have look at the table for that specific service. Thank you for the help
... View more
08-11-2020
11:35 AM
|
1
|
2
|
1067
|
POST
|
Hi Xander Bakker Thank you for your reply. Can you confirm that "Parcels_And_buildings_3838" is a table? The feature service I'm using consists of a layer and a table. If I query the layer using the same arcade script it works fine.
... View more
08-11-2020
08:56 AM
|
0
|
5
|
1067
|
POST
|
Hi I got a FeatureServer with 1 layer and 1 table. Im trying to create a popup on a webmap, the popup should display some data from the table, but the result is not as i expected. To figure out the issue, im using the following code var all =FeatureSetById($map, "TrafoContainer_5842") console("countAll: "+count(all)) console("TypeAll: "+TypeOf(all)) var tt = top(all,10) console("TypeTT: "+TypeOf(tt)) console("countTT: "+count(tt)) var fst = First(all) console("TypeFirst: "+TypeOf(fst)) return In the console the following is printed countAll: 15633 <---- This matches the number of features in the table
TypeAll: FeatureSet <---- Looking good
TypeTT: FeatureSet <---- Still happy
countTT: 0 <-----Oh no I would have expected 10
TypeFirst: <------
Any ideas on what is wrong?
... View more
08-11-2020
05:52 AM
|
0
|
7
|
1131
|
POST
|
Hi Is it correct when using FeatureSetByName the layer must be in a featureservice (not a map service) and must be the only layer in the service? Thank you
... View more
08-11-2020
01:26 AM
|
0
|
1
|
1208
|
POST
|
Hi Im trying to create my first attribut rule. Im using ArcGis Pro 2.5 When validating the following code var area= FeatureSetByName($datastore,"TestArea") var fs = Contains(area,$feature) var res = First(fs) .. It fails with this message Invalid expression Error on line 3. General evaluation error .. If i Change First to Count, i do not get a validation error. Why can i not use first?
... View more
03-25-2020
06:08 AM
|
0
|
1
|
1244
|
POST
|
Hi Xander Bakker Yes much more than 2000 features. At this time theres 99 unique types. I would use arcade to group them. I have now hacked the json, and it seems to work. However i dont know what the downside is to manipulated the json manually.
... View more
01-13-2020
10:35 PM
|
0
|
1
|
532
|
POST
|
My webmap is using a service - the service returns upto 2000 records at a time. Lets say the first 2000 records looks like this Id ObjectId ValueToUse Shape 1 3 2 8 3 null 4 null 2000 null The first two rows has Value in ValueTo use the remaining 1998 has null as value to use - its fine I will still display the feature. The next 2000 rows from the service looks like this ObjectId ValueToUse Shape 2001 32 2002 11 2003 24 2004 3 4000 8 The ValueToUse from the second call (objectid 2001-4000) will all be displayed as "other" The example is only to simplify the issue. In the real world my Arcade script is depending on the "ValueToUse"
... View more
01-10-2020
04:39 AM
|
1
|
3
|
650
|
Title | Kudos | Posted |
---|---|---|
1 | 01-10-2020 04:39 AM | |
1 | 04-15-2021 01:52 AM | |
1 | 08-11-2020 11:35 AM | |
1 | 08-12-2020 04:28 AM | |
1 | 08-19-2020 11:15 PM |
Online Status |
Offline
|
Date Last Visited |
05-25-2021
07:23 AM
|