|
POST
|
This is basically the difference between a CAD representation of data which contains a lot about how the feature is supposed to look when it is plotted (line thicknesses, line types and so on), as opposed to its meaning, what the actual geometry represents in the real world.
... View more
09-19-2016
07:26 AM
|
0
|
3
|
1579
|
|
POST
|
None. Geodatabases contain the geometry of the features and its attributes (or meaning, school, police station, traffic pole etc etc). Things like symbology, which is how you want the feature to be symbolised are maintained and set up inside an ArcMap session. This "look and feel" can be saved to a layer file (*.lyr) and loaded into new or other ArcMap docs so the symbols can be re-used again. Style sheets can also be set up with each style named the same as your features, then when you apply your custon style, the features can be automagically symbolised.
... View more
09-19-2016
07:24 AM
|
1
|
4
|
1579
|
|
POST
|
I had never seen that rescale by function tool. Very cool.Thanks Dan
... View more
09-18-2016
11:44 PM
|
0
|
2
|
4189
|
|
POST
|
Arc version, os etc. Is there any difference between when it works and not? Is everything going to a file geodatabase? No funny spaces or whatever in your data paths?
... View more
09-18-2016
12:48 AM
|
0
|
1
|
3270
|
|
DOC
|
I don't really think that dictionaries are not ordered is very important. If you want to read them in a particular order, that is easy to do (as long as the key sorts in the way you want). Main thing is speed, and they are incredibly fast.
... View more
09-16-2016
11:37 PM
|
0
|
0
|
18825
|
|
DOC
|
So, blake.terhune how would you use named tuples in a da.SearchCursor?
... View more
09-16-2016
11:34 PM
|
0
|
0
|
18825
|
|
POST
|
Hmmm, segmenting the raster or any spatial data relative to the stream line Z is a bit tricky. Been thinking about a "relative dem" tool on my quiet moments for a while now. But,yes, your approach could work.
... View more
09-16-2016
09:54 AM
|
1
|
0
|
3310
|
|
DOC
|
Ah, found it, thanks Xander Bakker Been using this sort of syntax to read in features or tables into a dictionary for ages (from code here): data_dict = {r[0] : r[1:] for r in arcpy.da.SearchCursor(
"DataTbl", [list of columns]} But I have been doing a lot of faffing with data ins and outs recently, and got fed up with trying to remember the index numbers for reading the attributes when processing the dictionary. So, after a bit of messing came up with this : My input data definition - # input features
indata_dict = {
"FibreCable" : ["OID@", "Fibre_Type", "Cable_Size", \
"Capacity", "FromDirect", "ToDirectio", \
"InstallDat", "NoUtilised", "SHAPE@"],
"FAT" : ["OID@", "Exchange_C", "MountingTy", "Rack_No", \
"Ports", "Coupler", "Address", "TermCables", \
"Capacity", "UsedPorts", "FreePorts", "SHAPE@"],
"CableSplice" : ["OID@", "Type", "Joint_No", "Capacity", \
"JB_Pole_Ch", "Cable_ID", "SHAPE@"]
}
So I have 3 tables to read. What I wanted was to be able to access the variables in each row via the column name rather than the index position. So, it might be obvious to some but not to me... cable_dict = {r[0] : dict(zip(indata_dict["FibreCable"][1:], r[1:]))
for r in arcpy.da.SearchCursor("FibreCable", indata_dict["FibreCable"])}
which results in this sort of content : >>> cable_dict[1]
{'Cable_Size': u'10.6',
'Capacity': u'48F',
'Fibre_Type': u' ',
'FromDirect': u'GAB01',
'InstallDat': u'2007',
'NoUtilised': 0.0,
'SHAPE@': <Polyline object at 0x2b95cd0[0x2b95f80]>,
'ToDirectio': u'JB48'} So each row of the dictionary is another dictionary, and when reading this structure to do some processing you can access the contents using the name of the variable rather than its index position. I suppose I have just replace one problem (remembering the index) with another (remembering the name!!).
... View more
09-16-2016
08:28 AM
|
1
|
0
|
18825
|
|
POST
|
Yes. So, if I want to add something to the original (which was a list of very useful "python snippets")? Will do so now.... Thanks again..
... View more
09-16-2016
07:51 AM
|
2
|
1
|
1641
|
|
POST
|
If I understand you correctly, the *.xyz data is an external text file. You need to make this into a raster file, then you can segment it at any elevation using con or the raster calculator or using reclassify. spatial-analyst-toolbox/con spatial-analyst-toolbox/reclassify
... View more
09-16-2016
07:46 AM
|
1
|
0
|
3310
|
|
POST
|
Thanks Dan, have never really got my head around how to properly search for something in GeoNet. Maybe that's something that could elaborate on a bit...
... View more
09-16-2016
07:27 AM
|
0
|
1
|
1641
|
|
POST
|
Trying to find the original post from Xander which really kicked of this part of GeoNet. Want to add something about one liner arcpy.da.SearchCursor stuff. Where is it or how do I find it?
... View more
09-16-2016
07:07 AM
|
0
|
6
|
2346
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-08-2015 11:28 PM | |
| 1 | 12-20-2013 08:59 PM | |
| 1 | 05-14-2014 10:38 PM | |
| 1 | 12-16-2013 09:05 PM | |
| 1 | 05-31-2019 02:50 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|