Hot answers tagged

10

Your problem is that in Python 2 None is less than everything. >>> None < 20 True >>> None < numpy.nan True >>> None < float('-inf') True >>> None < 'Everything' True Notes: In ArcGIS Pro (Python 3) you'll get a TypeError using a numeric comparison operator with None which will help avoid this issue. This ...


9

Intersect Select By Location to only select buildings with overlaps: Dissolve the selected features Start editing on building and delete all selected features. Stop editing Append the dissolved features back to the buildings.


9

Measuring from "bank to bank" is too vague. In the image below I've illustrated 8 different ways you can measure to the south bank from a single point on the north bank (red arrow). Which of these lines would be the "correct" line of measurement for the distance from that point to the other bank? Any point along the river has more than one possible bank to ...


9

You could try the GRASS algorithm v.centerline v.centerline creates a new map with a line representing an approximation of the central tendency of a series of input lines that all have similar trajectories. This can for example, be the central line of a river represented by its two sides, or a line representing the general direction of a series of flight ...


8

Zipping all the parts is the usual way of transferring shapefiles, yes, and its the best we've come up with. This is one problem with the shapefile format which is overcome by the GeoPackage format - if your software can save or export your data to a "GeoPackage", and the person you are sending it to has software that can read GeoPackages, then you could ...


7

If you look at the Syntax Help for ListLayers you will see that its third parameter is data_frame: ListLayers (map_document_or_layer, {wildcard}, {data_frame}) and that data_frame is expected to be: A variable that references a DataFrame object. In your code you have: layer = arcpy.mapping.ListLayers(mxd, "point10", "Layers")[0] so you are trying to ...


7

You don't even have to write any code! Simply edit the table and do a find and replace on the selected field. Example of replacing B with XXX. Result of replacement


6

