|
POST
|
Hi guys, I have a python toolbox that I have developed and is running fine at my desktop. Its using scratchfolder and scratchGDB for writing out intermediate and final data. My toolbox has Tool1 and Tool2. At my desktop testing, after running Tool1, intermediate data is written on scratchGDB (scratchFOlder is used to create temporary SDE connection files). To run Tool2, it needs to check my scratch GDB and folder to be able to do further processing and write final data still to the scratchGDB. So on a desktop this is running smoothly, but my concern now is that the end goal I have is to publish it as a GP service, but as I understand, each run of a specific GP service(or tool), it creates its own job folder and its own scratch GDB. So looking at my two tools, once they are both GP services, they will have independent scratchfolder and GDB. Is there a way to use GP service 1 results as inputs to GP service 2 job? Or should I just merge my tools as one and save trouble figuring out this issue? Thanks again, Thanos
... View more
10-11-2015
07:24 PM
|
0
|
5
|
3280
|
|
POST
|
I actually tried loading the versioned fc on arcgis desktop and did the flip line tool (not in editing mode). It worked without any issue. So it's just weird that thru arc py implementation it fails. removing the version, function runs fine.
... View more
10-08-2015
01:59 AM
|
0
|
1
|
647
|
|
POST
|
def CreateBiDirectionalRoute(input_lines, _routes):
try:
in_geo = [i for i in arcpy.da.SearchCursor(input_lines, ['ID', 'SHAPE@', 'SPEEDLIMIT'])]
incur = arcpy.da.InsertCursor(nztm_routes, ['ROUTENAME', 'ROUTENUM', 'JOINFIELD', 'SHAPE@', 'SPEEDLIMIT'])
for _geo in in_geo:
incur.insertRow([_geo[0], 'A', str(_geo[0])+'-'+'A', _geo[1].projectAs(arcpy.SpatialReference(###), ###), _geo[2]])
flip_features = arcpy.FlipLine_edit(input_lines)
in_geo2 = [k for k in arcpy.da.SearchCursor(flip_features, ['ID', 'SHAPE@','SPEEDLIMIT'])]
for _geo2 in in_geo2:
incur.insertRow([_geo2[0], 'B', str(_geo2[0])+'-'+'B', _geo2[1].projectAs(arcpy.SpatialReference(###), ###), _geo2[2]])
del incur
except arcpy.ExecuteError:
arcpy.AddMessage(arcpy.GetMessages(2))
Hi guys, from the above code, if I use a versioned sde featureclass as inputlines, I get the error above based on line 7. Is there a work around to be able to use versioned fcs for this function of mine? Thanks
... View more
10-07-2015
08:21 PM
|
0
|
4
|
2804
|
|
POST
|
Since Collector app can edit related tables, can the same functionality be implemented when creating a web app from WAB?
... View more
09-02-2015
08:35 PM
|
1
|
0
|
2875
|
|
POST
|
Hi guys, I have a hosted feature service for data collection and I would like to setup a local copy within an sde database. Is there a standard process that can be called thru python for example? I know from ArcGIS online you can download the feature service and its related tables as a fgdb. But how can you do this automatically and as a scheduled task? Thanks, Thanos
... View more
08-16-2015
08:08 PM
|
0
|
0
|
2813
|
|
POST
|
Thanks James and Richard, I basically have zone polygons, and for each polygon, I want to extract all bus IDs that went through using a months data of XY logs. Once I have a subset of the big data, I need to create stats for individual bus IDs (i.e. average speed, length of travel, etc). I can go about the stat part but thinking of best way to generate data per zone based on a big sql table is something I am struggling with. Cheers
... View more
06-15-2015
05:51 PM
|
0
|
0
|
797
|
|
POST
|
Hi Richard, thanks for the response, my plan is, for each unique bus in a given day, calculate its travel time, speed in between its logged location for a specific route and store that in another table. then redoing the process for the same bus based on the next day until the last day of the month. then calculate a statistics for mean travel time & speed throughout the month. Regards, Chris
... View more
06-14-2015
03:12 PM
|
0
|
1
|
797
|
|
POST
|
Hi guys, This might be an old discussion topic and hopefully you guys can be able to point me to the right direction. I have a single sql table that has information of bus location logs for a given time period. I want to work out a flow that will run some calculations per bus per day. So it is a table with millions of records and I was thinking of breaking the table into separate ones per day to be manageable. I've queried a single day table and I got like 1k unique bus numbers. I am wondering if its ok to create a dictionary having the bus number as key and its value would be the list of all its location logs. Wondering if this is the most practical way to go about it. Cheers!
... View more
06-14-2015
01:28 PM
|
0
|
5
|
2928
|
|
POST
|
Hi Luke. There's actually no error. And I think I've made the button click event working, I've changed it to, def onClick(self): mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd)[0] lyr = arcpy.mapping.ListLayers(mxd, '#', df)[0] lyr.definitionQuery = "ID={0}".format(id_input) ext = lyr.getExtension() df.panToExtent = ext
... View more
05-08-2015
01:20 PM
|
0
|
0
|
766
|
|
POST
|
Hi guys, I'm new in creating add-ins and just trying to give it a shot. Currently the simple one I setup is not working for me. Basically the user enters an ID, then the button when clicked should change the definition query of a layer and the dataframe changes its extents to this lyr's extents. Just wanted to know where I went wrong. thanks, import arcpy import pythonaddins class EnterQPIDNumberCBox(object): """Implementation for CreateQPIDMapExtent_addin.eqncombobox (ComboBox)""" def __init__(self): self.editable = True self.enabled = True self.dropdownWidth = 'WWWWWWWWWW' self.width = 'WWWWWWWWWW' def onSelChange(self, selection): pass def onEditChange(self, text): global id_input id_input = int(text) def onFocus(self, focused): pass def onEnter(self): self.items.append(id_input) pass def refresh(self): pass class QPIDToolsExt(object): """Implementation for CreateQPIDMapExtent_addin.qpextension (Extension)""" def __init__(self): # For performance considerations, please remove all unused methods in this class. self.enabled = True def activeViewChanged(self): pass def contentsChanged(self): pass class ZoomToPropertyButton(object): """Implementation for CreateQPIDMapExtent_addin.ztpbutton (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): mxd = arcpy.mapping.MapDocument('CURRENT') df = arcpy.mapping.ListDataFrames(mxd)[0] lyr = arcpy.mapping.ListLayers(mxd, '#', df)[0] lyr.definitionQuery = "ID={0}".format(id_input) ext = lyr.getExtension() df.extent = ext arcpy.RefreshActiveView()
... View more
05-07-2015
04:35 PM
|
0
|
2
|
3403
|
|
POST
|
I got the process sorted Sephe. I ditched the model and created a script which is based on the sample from the help files like you mentioned.
... View more
05-03-2015
05:58 PM
|
0
|
2
|
879
|
|
POST
|
hi guys, as the subject says, i got say 2 fc, and i got 2 hazard data. i use iterator and iterate thru the fcs. for each iteration i spatial join hazard data that has integer values with the fc. i use a merge rule "max" to get the highest hazard value for the fc. once i set this up and run it. the second fc's fields are dropped and what it gets is just the join fields. is there a way to preserve original fields of input fcs when setting up merge rules for the join field?
... View more
05-03-2015
01:51 PM
|
0
|
4
|
4044
|
|
POST
|
I think Blakes suggestion is best for this kind of data scenario. But if you still want to keep the kind of data structure you have, which is stacked polygons due to multiple owner, I don't get why the need to go through the process of modifying your data. If you are just after a report like info of how many and who are the owners of each polygon based on ID, you just write a script to spit out a csv file which does that summary and leave your data intact. That's just my two cents.
... View more
02-01-2015
12:36 PM
|
0
|
0
|
2905
|
|
POST
|
Probably best to share your tool and scripts related to it so to better diagnose the problem.
... View more
02-01-2015
12:26 PM
|
1
|
0
|
1029
|
|
POST
|
OK, basically I had to do a work around on this problem rather than finding out why ddp exports go crazy with my stretched raster symbology, I just export it thru python script as below, Works fine based on my sample exports.
... View more
12-11-2014
05:27 PM
|
0
|
0
|
550
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-23-2014 12:00 PM | |
| 1 | 01-23-2013 05:05 PM | |
| 1 | 02-13-2018 05:55 PM | |
| 1 | 07-04-2017 02:01 PM | |
| 1 | 08-02-2017 01:57 AM |