Hot answers tagged

21

This is an intrinsic feature of ArcGIS. Just open "Geographic Coordinate Systems" folder, then the "Solar System" folder, then choose "Mars" and the datum associated with your data.


7

The output you are receiving is correct. Assuming you have two polygons, one without a hole, and one with a hole, then each of these shapes is single-part. Polygon geometry has two levels of construction - parts and rings. Each part must have one exterior ring, but may contain additional interior rings (aka "holes"). The partCount property returns the ...


7

Try placing the wellCntList list outside of the for loop. Otherwise, each iteration is writing over the results of the previous one--ultimately leaving only the last iteration's results. wellCntList = [] for cname in countyList: whereclause = "{} = '{}'".format("COUNTY", cname) wellCnt = 0 with arcpy.da.SearchCursor(Wells_Intersect_Layer, ...


6

Here's a simple expression with no need to define a function in the codeblock: Headwater = 0 if !NextDown_Copy! else 1 This checks if each value of NextDown_Copy is truthy (i.e. not a null, 0, empty string), and returns a 0 if so, otherwise it returns a 1.


5

@Caleb if you use the Spatial Join (Analysis) tool, you can click on fields that pop up in the 'Field Map of Join Features (optional)' portion of the tool window. While a field is highlighted, click on the 'X' to the right and it will delete from view (and therefor not show up in your Join output feature class). Also, you can set join rules for certain ...


5

I think you're misunderstanding the purpose of the unique identifier field, and using in ways that will generate undefined results. When a Query Layer is defined, you are given a great deal of leeway to generate an SQL query. ArcGIS uses that query, with various constraints, to access the data. The most common constraint is a spatial filter clause (using ...


4

What about using re and set and setting a flag ( here 0 and 1) in python- re will extract all the names (last and first) from BENNETT MCCARL & ARNETTE BENNETT without &. For pattern matching re is of highest priority- you can use re how you want. import re def sorter(val): words = re.findall(r'\w+',val) uniques = set(words) if ...


4

You can use the Python collections module and an Update Cursor to accomplish this. This method adds a new field and populates it with a 1 if there are any duplicates, otherwise a 0 if there are no duplicates. import arcpy, collections shp = r'C:\temp\names.shp' # Add a field called "check" to store binary data. arcpy.AddField_management(shp, field_name = ...


4

Not automatically, but you can set up related tables, and from the Attribute Table you select Related Tables and it'll open the related table and select the matching records. Establish your Relate from Layer Properties > Joins & Relates tab (this only needs to be done once per Relate): Select a Feature from one of the Layers: From the Attribute ...


3

I would suggest reading up on spatial statistics. In particular, I would look at spatial autocorrelation and clusters. The ArcGIS Resource page on the Spatial Statistics toolbox might be a good place to start.


3

You can use the Get Count tool from the Data Management toolbox, which Returns the total number of rows for a feature class, table, or layer


3

You could use the Summary Statistics tool. The input table would be that which you want to count the records of. The statistics could be any field, but let's say ObjectID/OID. The statistic type would be COUNT. The output table could be whatever you like, possibly even stored in_memory. Once the tool is run, the output table will have one record, and the ...


3

