gm70560
  • Member for 9 years, 8 months
  • Last seen more than 1 year ago
  • n/a
  • Memphis, TN
How to auto-fill domain or field?
Accepted answer
6 votes

Maybe a few pictures would help. A subtype field can be set to categorize the main types (rock, soil, debris); This would correlate to Field_1. Notice the desc field domain is set to rock. Each ...

View answer
Auto populate field with text using field calculator if/then
5 votes

To expand on the other answers: If you will be defining other values from RASTERVALU, besides the 1201, to CN_LEVEL3 you can put a dictionary into the codeblock. Example (I made some random values): ...

View answer
Extracting number of vertices in each polygon?
Accepted answer
5 votes

The code below combines the other answers and adds a bit to number the vertices. import arcpy arcpy.env.workspace = "in_memory" #paths fc = r"...\polygons" fc_out = r"...\vertices" arcpy....

View answer
Setting raster cell value to null if below threshold value in ArcPy?
Accepted answer
5 votes

arcpy.SetNull does not exist. You are wanting arpy.sa.SetNull. Here's the SetNull page for 10.1. If you notice in some of the examples there is: from arcpy.sa import * and you see that SetNull is ...

View answer
Why might Spatial Join appear to produce incorrect values?
Accepted answer
4 votes

This is likely to be due to the merge rules you are using (field map, right click field, merge rule). Merge rules are at the bottom of this page. Try setting the rule to mode to assign the polygon ...

View answer
Set visible/ratio for make feature layer based on a list
Accepted answer
4 votes

This isn't the most elegant solution, but I have recently used something similar to hide 40+ fields that weren't needed. I don't know how you get the names/index of fields that you need. This ...

View answer
Applying Symbology to group layer using ArcPy?
4 votes

Using ListLayers will help you in this task, especially if you want to apply this changes to all of the layers in the map document. In the question, arcpy is only seeing a list of text values, not ...

View answer
Transforming geographical points to geometry in PostGIS?
Accepted answer
3 votes

It appears that you are passing the coordinates in (lat lon) order instead of (lon lat) order. ST_GeogFromText :" Points are always expressed in long lat form" The record with ID = 1 your original ...

View answer
Can an arcpy.da.SearchCursor be used on a dataset residing in a ParcelFabric?
Accepted answer
3 votes

Arcpy.da.SearchCursor accepts, "feature class, layer, table, or table view" as the in_table. After looking at the Parcel Fabric page, I would suggest Make Parcel Fabric Table View (Parcel Fabric). ...

View answer
Adding group layer, renaming it from folder name, then adding layers to it from that folder, using ArcPy/Python?
3 votes

This should work; it worked for me. This will give you a group layer named by the folder and a layer with the name of the shapefile. I built off what artwork21 posted. import os import arcpy WS = r'...

View answer
Cleaning layers from non topological databases
3 votes

My favorite saying from one of my professors is, "Garbage in, Garbage Out." No matter the algorithm or method used, there will be no "magic button" that will fix a crummy dataset. Sometimes, the ...

View answer
Watershed extraction using different DEM tiles
Accepted answer
3 votes

Have you tried to create a mosaic out of the rasters and doing one watershed computation? This link is helpful for raster mosaics in qgis. Trying to make separate basins and putting them together ...

View answer
How to improve rendering performance of a very large shapefile?
3 votes

Do you need to render the map to make your queries? What if you ran python scripts and accessed the data without drawing the map? I'm not sure your exact process, needs, etc, but a thought.

View answer
Adding "0" to front of all values in column using ArcGIS Field Calculator
2 votes

As @Brian has said, the field will have to be text to keep the zero on the left. Here's a quick, basic python example: import arcpy #add path to shapefile, feature class fc = "..." arcpy....

View answer
Why is a single road sometimes split into separate layers?
Accepted answer
2 votes

