Hot answers tagged

21

The Fundamentals of georeferencing a raster dataset page from Esri explains the fundamentals of georeferencing. In short, the number of points depends. It depends on if you are simply moving the data, scaling, rotating or some combination of all three. If I am going to shift data that is already correctly scaled and rotated, then I would simply click one ...


9

To do this there is a GeoTagged Photos To Points tool which: Creates points from the x-, y-, and z-coordinates stored in geotagged photos. Optionally adds photo files to features in the output feature class as geodatabase attachments. It gets its geotagged photos from: The folder where photo files are located. This folder is scanned recursively ...


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 ...


8

Yes, ArcMap, ArcCatalog, and the other UI tools of ArcGIS Desktop (except Pro) are still 32-bit at 10.7.x. They will also be 32-bit at 10.8.x. Both 32-bit and 64-bit versions of ArcPy exist for Python 2.7 (the latter in the optional 64-bit Background Geoprocessing in Desktop). ArcGIS Server has been exclusively 64-bit since 10.1 (also Python 2.7). 64-bit ...


8

The *.prj file is part of the Shapefile format which is consists of other files: *.shp: contains the feature geometries. *.dbf: contains feature attribute data, as a table. *.shx: indexation data for iterations accross the features. *.prj: the coordinate reference system represented as text. In a word, the *.prj file informs on the coordinate reference ...


7

Since your feature class is in GCS_WGS_1984, you don't need to specify any Coordinate System. Though, if you want to add coord_sys explicitly, you can use one of those: EPSG code as string e.g. "4326" EPSG code as integer e.g. 4326 SpatialReference object # as string arcpy.AddGeometryAttributes_management(parcel_feat, "POINT_X_Y_Z_M", "", "", "4326") #OR ...


7