I expect there's a better way to do this, but here's a start that works for me (Python parser): def FindLabel ( [10_2008] , [11_1994] , [11_2000] , [11_2002] , [11_2003], [11_2008], [12_1987] , [12_1994] , [12_2003] , [12_2010] , [12_2011] , [12_2012] , [3_2006] , [3_2011] , [4_1993] , [5_1997] , [5_2001] , [5_2007] , [5_2008] , [6_1998] , [6_2005] , ...


3

Extend both the rasters and the weights to grids covering the entire area of analysis. It is essential that every NoData raster value be converted to a numeric value and that the weight in its NoData region be set to zero. These operations are best performed with Con and IsNull operations. The weighted mean is then computed exactly as in the question: it ...


3

You can circumvent the error of the deep deep folders / file path longer than 255 characters in two ways in Python. One way is to use the win32api and get a short representation of the long filepath. From what I understand this is also what WinExplorer does internally. from win32api import GetShortPathName long_path = ...


3

I am afraid that you will need to create 79 distance rasters with the distance for each point. This can be done in model builder (with iterate features) or with python (loop on the ID with make feature layers). Once you have your 79 rasters, you can use "extract multi values to points" that will yield a origin-destination cost matrix in your attribute ...


2

I would suggest converting your CAD annotation to geodatabase annotation and trying again. Here is an Esri knowledge base article on how to do so: http://support.esri.com/EN/knowledgebase/techarticles/detail/19961


2

Check the options in the drop-down against a Text field rather than a Number field. They differ and may be why you don't see what you're expecting. Text field merge options: Number field merge options:


2

What you will need to use is Iterate Row Selection instead. See the ArcGIS help page for more information. If you then use Get Field Value you will be able to use the Name/Expression in other tools.


2

The asker provided the answer below within their question, and so it has been cut/paste to here: The Arc Raster to Polygon tool automatically dissolves border lines where adjoining cell values are identical. There doesn't seem to be any way to force Arc to create a mesh for EVERY raster cell. So my solution is to create a new raster where every ...


2

I had the same problem and simply convert .xlsx to .csv only helped to display the x coordinate. I used the table to table file to create a new table from the .csv file and define the field type to be numeric. After that it worked. To me it seems to be more of an excel problem rather than an ArcGIS 10.3 problem...


2

If you have the data in Excel you'd probably do better doing the calculation in Excel! The Haversine formula (find it here: http://www.movable-type.co.uk/scripts/latlong.html) will give you the distance between two pairs of latitude and longitude.


2

Assuming your source data is a FeatureClass/Table in a File GeoDatabase then the following query will select the rows you require: SUBSTRING(name FROM 1 FOR 7) = 'BENNETT' AND SUBSTRING(name FROM (CHAR_LENGTH(name) - 6) FOR 7) = 'BENNETT name is the field, I just happened to call it name. The first part is testing the left hand side the second part is ...


2

Field calculator expression based on this answer def cw(sentence): words = sentence.split() counts = {} nMax=0 for word in words: if word not in counts:counts[word] = 0 counts[word] += 1 nMax=max(nMax, counts[word]) return nMax '================================================== cw( !MUID!) It will return maximum count of same words in ...


2

You never get past the first if statement because you are comparing and empty list to None which will always result in True because it exists - even though it is empty. An example: own1 = "own1" [own1] is not None > True own2 = None [own2] is not None > True The second statement is also true because you are using the brackets around own2 that ...


2

To answer your question, the way it works is that the database will return one row for each of the distinct values, but there is no guarantee that every time you use the layer the same rows are returned. What row it latches onto is somewhat arbitrary, especially if people are editing the table in question. Alternatives to the unique identifier that is not ...


2

I changed your code somewhat but it produces what you want. It checks for owner to be empty or none, then it checks the same for percent. If they both have values it adds them to the label. You can modify any section of this with an else to replace the empty value with something if needed. Yes intial problem was the way you were checking for the value, but I ...


2

When creating a feature class from a table (or a text file), you cannot export directly into a feature dataset; this is just an existing limitation of the software. but there could be a good reason behind it. The recommended workaround is to use the Make XY Event Layer GP tool first and then exporting the event layer into a feature class within the feature ...


2

You want to clip the features. If you don't have a single large state boundary to work with you might merge all of the counties into one before clipping. If you are just learning then I would browse through the help file geoprocessing topics. They are informative and you will probably find processes you didn't know exist. I have spent hours in the help ...


2

You can try enabling it via the Python window (under Geoprocessing > Python). Open a Python window and enter: arcpy.CheckExtension("Spatial") That will tell you if a Spatial Analyst license is available. If it is, enter the the command: arcpy.CheckOutExtension("Spatial") That will check out the license and you'll be able to use the Spatial Analyst tools. ...



Only top voted, non community-wiki answers of a minimum length are eligible