def ConcatAddr(Adress,Streetname,Apartment,Citycode,Zipcode): return ' '.join([str(i) for i in [Adress,Streetname,Apartment,Citycode,Zipcode] if i not in(None,' ')]) Use Python parser and call with JOIN_KEY= ConcatAddr(!Adress!,!Streetname!,!Apartment!,!Citycode!,!Zipcode!) (You can also define the function as: def ConcatAddr(*args): return ' '....


6

Let's turn some of the comments into a partial answer. I'm an Esri employee but not involved in the guts of ArcGIS Pro so I'm going by what I've heard over the years and can find in the help. ArcGIS Pro uses an Esri-built graphics engine, optimized for GIS data and which uses a GPU if available. ArcGIS Desktop uses the Microsoft graphics engine which had ...


6

tl;dr; The performance of all basemaps from arcgis.com inside ArcMap will pretty much be equal. The basemaps you reference all come from the same cloud infrastructure and show the same thing: static images. (png, jpg, etc). In short, the only potential performance difference you may encounter is how long it takes to download the cached tiles of one ...


6

Dissolve tool does exactly what you are asking for: Aggregates features based on specified attributes.


6

Due to complex shape of natural channels I think the diameter of largest inscribed circle is much better definition of greatest width: Computing polygon skeleton and perpendiculars to segments are very challenging tasks.


6

You only need to supply the contents of the WHERE clause. So while the whole SQL query would be: SELECT * FROM w_pipe WHERE SUBSTRING(CRITICAL_CODE, 7, 1) = '8' All that is actually needed is: SUBSTRING(CRITICAL_CODE, 7, 1) = '8' Notice that I also enclosed the 8 in single quotes, because it will have to be a string data dype in order to be compared t ...


5

These basemap are provided with ESRI, and developed in their own window. You cannot add basemap directly in this basemap window. However you can integrate other basemaps as services in the ArcMap. You may use Portable Basemap Server, to create services for basemap and then add them in ArcMap.


5

You can use this Python code expression: chr( ord( !FIELD_NAME![0] ) + 1) Note: Be aware to change the default parser from vbScript to Python The [0] after the attribute is intended to return only the 1st character of the input string, then, even if you have only a space after the 1st letter, you are sure that only one character is returned. The ord ...


5

Right Click on your legend Graphic > click properties > select the items tab > in the list of your layers select your required layer(s) > right click and go to its properties > select the General tab, from here you can mark check on whether you want a layer name or its indents or both. Like:


5

Answer as suggested by @PolyGeo: press the button at the top of the Catalog window of ArcMap. It rotates between tree, contents and split views.


5

In the Label Expression, switch to "advanced", select VBScript as Parser, and paste this code: Function FindLabel ( [veg_dominant] , [veg_codominant] ) if [veg_codominant] <> " " then FindLabel = [veg_dominant] + "+" + [veg_codominant] else FindLabel = [veg_dominant] end if End Function This expression means: if veg_codominant has values, then ...


5

Your labels are not actually labels, they are annotation. You are dealing with annotation created in the map document, rather than in a geodatabase. Open the data frame properties to view all of the .mxd's annotation groups.


5

Your problem is the data type as String. You are trying to use it like numerical value but in string the "number" order is "alphabetical" meaning that "2" for exemple come after 11 (or that 2 > 11 is evaluated as true...). If you sort your column in the attribute table you will see that all number starting by "1" are on top (like 1, 10, 1125,...) then ...


5

A shapefile is a series of files (*.shp, *.shx, *.dbf, etc). It is not a database. In theory you can store such files in a relational database as Binary Large Objects (BLOBs) but for considerations when doing that see Should binary files be stored in the database? from the DBA Stack Exchange. I think a much better approach is to import your shapefile into ...


4

Change the classification method to something different (e.g. equal interval). Classes is no longer greyed out. Then change the number of class levels to what you require, and then change the method back to 'Manual'.


4

A MemoryError means that you have exhausted the memory available. If your ArcGIS is 32-bit, then that limit is 4GB. You will see this error with a large array with float64: # Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 import numpy as np ar = np.empty((16963, 11367), np.float32) del ar ar = np.empty((...


4

You can filter the string by digits using str.isdigit method. Change [Key] to the name of your field: def FindLabel ( [Key] ): return filter(str.isdigit, str([Key]))


4

It sounds as if you copied the .gdb folder within Windows. Per Esri: Note: Managing file geodatabases, including copying, renaming, and deleting data, should always be performed with ArcGIS and not with Windows Explorer. The tools in ArcGIS ensure that no data loss or other problems occur. Please copy the geodatabase (which will include all tables, ...


4

See the first two maps. They have both Ferro and Greenwich longitudes directly labeled, so you can determine Greenwich-based control points. I would try 3-5 points left right at both top, middle, and bottom of the map and try directly georeferencing to lat/lon. Note that the longitude lines bifurcate so you'll have to pick the main line. If that doesn't ...


4

Coming from a remote area with slow and often spotty internet, I have found that it is necessary to set the dataframe coordinate system to WGS 1984 Web Mercator (auxiliary sphere) when using an ArcGIS Online basemap. Be warned - the basemap loads quickly, but it appears the measure tool does not give accurate measurements when using this coordinate system.


4

It seems you should be able to do all the things you are exploring to do between the two different licenses. It doesn't appear that using different licenses on the same computer would be violating any Esri licensing rules. Based on ArcGIS Desktop license types A Single Use license authorizes one person to use ArcGIS Desktop, optionally including ArcGIS ...


4

I think your single quote characters around the file paths are causing the error. You begin the string with an end quote and end the string with another end quote. Instead of r’C:\path’ try r'C:\path'. Also, make sure you include a slash after the drive letter in your file path, like you did the first time but not the second time: C:\path as opposed to F:...


4

Wether or not this window is shown is determined by a registry value. HKEY_CURRENT_USER\Software\ESRI\Desktop10.4\ArcMap\Settings\GettingStarted ShowStartup: DWORD:0 (The version may be different on your system) You could try to set this value to 0 in your extensions Startup() method. If that's early enough I don't know. If not, maybe you could find ...


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