|
POST
|
That's annoying. What if you exported to a file geodatabase and then ran the Table to Table (conversion) tool on the resulting FGDB table with the output table having a .csv extension? I think that would do it. Micah
... View more
06-23-2017
02:22 PM
|
0
|
0
|
1030
|
|
POST
|
Hi Eric, How many records have null Lat_Long values? If it's not too many, I recommend using pyodbc to select the address column(s) from records in your SQL table with Null Lat_Long values. Then for each row returned by your selection, you can write the address fields to an in_memory table with a single row. Geocode that table and output to an in_memory feature class with one point feature. Then, you can read the Lat/Long values from the feature class using an arcpy.da.SearchCursor and update your SQL Server table with that value/values. The advantage is all the work would happen in-memory and so you wouldn't have to deal with an actual CSV and Shapefile being on your disk. Hope this helps! Micah
... View more
06-23-2017
12:45 PM
|
0
|
2
|
1810
|
|
POST
|
Hi Andrew, Have you tried a simple script tool that just outputs a message using arcpy.AddMessage()? That might be a good way to isolate the issue. Also, is there any chance you could execute the whole thing in a Python script? FWIW, I just tried a script tool of mine in ModelBuilder and it did display the messages as expected. Good luck, Micah
... View more
06-23-2017
12:26 PM
|
0
|
0
|
4232
|
|
POST
|
Hi Hannes, Can you leave the caption for that widget blank (or put in a space) in the Python Addins wizard? Alternatively, you can edit the config.xml in the addin folder within your addin folder. Set the tag for the combo box to be ComboBox caption="" (empty string in double quotes). Don't forget to recompile it by running makeaddin.py and relaunch ArcMap/Catalog. Hope that helps. Micah
... View more
05-08-2017
07:53 AM
|
2
|
1
|
1511
|
|
POST
|
Yeah supposedly an SDE workspace validates features when they are loaded but I have seen issues with that. Is there a specific type of geometry problem you are noticing? One idea would be export your FC to file geodatabase, find/fix your geo errors, then overwrite it in SDE. Good luck. Micah
... View more
05-08-2017
07:06 AM
|
1
|
0
|
2011
|
|
POST
|
Cool, man! Good for you for customizing your way out of that license level conundrum.
... View more
05-04-2017
02:35 PM
|
0
|
1
|
3562
|
|
POST
|
Hi Devin, That's probably a feature with "Null Geometry". It's technically a feature in your feature class (and a row in the attribute table) but an empty value for the SHAPE field, which in Python-speak is represented by the None keyword. So, you could delete that feature or create a shape for it. Use the Check Geometry or Repair Geometry tools to find and correct that feature and any others like it. On a side note, are you familiar with the Feature to Point tool? It'll get you polygon centroids nice and easy. Micah
... View more
05-04-2017
02:25 PM
|
1
|
6
|
3562
|
|
POST
|
Hello Russell, Wow! What a challenge. This is the kind of task that makes me glad I got into GIS. Assuming you'll want to ingest changes in each county's road network, a repeatable/automated process is likely desired. I have a couple thoughts: Is there a regional entity (or your office) that could work with the counties to facilitate editing their data so it edge-matches the neighboring county? That might be more work up front but would sure make things easier in the long run. Are the edge-matching issues occurring along county boundaries? If so, you could design a process using Python or ModelBuilder that would clip each county's centerlines to its own county boundary and then... Use the Snap tool. You can set up a "Snapping Environment" that allows you to specify END snapping and specify a snapping distance which defines how far afield from each feature end the tool will look for a snap point. If you use the Snap tool, make sure to test it beforehand either on a copy of the data or in an edit session so you can roll back the changes if you don't like the results. Good luck - let us know when you figure it out. Micah
... View more
04-26-2017
04:27 PM
|
2
|
1
|
4611
|
|
POST
|
Hello Eric, Do you need to do this on a recurring basis? If no, you could just Append the results of your Feature to Point centroid process to your existing address points using stand-alone geoprocessing tools. If you needed it on a recurring basis you could set up a process to accomplish this with ModelBuilder or Python. But really, you're halfway there with Feature to Point, the only additional step would be an Append. Hope this helps. Micah
... View more
04-26-2017
09:17 AM
|
1
|
2
|
2282
|
|
POST
|
Hi Larry, I should think so. How about something like this: import arcpy
# point the workspace to your enterprise geodatabase
arcpy.env.workspace = r"[path to enterprise GDB]"
# set the environment to overwrite output
arcpy.env.overwriteOutput = True
# list the line feature classes (might have to modify
# this depending on how many FCs are in your workspace
linear_fcs = arcpy.ListFeatureClasses("*", "Arc")
# create a float variable to store the total length
total_length = 0.0
# copy each FC into the in memory workspace, add a
# length attribute, and add the length of each to the total
for fc in linear_fcs:
# copy
arcpy.CopyFeatures_management(fc, r"in_memory\temp")
# add length attribute
arcpy.AddGeometryAttributes_management(r"in_memory\temp", "LENGTH", "FEET_US")
# add the length of each feature to the total
with arcpy.da.SearchCursor(r"in_memory\temp", ("LENGTH")) as cursor:
for row in cursor:
total_length += row[0]
# print the result
print("The total length is {} feet.".format(total_length)) Hope this helps. Micah
... View more
04-25-2017
01:23 PM
|
2
|
1
|
3130
|
|
POST
|
My organization has shunned date fields in the past because there isn't an obvious way to enter only a partial date value. For instance, rather than just entering the year 2017, ArcGIS forces the user to pick a month and day as well, eg. 1/1/2017. As a workaround, they use text fields with the format YYYYMMDD, with the MM and DD portions being optional. This also allows users to enter UNKNOWN if they aren't sure. The problem arises with web editing forms where users can't use the handy calendar widget to select a date and instead have to enter numbers in a specific format into a text field. Needless to say, this is cumbersome and confusing for non-GIS-savvy staff. This also makes the values fairly useless for querying, and other functionality that you get with date fields. Have others encountered this problem, and if so how did you approach it? Thanks for any suggestions. Warm Regards, Micah Babinski
... View more
04-25-2017
10:56 AM
|
0
|
1
|
1451
|
|
POST
|
Oh no! Did you try right-clicking the .mxd in Windows File Explorer and going to the Previous Versions tab? If you had a restore point or System protection enabled on the drive where the MXD was saved, you may be able to access the previous version: Also, if you saved the file on a network and you work in an organization with good IT support, they may be able to restore the file for you. It might be worth asking your system administrator if you have one - that's what they are there for! Good luck. Micah
... View more
01-19-2017
01:01 PM
|
0
|
0
|
3317
|
|
POST
|
Hi Ernesto, Good on you for diving into Python! It sounds like you are on the right track and learning to use DA insert, update, and search cursors is incredibly valuable on it's own. Still, I am curious to know why the Append tool wouldn't work for what you are describing. What were you not happy with about the results of an Append? Micah
... View more
01-19-2017
10:55 AM
|
0
|
1
|
3002
|
|
POST
|
Heya Ernesto, How about this: pntArray = []
for row in arcpy.da.SearchCursor("countAddrPnts_lyr", ["OID@", "SHAPE@", "SITUS_STREET_NUMBER_END2", "SITUS_STREET_NUMBER2"]):
for part in row[1]:
for pnt in part:
if pnt:
pntArray.append("arcpy.Point({}, {})".format(pnt.X, pnt.Y))
print(", ".join(pntArray)) Would that work for you? Micah
... View more
01-19-2017
08:54 AM
|
1
|
0
|
3002
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-13-2017 09:58 AM | |
| 1 | 10-27-2017 12:54 PM | |
| 1 | 10-13-2017 04:28 PM | |
| 5 | 08-14-2017 01:58 PM | |
| 1 | 10-16-2017 08:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-26-2021
03:16 PM
|