POST
|
Maybe someone can explain to me why a request was made about this eight years ago, and there still has been no action to integrate this into the Multidimension Tools? NetCDF data uses this rotated pole projection a lot, and there's no capacity for bringing it in?
... View more
01-25-2019
12:34 PM
|
0
|
3
|
1956
|
IDEA
|
Basically my issue is that ArcGIS Pro rotates symbols very nicely through its GUI according to the values coming from an attribute table variable (Vary symbology by rotation, one of the specific Vary symbology by attribute options), but that I am having difficulty getting ArcPy to do the same thing automatically for the user. I'm writing a script to process thousands of ship locations and all I want is to turn the ships the direction they are facing via a variable on what the ship heading is, something I can do with manually in ten seconds. This comes from the discussion concerning an ArcPy question I had (Let's try this another way: Is there any way in ArcPy to reproduce the "Vary symbology by rotation" functionality from ArcGIS Pro's GUI? ) Can ArcPy make this Vary symbology by rotation functionality accessible?
... View more
09-19-2018
06:08 AM
|
1
|
2
|
739
|
POST
|
Yes, this is pretty much what I thought. Consequently I'm stuck with trying to get the code to work that you were helping me with on the other thread (Trying to rotate icon differently for each unique value in UniqueValueRenderer ). I'm frustrated because I am so close to getting this working. I can see that the icon does the rotation I want, but I can't figure out how to get the code to say "okay, we've done this unique value, now move on to the next one, rotate that one differently, and don't obliterate what we just calculated for this unique value and replace it with the rotation for the next one". If I can't use ArcPy to directly use existing functionality to Vary Symbol By Rotation, this is the only option left to me.
... View more
09-19-2018
05:41 AM
|
1
|
1
|
787
|
POST
|
I just want my script to rotate my symbols, the way it's possible to do by manually using "Vary symbology by rotation". Why isn't this easy? Why isn't there something like item.varySymbologyByRotation(variable)?
... View more
09-18-2018
11:41 AM
|
0
|
3
|
909
|
POST
|
Thanks, Dan. I made the change and it ended up not catching the cases that are null, probably because the data table this is being run on is the result of a join and what is in those cells are Strings (that is, the String "<Null>"). So presently I've changed this to "if itm.values[0][0] not in ("<Null>", None):" and it is still catching the instances where it says "<Null>", while also catching any other potential instances of no value for a particular cell, so it's an improvement in the code to be sure. It's still not solving the issue with the icons rotating as a group rather than allowing me to rotate each individually, though. Is there another way I can get at that?
... View more
09-18-2018
08:37 AM
|
0
|
0
|
695
|
POST
|
Hi, why does this code rotate every item's icon instead of each icon separately? I cannot get the necessary information from documentation available. I want each unique value to have a differently rotated symbol: l = m.listLayers("xylayer")[0] sym = l.symbology symList = sym.renderer.symbol.listSymbolsFromGallery("ShipAIS") current = None for symbol in symList: current = symbol sym.updateRenderer("UniqueValueRenderer") sym.renderer.fields = ["Combined_True_Heading"] for grp in sym.renderer.groups: for itm in grp.items: itm.symbol = current if(itm.values[0][0] != "<Null>"): itm.symbol.angle = 360 - float(itm.values[0][0]) else: continue l.symbology = sym
... View more
09-18-2018
07:41 AM
|
0
|
2
|
835
|
POST
|
Hi, I am trying to do this, but via arcpy. Is that possible?
... View more
09-17-2018
07:43 AM
|
0
|
0
|
1806
|
POST
|
I have no trouble adding the point symbols to my gallery, but arcpy scripts can't see what I've done. Manually I can click on my added point symbol from a new mapicons.stylx file, but arcpy can only see my system styles, not any I've added to the gallery. Is there a reason for this?
... View more
09-17-2018
07:34 AM
|
0
|
1
|
3498
|
POST
|
I want to use arcpy to apply a symbol from a .stylx file and then rotate the symbol according to a variable. Doing this manually, this merely involves clicking on the icon from the gallery pane (where the symbol is located despite being in a .stylx file, the style is clearly regarded as a "project style") and then using "Vary symbology by attribute", "Rotation", selecting the rotation variable, and geographic style for the method of rotation. It's easy manually, I just want my script to do it automatically. The relevant code: aprx = arcpy.mp.ArcGISProject("CURRENT") m = aprx.listMaps("AIS Live Feed")[0] l = m.listLayers("xylayer")[0] sym = l.symbology ##begin code that doesn't work sym.renderer.symbol.applySymbolFromGallery("ShipAIS") ##end code that doesn't work It doesn't regard my ShipAIS icon, stored in its .stylx file, as part of my gallery. I am able to get the icon to change with this code if I select one that is in my default gallery. Even doing that, though, I don't know how to direct arcpy to rotate an icon once I'm able to access it - there appears to be an "angle" attribute, but I'm not sure how to apply it. Does anyone know how I might do this?
... View more
09-06-2018
08:45 AM
|
0
|
4
|
1732
|
Title | Kudos | Posted |
---|---|---|
1 | 09-19-2018 06:08 AM | |
1 | 09-19-2018 05:41 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|