I imagine this is due to the file size limitation of Shapefiles. From "Geoprocessing considerations for shapefile output" (link): There is a 2 GB size limit for any shapefile component file, ...

View answer
Editing tables in ArcGIS for Desktop with Python Parser of Field Calculator?
2 votes

If you did want to use the codeblock (arcgis 10.0) you need to define a function and return a value. Example: def rename(field): if " " in field: return field.replace(" ", "_") Then below the ...

View answer
Adding all feature classes of same name to mxd in ArcPy?
Accepted answer
2 votes

Edit: Something a little more robust than my notepad outline: Method one: List the directories in the root folder and slap the suffix on the end. Method two: Use os.walk to go through the folders ...

View answer
Use arcpy.da.searchcursor to select rows to dissolve
Accepted answer
2 votes

Here is a rough draft of what I think you are after. Use the cursor to get the OBJECTID's that you need. I don't think that the da.SearchCursor is needed. The values from the cursor are used to ...

View answer
How to create a Winkel-Tripel map of countries with different colors?
Accepted answer
2 votes

You can find a shapefile (vector) for countries as of 2010 from http://epp.eurostat.ec.europa.eu. It think that it would be easier to change the symbology of a vector file than deal with a raster. ...

View answer
territory analysis
2 votes

Have you looked at Service Area and/or Closest Facility in the Network Analyst Toolbox? This may be helpful. The map you posted has desire lines, which you can find in the Business Analyst Toolbox. ...

View answer
Need python code example - setting a combo listbox to Null
2 votes

Not using field-calculator, you can use UpdateCursor and setNull. (Arcgis for 10.1) a quick example: rows = arcpy.UpdateCursor(fc, sql, etc...) for row in rows: row.SetNull("FIELD") rows....

View answer
arcpy Problem with updateRow() when trying to update fields with UpdateCursor
2 votes

This might sound silly: Rename the folder or move the data to something without spaces in the name.

View answer
Summarizing values per row using field calculator via ModelBuilder?
2 votes

I would go the route of using cursors. I'm not sure of the field names that you are using, but something like this should work assuming that the VSG_EINZEL fields are numerical: import arcpy # use ...

View answer
Select layer by attribute for entries in a dictionary (python)
Accepted answer
1 votes

This is more of a few tips than an answer. You mention that it takes a while to run. I have to things to point out that can save some you some time. 1) Your code goes through the wells once; no ...

View answer
How do you convert to degrees and minutes from 8/9-digit lat/lon DMS code?
Accepted answer
1 votes

I'm not sure what software you want to use or how you are handling that file, but since the Code is following XXX XX XX.XX for Degrees Minutes Seconds, respectively, you can convert manually: Decimal ...

View answer
How to use for loop to add and calculate new field?
1 votes

Try extending the list of files; the elif isn't finding any AZ's since [CAshp] only has CA's from "*CA.shp". CAshp = arcpy.ListFiles("*_CA.shp") CAshp.extend(arcpy.ListFiles("*_AZ.shp") for CA in ...

View answer
Using Calculate Field tool to calculate on null fields using ArcMap
1 votes

The Update Cursors in arcpy both (da.UpdateCursor10.1, UpdateCursor10.1) have a spot for a SQL clause ("fieldX IS NULL" or "fieldX == """) to limit the extent of records updated. If there are other ...

View answer
Create Python script to update field based on change in another field ArcGIS
1 votes

Try this out. The SQL query may need to be changed depending on your circumstances. I gave this a spin on a few small feature classes and seemed to do the job. import arcpy fc = "X:\...\...

View answer
How to find parcels related to geocoded addresses?
1 votes

I would recommend standardizing the addresses (address normalization, correction). The output can be recombined into fields that share the same formatting. There are also other services that can ...

View answer
Tabulate Area crashes Python and ArcGIS
1 votes

You are running 10.1; have you installed any service packs? There is a list of bugs found for "tabulate area crashes" from esri's support page. Check to see if any apply to you, or check other ...

View answer