POST
|
Hi Friends, I have a little python script that calculates whether this week is an even week or an odd week. I need this in arcade to populate in an AGOL app but I am below beginner level with arcade and finding it difficult to find samples to work with. Does anybody have the ability to help me put together a small arcade expression that does what my python does or else point me to where I can find some samples? There is a world of python samples out there, but arcade is harder to find. from datetime import * #make sure to always start on a monday startDate = date(2019, 12, 2) todayDate = date.today() # count the days between the dates delta = todayDate - startDate #count the number of weeks since start date weekNum = delta.days / 7 #determine if this week is even or odd # Python program to check if the input number is odd or even. # A number is even if division by 2 gives a remainder of 0. # If the remainder is 1, it is an odd number. num = int(weekNum) if (num % 2) == 0: print("{0} is Even".format(num)) print "This week is paper recycling" else: print("{0} is Odd".format(num)) print "This week is container recycling"
... View more
12-17-2019
09:39 AM
|
0
|
3
|
1623
|
POST
|
I am experiencing the same problem. In a test data set (70 orders) I increased the distance cost for the route and this fixed the problem. (The default for time cost is 1 and the default for distance is null. I set the distance cost to 1). I theorize that by telling the solver that distance cost is important, it tries to reduce the amount of overlap. However, when I increased my data set to 250, the same problem appears even with the distance cost set to 1. I tried some tests by setting the distance cost much higher (2, 100, 1000, 10000) and this does not resolve the issue. I am currently looking into this further and will post back if I find any additional information but I wonder if you were able to solve this? I wonder if anybody has some advice? I'm on 10.3 Advanced. Thanks!
... View more
10-29-2015
09:58 AM
|
0
|
0
|
317
|
POST
|
I think one solution is to use the SPlit lines at specified distance tool . http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/at_a_specified_distance_or_percentage/001t0000008r000000/ If I split to 5 m lengths, I could then use the Add Surface Info tool on these then dissolve based on an ordinal classification in a separate field. How can I use the Splitting lines at specified distance tool in an automated manner? Or is this strictly a manual process? Thanks!
... View more
09-30-2014
08:21 AM
|
0
|
0
|
647
|
POST
|
Hello. I need to identify the sloped areas of streets within our street centre lines feature class. Street segments are split at intersections. Using the Add Surface Information (3D Analyst) tool, I am able to add the min max and avg slope of a segment. However, some segments have both up and down hill portions. Some have flat portions and then down hill portions. So using the above tool is mis-leading. What might be best is to identify breakpoints where a sloped portion starts or stops. I can then use these breakpoints to split the line segments and then obtain slopes only for those areas. Please see the 2 attached images. They depict typical segments that have downhill and uphill sections of the same segment. I am having difficulty visualizing this process. Can anybody help guide me in the correct direction or offer advice on how to obtain the slopes as outlined above? Thanks!
... View more
09-30-2014
08:06 AM
|
0
|
1
|
4269
|
POST
|
[ATTACH=CONFIG]29472[/ATTACH] Same thing goes for my Simplify Polygon tool in ArcGIS Desktop 10.2.1 - the Simplification Tolerance label is there but the input box is missing. I was able to use the tool once properly, but after that the input box disappeared and the tool could only be run through Python. [ATTACH=CONFIG]29466[/ATTACH] I have the same problem on 10.1. I should add, mine is the simplify polygon tool. Crazy world we live in...
... View more
11-29-2013
11:15 AM
|
0
|
0
|
1136
|
POST
|
I've got a script that crashes python when trying to run the following tool arcpy.MakeQueryTable_management Running in IDLE, Arcmap 10.1, windows 7 The crash is intermittent, maybe 50% of the time. Here is the error that comes up: python.exe has stopped working Description: Stopped working Problem signature: Problem Event Name: APPCRASH Application Name: pythonw.exe Application Version: 0.0.0.0 Application Timestamp: 4df4b9cc Fault Module Name: GPCoreFunctions.dll Fault Module Version: 10.1.0.3035 Fault Module Timestamp: 4f9203bd Exception Code: c0000005 Exception Offset: 002f35ba OS Version: 6.1.7601.2.1.0.256.48 Locale ID: 1033 Read our privacy statement online: http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409 If the online privacy statement is not available, please read our privacy statement offline: C:\Windows\system32\en-US\erofflps.txt Thoughts?
... View more
11-06-2013
07:56 AM
|
0
|
0
|
2024
|
POST
|
Hi Claudia, I had a similar issue and found your thread in my search. My issue was converting multiple LiDAR .LAS files to a single multipoint file (LAS to Multipoint). I received the following errors: Error: 999999 FDO error: -1 FDO error:-1 [featureclass_name] Failed to execute (LAStoMultipoint) I can't speak to your issue specifically but I just got off of the phone with ESRI support and they told me that my issue is directly related to 10.1 Service Pack1. I was told that many LiDAR errors are resultant of SP1. I was directed to go to control panel / programs and features / installed updates / highlight ArcGIS SP1 / right click / remove. This apparently reverts to 10.1 SP0 and the errors should go away. Might be worth looking into. I followed the above steps and it did not resolve my error. I'll call dem folks back.
... View more
06-26-2013
08:41 AM
|
0
|
0
|
253
|
POST
|
Hi Claudia, I had a similar issue and found your thread in my search. My issue was converting multiple LiDAR .LAS files to a single multipoint file (LAS to Multipoint). I received the following errors: Error: 999999 FDO error: -1 FDO error:-1 [featureclass_name] Failed to execute (LAStoMultipoint) I can't speak to your issue specifically but I just got off of the phone with ESRI support and they told me that my issue is directly related to 10.1 Service Pack1. I was told that many LiDAR errors are resultant of SP1. I was directed to go to control panel / programs and features / installed updates / highlight ArcGIS SP1 / right click / remove. This apparently reverts to 10.1 SP0 and the errors should go away. Might be worth looking into.
... View more
06-26-2013
08:30 AM
|
0
|
0
|
253
|
POST
|
I lifted this from elsewhere but very useful. this is VB , not python split on character - To split a field into a list ---------- In code Block ----------
dim splitList
dim value
splitList= split( [Feild1], ";")
if ubound(splitList) > 1 then 'if there's no comma, there's only one value in the splitList array and the next statement would error out
value = splitList(0)
end if ---------- In Field = ----------
value
... View more
01-25-2013
08:11 AM
|
0
|
0
|
2746
|
POST
|
Thanks for the information all. I think it's definately a good idea to try and get my head around python before applying it to GIS. I don't know why it is but I just really struggle with programming. However I feel it's an essential skill to learn to progress my career in GIS so wish me luck! 🙂 I had to self-learn python for the most part. So from a noobies perspective: my process involved reviewing other's scripts and deconstructing them to see how they worked. Work through it line by line and make sure you understand what each line does. Then replicate them in as simple a way as possible and change variables to make it do similar but different things. Working with a user freindly editor such as PythonWin was very helpful.
... View more
12-31-2012
01:24 PM
|
0
|
0
|
600
|
POST
|
Could you please let me know if I have implemented your suggestions correctly, and if I have, do you have any others?? 😛 Thank-you! I am theorizing that the search cursor is holding onto the editing rights of a shape file. After the end of your search cursor loop add the following: del row
del rows Maybe that should free it up and hopefully drop the schema lock.
... View more
12-07-2011
08:41 AM
|
0
|
0
|
309
|
POST
|
This is the code I am using: arcpy.env.workspace = "C:\\Database\\Redlands.gdb" inputFC = "Hospitals" field = "Full_Address" lstFlds = arcpy.ListFields (inputFC, field) if len(lstFlds) ==0: arcpy.AddField_management(inputFC, field, "Text") ............. I appreciate your help I dont know if the arcpy.env.workspace will automatically populate the featureclass with with its directory. I think that's the problem. You probably need to create a variable that contains the directory, or else hard code it into the featureclass string. I could be wrong, but this should work. Double check tabbing , I spaced 4 but maybe you need 5? Also, I changed the format of the directory string to clean it up a bit.
import arcpy
arcpy.env.workspace = r"C:\Database\Redlands.gdb\"
dir = r"C:\Database\Redlands.gdb\"
inputFC = "Hospitals"
field = "Full_Address"
FC = dir + inputFC
lstFlds = arcpy.ListFields(FC, field)
if len(lstFlds) == 0:
arcpy.AddField_management(FC, field, "Text")
print "len = zero. Field added."
else:
print "len does not = zero. field not added.""
... View more
12-06-2011
06:40 PM
|
0
|
0
|
999
|
POST
|
Thanks Dan and Mike. Mike, its been a while but a pleasure to see you on the internets! I should first clarify where my problem was. I wanted to pull values from the first position in the first list then the first position in the second list, then the 1st in the 3rd... etc. list = [" 111-11-1", " 222-22-2", " 333-33-3"] The only caveat is that after pulling the value I wanted to be able to insert it back into the the same format but with the altered value as required. I was getting tripped up trying to accomplish this using 2D arrays but the data I have is not actually a 2d array. Calling item[2][0] for instance should have provided me with "222" if this was a 2d array and this is where the error was happening I think. Its simply a list of lists... So
list = ["111-11-1", "222-22-2", "333-33-3"]
splitlist=[]
for l in list:
splitlist.append(l.split("-"))
print splitlist Prints: [[ '111', '11', '1'], [' 222', '22', '2'], [ '333', '33', '3']] These have been converted from a list of 3 strings to a list of 3 lists. Next step is to call first position from each of the lists and do the math. for item in splitlist:
value = int(item[0])
if value>180:
value=value-180
elif value<180:
value=value+180
item[0]=str(current)
print splitlist Prints: [[ '291', '11', '1'], [ '42', '22', '2'], [ '153', '33', '3']] I can leave my data in this format because the script I am working on uses it in this format so... Success!
... View more
11-30-2011
02:05 PM
|
0
|
0
|
643
|
POST
|
For example
import arcpy
#Option1
MDB = "c:\temp\tables.mdb\"
table = "vegtable"
arcpy.AddJoin_management( "veg_layer", "HOLLAND95", MDB + table, "HOLLAND95")
#Option2
TABLEinMDB = "c:\temp\tables.mdb\vegtable"
arcpy.AddJoin_management( "veg_layer", "HOLLAND95", TABLEinMDB, "HOLLAND95")
Note: should not require the table end in .dbf if it is located within a .mdb.
... View more
11-30-2011
12:47 PM
|
0
|
0
|
207
|
POST
|
http://support.esri.com/en/knowledgebase/techarticles/detail/35151 Cause Most often this is due to the input data path being entered incorrectly (i.e. misspelled folder names, using backslashes instead of forward slashes)or possibly a result of having spaces in the path names. Check the file path closely to confirm this is not the issue. If everything is correct, it could be locked because it is in use elsewhere, so make sure its not in an MXD somewhere. Make sure its located in a directory that you have write access to also.
... View more
11-29-2011
12:13 PM
|
0
|
0
|
999
|
Title | Kudos | Posted |
---|---|---|
1 | 04-26-2022 08:16 AM | |
1 | 04-25-2022 03:01 PM | |
1 | 12-17-2019 02:23 PM | |
1 | 04-08-2021 10:54 AM | |
1 | 04-08-2021 08:07 AM |
Online Status |
Offline
|
Date Last Visited |
06-12-2023
06:44 PM
|