Another way is to specify the spatial Reference by name, for instance, Geographic Coordinate Systems/World/WGS 1984. The following snippet tested on ArcGIS 10.5 and worked as expected: import arcpy from arcpy import env ws = env.workspace = r"F:\Ahmad\Test\PT" fc = "Cities.shp" sr = arcpy.SpatialReference("Geographic Coordinate ...


6

If you don't need the symbology that is packaged with the layer, you can simply unzip/decompress the lpkx and grab the FileGeoDatabase within that contains the data. As for the symbology, you'd need to publish the LPKX to ArcGIS Online and then download the symbology from there. So, no easy work-arounds, but you do have access to the data itself from ...


6

Subtract the INT([MEASURE]/100) value, multiplied by 100, from the MEASURE to leave the remaining 98.28 Use Advanced label expression Function FindLabel ( [MEASURE] ) DIM leftval, rightval leftval = INT([MEASURE]/100) rightval = ROUND([MEASURE]-(leftval*100),2) FindLabel = leftval & "+" & rightval End Function Basically subtracting 33500 from ...


6

There are several ways to approach this.. Firstly, convert the legend to graphics, ungroup and move the text to fit (not recommended, if you change the symbology the graphics will not auto update). Secondly, replicate the layer twice but leave the visibility turned off. Remove the layer you currently have from the legend, add both new layers then remove ...


6

In ArcGIS Field Calculator, you can use a simple Python expression with the string.capwords function to capitalize only the first letter of each word and change everything else to lowercase. Select Python as the Parser, and check the Show Codeblock option. Then, in Pre-Logic Script Code enter: import string Then in the box below that the code should be (...


6

I'm not familiar with VB, but the following Python may do what you're after (with the 'Advanced' checkbox ON, and assuming a Shapefile where NULLs are not possible): def FindLabel ( [conductor_a], [conductor_b], [conductor_c] ): if len([conductor_a]): return [conductor_a] elif len([conductor_b]): return [conductor_b] else: ...


6

If your fGDB actually does have feature datasets (not just top-level feature classes), you could do: import arcpy import os arcpy.env.workspace = r"X:\311\Obtaining GIS Data\TaxParcels.gdb" # Get top-level feature classes featureclasses = arcpy.ListFeatureClasses() # Get data-set feature classes datasets = arcpy.ListDatasets() for ds in datasets: ...


5

This approach checks the last 'word' in your string to see if it matches one of the strings you want to eliminate: def FindLabel ([StreetName]): input_string = [StreetName] split_string = input_string.split() if split_string[-1] in ["NB", "SB", "EB", "WB"]: return " ".join(split_string[:-1]) else: return input_string


5

The only thing I can guess is that the coordinate system parameter needs to be a coordinate system data type. You're passing a string "GCS_WGS_1984", however, the documentation states that it should be a coordinate system instead. Try modifying your code to declare coord_sys as follows: coord_sys = arcpy.SpatialReference(4326) The sample code in the ...


5

Use Table To Excel: Converts a table to a Microsoft Excel file. Or click one of the grey small boxes to the left in the attribute table - Copy - then paste into excel:


5

Replace list.append(x) with list.append(x[0]) x is a tuple of 1 and when you add those to lists or convert to strings you get that (x,) notation.


4

Never tried myself, but it seems you can do something in the menu Customize -> ArcMap Options. Here you'll find a Data View page where you can set the fonts for the labels. A similar option is also present fot the Tables page. This won't basically change your fonts "application-wise", but for labels and tables only.


4

Try using the object identifier (FID or OBJECTID field). If you divide it by 65000 and convert the result to integer (equivalent to floor), then you will have your groups. int(floor(!FID!/65000)) note that you could use ceil() instead of floor() if you prefer to start at 1 instead of 0.


4

As with most bizzare ArcMap cases, a new template (Normal.mxt) will likely solve this issue. You'll lose all of your customized toolbars, but this fix usually solves most of ArcGIS Desktop's weird behaviors. Instructions can be found here: https://community.esri.com/docs/DOC-2121-resetting-your-arcgis-application-profile


4

If your values are all in a field called SECTION and you want all these values to be increased by 2: Start an Edit Session (means you can Undo after running Field Calculator if it doesn't do what you want) Select the features you want to update In the attribute table, right-click on the field you want to update and open the Field Calculator Enter the ...


4

In your arcpy.Project_management() you are passing the name of the spatial reference, not the spatial reference itself. Although the documentation for the out_coor_system parameter states Valid values are a Spatial Reference object, a file with a .prj extension, or a string representation of a coordinate system. I'm not sure if the name of a spatial ...


4

One way to do this is that you could add a new field with the "description (ac)" values, and then use the Field Calculator to concatenate your "crop type" and ac field values, with a space (or 2 or 3) between them into one that you perhaps call ConcatField. You can then symbolize using ConcatField and that will carry the text you are after through to your ...


4

There are code samples for converting to Proper case in the ArcGIS help for field calculation. I can't tell if that is what you want but it is what I would expect in addresses. Proper case capitalizes all of the words, including minor/stop words such as "the." Title case does not capitalize minor words. I have seen title case functions, probably in MS Word, ...


4

There is a problem with the spatial reference of your layer. The extent seems to correspond to geographic coordinates in degrees, but the crs assigned to the layer is a projected one - UTM Zone 51 in meters. You could try the following and see if it resolves the issue: Set your layer crs to GCS_WGS_1984 (epsg 4326) with Define Projection tool Project your ...


4

I generated a bunch of data, did some queries and found some interesting results. First, I started with 1137 hydrographic features (27,232 vertices) for New York (geographic CS, NAD83 datum), in shapefile hydro. Then I densified the vertices at a 100 meter interval to kick the vertex count up to 187,525 in shapefile hydro_100m. Next I generated hexagon ...


4

Use arcpy.mapping. First uncheck all layers except basemap then adjust and run: import arcpy mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] for layer in arcpy.mapping.ListLayers(mxd): if layer.supports("visible") and layer.name[:4] not in ("Cita","Base","Worl"): layer.visible = True arcpy....


4

I don't know much about Arcmap syntax for label expressions, but using Python, you could do something like: def FindLabel ([StreetName]): import re input_string = [StreetName] # Regular expression that look for strings ending with a space character # followed by either NB, SB, EB or WB, and replace this part by an empty string return re....


4

In the dissolve tool, dissolve by Owner name but make sure to uncheck 'Create Multipart Features'. The default setting of the dissolve tool has this checked:


4

I guess, Wheat layer is the first layer. You get that error, because reference layer (arcpy.mapping.ListLayers(mxd)[0]) and move layer (x) are the same (Wheat) at first running of MoveLayer method. Change for loop in following way: for x in orange_commodities: ref_layer = arcpy.mapping.ListLayers(mxd)[0] if ref_layer != x: arcpy.mapping....


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