|
POST
|
How can I use a date field in a whereClause that I can reuse in a arcpy.SearchCursor? That will depend on the geodatabase (file, personal, SQL Server, Oracle, etc) SQL reference for query expressions used in ArcGIS—Help | ArcGIS for Desktop what is the difference between arcpy.da.SearchCursor and arcpy.SearchCursor? Accessing data using cursors—Help | ArcGIS for Desktop A new data access module (arcpy.da) was added in ArcGIS 10.1. The previously existing cursors (that are still listed under arcpy) are still functional and valid; however, the new arcpy.da cursors include significantly faster performance. In most cases, the help will illustrate the use of the arcpy.da cursors.
... View more
03-03-2016
01:33 PM
|
2
|
0
|
2840
|
|
POST
|
For more information on Darren's suggestion to load the contents of a cursor into a dictionary, Richard Fairhurst has a good blog on the topic. Turbo Charging Data Manipulation with Python Cursors and Dictionaries
... View more
03-01-2016
01:38 PM
|
1
|
4
|
2840
|
|
POST
|
Do you actually have a relationship class that you're updating in an edit session or is it just an on-the-fly relate done in that map document? Deciding between relationship classes, relates, and joins—Help | ArcGIS for Desktop
... View more
03-01-2016
01:32 PM
|
1
|
0
|
2157
|
|
POST
|
Since you can't clear them up over night, maybe it's just compounding again during the day. I would try to get everyone disconnected when you do your maintenance and see if that makes a difference.
... View more
03-01-2016
01:29 PM
|
0
|
0
|
3610
|
|
POST
|
What I was getting at is that if you disconnect all users when you do the reconcile and compress, it might help eliminate the long state lineages because nobody will be able to lock up the states in an ArcMap session.
... View more
03-01-2016
12:48 PM
|
1
|
2
|
3610
|
|
POST
|
Are you forcibly disconnecting all users when you do the compress? Are you also reconciling the versions that are still left (if any) before the compress?
... View more
02-29-2016
01:24 PM
|
0
|
1
|
3610
|
|
POST
|
Are those TCE feature classes versioned? If not, using truncate is faster than delete rows. Also, if you want to run this as a scheduled job, you'll need to use Python.
... View more
02-29-2016
12:54 PM
|
0
|
0
|
2770
|
|
POST
|
There is a Utility Survey 123 Configurations group that might be a better place than the section specifically for GeoNet help.
... View more
02-18-2016
10:55 AM
|
0
|
0
|
1143
|
|
POST
|
There's a Portal for ArcGIS subspace that would be a better place to post this. Additionally, here's the Esri documentation on the subject in case you may have overlooked something. Using Integrated Windows Authentication with your portal—Portal for ArcGIS (10.3 and 10.3.1) | ArcGIS for Server
... View more
02-11-2016
07:28 AM
|
2
|
0
|
1376
|
|
BLOG
|
These are great examples, thanks for posting. Just yesterday I was trying to figure out the best way to count the number of rows returned in a cursor.
... View more
02-04-2016
07:45 AM
|
0
|
0
|
1112
|
|
POST
|
This is my basic outline for emails on our scheduled task scripts. from email.mime.multipart import MIMEMultipart ## Build email parts
from email.mime.text import MIMEText ## Record email body type
import smtplib ## Send email message
from time import strftime
import os
def main():
# Email variables
addr_from = "[email protected]"
addr_to = ["[email protected]"]
addr_cc = []
addr_bcc = [] ## BCC is not used in the MIMEMultipart message but will be sent with SMTP
recipients = addr_to+addr_cc+addr_bcc
## Create email message container and set message parts
msg_root = MIMEMultipart('alternative')
msg_root['From'] = addr_from
msg_root['To'] = ", ".join(addr_to)
msg_root['Cc'] = ", ".join(addr_cc)
msg_root['Subject'] = os.path.basename(__file__)
# Opening lines of email message body
msg = "{scriptName} ran on {hostComputer}".format(
scriptName = os.path.basename(__file__),
hostComputer = gethostname()
)
istring = " Started {} ".format(strftime("%Y-%m-%d %H:%M:%S"))
msg += "\n\n{:~^64}\n\n".format(istring)
# #
# Do some stuff
# and update email with msg += "something\n"
# don't forget the new line
# #
# Close and send the email
msg_body = MIMEText(msg, 'plain') ## Record the MIME type of email message body as plain text
msg_root.attach(msg_body) ## Attach msg_body content to msg_root container
s = smtplib.SMTP('cityofnapa-org.mail.protection.outlook.com')
s.set_debuglevel(1) ## Print smtp debug info in Python interpreter (optional)
s.sendmail(addr_from, recipients, msg_root.as_string())
s.quit()
if __name__ == '__main__':
main()
... View more
02-04-2016
07:33 AM
|
0
|
0
|
4002
|
|
BLOG
|
Oh, so the syntax is like dictionary comprehension but without the colon and value? Sorry, I haven't investigated set comprehension, I was just being lazy and asking you what it was since I hadn't heard of it before. In your example, set_comp is the same as set(a). And it's (kind of) the same as [i for i in set(a)] What are the cases where you would use set comprehension?
... View more
02-02-2016
12:28 PM
|
1
|
0
|
596
|
|
BLOG
|
I am becoming a fan of list comprehensions. I would like to see your basic examples for set comprehensions.
... View more
02-01-2016
03:51 PM
|
1
|
0
|
596
|
|
POST
|
As a side note, I noticed that doing SelectLayerByAttribute on a Feature Layer from SDE is still "connected" to SDE. In other words, SelectLayerByAttribute will hit your database! I found that copying features (any means) to in_memory workspace truly works independently of the database. Although I haven't tested it, MakeTableView probably has the same behavior.
... View more
01-29-2016
03:52 PM
|
0
|
1
|
3884
|
|
POST
|
If you have ArcGIS Online, you could check this out. Perform GIS Analysis in the Cloud with ArcGIS Online There's also CreateDriveTimePolygons (Network/ESRI_DriveTime_US)
... View more
01-28-2016
08:07 PM
|
1
|
1
|
1422
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 3 weeks ago | |
| 1 | 10-23-2025 03:53 PM | |
| 1 | 04-28-2026 07:25 AM | |
| 1 | 03-19-2026 08:59 AM | |
| 1 | 02-12-2026 01:37 PM |