342 reputation
213
bio website web.sci.ccny.cuny.edu/…
location Queens, NY
age 32
visits member for 2 years, 8 months
seen Aug 26 at 16:28

PhD Student in Ecology, Evolution, and Behavior at CUNY.


Jan
15
accepted arcpy: get list of adjacent lines per line
Jan
14
comment arcpy: get list of adjacent lines per line
nice solution to this problem. there is now an arcgis 10.0 tool called "Eliminate" which does a similar function, but takes a selected layer as input.
Jan
14
revised arcpy: get list of adjacent lines per line
expounded
Jan
14
comment arcpy: get list of adjacent lines per line
yes! this is very similar to the technique that i used in my solution. my function also checks for membership to a "streamID", which may not be applicable to some projects.
Jan
14
answered arcpy: get list of adjacent lines per line
Jan
11
comment arcpy: get list of adjacent lines per line
the latter, and not just that, but i want to merge only short lines to longer lines that share a unique ID, which makes things complex =P
Jan
11
asked arcpy: get list of adjacent lines per line
Jan
4
comment Problem with SplitLineAtPoint tool in arcpy
the only way to feasibly approach this problem is to run through your procedure multiple times with multiple changes to parameters and verify if it is indeed an internal function error on the part of ArcGIS. if so, an email to ESRI is probably the only thing I can think of.
Jan
3
comment Problem with SplitLineAtPoint tool in arcpy
SplitLineAtPoint should not split anywhere where there are no input points. Something else must be going on. For starters, why do you have multiple lines with unique start and end points? If you convert a normal poly to line, you should end up with one line with one start and end point each.
Jan
3
comment Problem with SplitLineAtPoint tool in arcpy
i know you may have tried this already, but RepairGeometry fixes a lot of unexplainable geometry errors.
Jan
2
comment How are people using Python data structures and classes in ArcPy?
another reason dicts may be preferable is because they are read a lot faster than lists because they are not ordered. hence, very long lists may take a bit more time to process if they have many entries.
Dec
25
comment How to re-order fields permanently using ArcGIS Make Query Table tool?
Note: you can also use MakeQueryTable to change the names of your fields by inputting a list of lists of field names and aliases ([[fieldname1,alias1],[fieldname2,alias2]...])
Dec
20
accepted How to best organize files for a large arcpy script tool?
Dec
20
comment How to best organize files for a large arcpy script tool?
i will choose this as the answer, because it is correct, but preface that it will not work for arcpy script tools. in this case, please put all your executables and globals you'd like to keep local your main script below if __name__ == '__main__':
Dec
18
comment How integrated can an IDE get for arcpy scripting?
Anyone know about the current status of PyScripter development? Seems like it's not in dev. If not, is there something similar in current dev that anyone knows of?
Dec
12
comment How to best organize files for a large arcpy script tool?
The problem is that a single script gets loaded into the "script tool", which gets a GUI and is able to be run from an ArcGIS toolbox. This script must contain references to the parameters and must also run the process. Therefore, a "parameters.py" file would need to run the main code as well. I got around this eventually by using [[if _ name _ == '_ main _':]] to separate the globals from the call to the main functions and other variable definitions. Is there a better, more elegant way?
Dec
10
comment How to best organize files for a large arcpy script tool?
I agree that this is the best way to organize a collection of scripts, but the complication with an arcpy script tool is that the file specifying the global variables (i.e. parameters) must also execute the main code.
Dec
7
comment How to best organize files for a large arcpy script tool?
Spoke too soon. The ESRI blog post concerning Python Templates is on the right track, but doesn't address multiple files. Ideally, I am looking for an example of a parameters.py that defines all params and global variables, and also imports the other modules. These other modules will need to import the globals from parameters.py in order to reduce the number of inputs to their functions. The problem I have is multiple imports occurring at once, and I'm convinced there's a better way.
Dec
7
comment How to best organize files for a large arcpy script tool?
Thank you. Actually, the ESRI blog post concerning Python Templates is exactly what I'm looking for. My particular problem was not importing modules, but deciding on a good file structure for my code. Much obliged!
Dec
7
comment ArcPy and running Python scripts (with parameters) within another Python script
this link has since moved, and I believe it rests here now: blogs.esri.com/esri/arcgis/2011/08/04/pythontemplate