|
POST
|
Anyone know of a quick way to count the number of records returned by a da.SearchCursor with a where_clause applied?
with arcpy.da.SearchCursor(MyLayer, "SHAPE@", SuperDuperAwesomeQuery) as rows:
# how do I figured out how many records are in rows without iterating through rows???
... View more
10-23-2014
08:31 AM
|
0
|
5
|
8263
|
|
POST
|
Thanks Jake, That makes a lot more sense. While I know its not a required entry for the PackageLayer tool to execute, it would be useful to be able to set that property through a parameter on the tool since that property can't be ported from a Layerfile or Feature Layer into the package when you're creating it since those input datatypes don't have that property. Was the idea behind not including that property in the GP tool to create a behavior where Access and Use Constraints is would always be null unless someone took the time to package and upload the LPKs 1-by-1 through the GUI?
... View more
10-13-2014
10:35 AM
|
0
|
1
|
1368
|
|
POST
|
When you create a layer package manually through the ArcMap Table of Contents, there is a textbox labeled 'Access Use and Constraints'. I have a few questions on this little...property (I guess that's what it is) First, what is the actual intent of this property? Is it for me to enter things like classifications (ie. Public, Confidential, Proprietary, Secret, Top Secret, etc.)? If so, what's the point as there doesn't seem to be a way to interrogate it or even set it through arcpy? Additionally, that property also does not seem to become a property on the Layerfile or Featureclass packaged into the LPK when they are extracted, so I mean really...I don't know what to do with it. Secondly, why is it unique to LPKs or more correctly Packages? I mean, an LPK is just essentially a zipped Geodatabase replica (or shapefile...and shame on you if that's the case) and Layerfile. Admittedly, it's a little more than that because if you change the extension to .zip, you can't extract it so there's a little more going on under the hood there, but conceptually that's what we're dealing with. What's more, when you extract an LPK, you get the dataset and a layerfile referencing the dataset in your assembly cache and the layerfile is what gets added to your MXD but since Layerfiles nor Feature Classes have no Access Use and Constraints property there's no place for that property to be assigned. So...poof? It goes into the abyss? I'm just really confused over the whole thing. Summary is another property which Layerfiles and Feature Classes do not have, but I'm able to rationalize that property a bit more because Layer Packages can contain multiple datasets and layers. Therefore, a summary is useful in that it can provide information about the contents...so could the description as well...darn it, confused again...
... View more
10-13-2014
08:26 AM
|
0
|
3
|
1831
|