322 reputation
213
bio website web.sci.ccny.cuny.edu/…
location Queens, NY
age 32
visits member for 2 years, 5 months
seen Jun 23 at 3:12

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


Feb
21
comment How to merge (append) ArcInfo coverages that are inside folder structure using ArcPy?
you should remove the nested for loop, as you never use "subdirname".
Feb
21
comment How to merge (append) ArcInfo coverages that are inside folder structure using ArcPy?
are the files you are looking to merge named "car" exactly, or do they just have "car" in the name? also, why the nested for loop in the first for loop?
Feb
12
comment arcgis10: create perpendicular transects to stream at specified intervals
yes sorry, you need to add a field called "slope" to your feature class before running this. i will add this to the post.
Feb
20
comment How to 'burn' a stream network into a DEM layer in ArcGIS 10?
please label as answer.
Feb
11
comment arcpy.RegionGroup fails with error 999999. Workspace or data source is read only
i found the exact same problem -- throws error on C: but not on other drives. probably an ArcGIS error.
Jan
16
comment arcpy: get list of adjacent lines per line
i think this method is logically better than mine, but would take much longer in arcpy because there is no access to the shape method "MergeFeature". instead, one has to modify field values and then dissolve on them in a recursive process. i wish there was better access to these ArcObjects methods in arcpy.
Jan
15
comment Make Graph (Data Management), Changing item names in legend
i would take a look at the matplotlib library (matplotlib.org). it includes a much more diverse toolbox for creating nice-looking graphs than ESRI currently offers. further, you have much more control over all the variables, if you take the time to examine some examples on the site to learn how to use it effectively.
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
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
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
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
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.