Hot answers tagged

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

Try the following function in the field calculator: def splitText(f): split = f.split() if len(split) == 0: return "" return split[0].title() The above function will check if you have empty street names, it will return empty string, otherwise it will return the first name in title case existing in the street name column. Here ...


4

Based on your quesion and code I think you're after something like this: import arcpy, os, itertools arcpy.env.workspace = r"C:/test/Test.gdb" # could be trouble if arcpy.env.overwriteOutput is False and the feature class already exists arcpy.CreateFeatureclass_management("C:/test/Test.gdb", "linea", "POLYLINE") # I ...


3

I suspect that ArcMap is interpreting your coordinates as Meters, rather than Degrees. If you Identify one of the points you may see this reflected as such The reason for this is beause the World Topographic Basemap comes in with a Coordinate System WGS_1984_Web_Mercator_Auxiliary_Sphere with a linear unit of meters - Linear Unit: Meter (1.0) When you ...


3

You can create an Attribute Table using the Build Raster Attribute Table tool which: Create or update a table with information about the classes in your raster datasets. This is used primarily with discrete data. The Attribute Table will show the count of pixels for each one of your classes (colors).


3

In the attribute table, right click on the field you want to modify and select Field Calculator. Set the parser to Python and tick the box for Show Codeblock. Enter the following code: def removeDigits(n): result = ''.join([i for i in n if not i.isdigit()]) return result Then for the expression, type the following: removeDigits( !HOUSE_NUMBER_N!) ...


3

def extract_number(adr): numberlist = [i for i in adr if i.isdigit()] if len(numberlist)>0: return int(''.join(numberlist)) extract_number( !Adress!)


3

Yes, Python is good idea. So for a table structure like that: below script will modify original shape(s) by one with area equal to defined percentage of original. So work on backup copy !!!. import arcpy polygons = "POLYGONS" tolerance = 1 def splitMe (shp,leftSide): E = shp.extent low, high = E.XMin,E.XMax pLow,pHigh = E.lowerLeft,E.upperLeft ...


3

Very simple solution possible in this case, because it's enough to find pair of vertices that will split hexagon in equal parts: FeatureVerticesToPoints(in_features="HEXAGONS", out_feature_class="C:/SCRATCH/points.shp", point_location="ALL") SelectLayerByAttribute(in_layer_or_view="points", selection_type="NEW_SELECTION", where_clause='mod( "FID",7) in (0,3)...


2

This seems like an obvious tool that ArcMap should have but it does not exists (to my knowledge) as a geoprocessing tool. Splitting polygons can be done in edit mode but not straight out of the box in a mass automated way. Do you think you are the first person to have ever wanted to split a polygon in half...no! When you are using ArcMap and you think of ...


2

There are other uses of the .prj file, it doesn't 100% have to be associated with a shapefile, however that is certainly its origins. Within ESRI packages, a .prj file could also be used to: store custom coordinate sytem definitions, which could be imported and used as a Data frame definition associated to a CAD file, such that when opening within ArcMap, a ...


2

The short answer is no, you can only symbolise on 3 attributes in ArcMap. However, what you could do is separate your layer based on definition queries. That is, copy and paste the layer and set the definition queries for each. For example, you could create a definition query for your valves to only show Status = Inuse. Then, you'd only be symbolising on ...


2

The short answer is Yes, but creating and editing a TIN surface is beyond the scope of this forum, you need to be training yourself if you are asking such questions. As you have tagged this as an ArcMap question I suggest you head over to esri training and complete the Creating 3D Data using ArcGIS course.


2

EPSG 4326 is a coordinate system of latitude and longitude based on an ellipsoidal (squashed sphere) model of the earth. Its not really a projection. EPSG 32637 (and any of the "UTM Zone" projections) is a projection of the round earth onto a flat surface, and has coordinates in metres. Its only accurate within the area of the zone, which is a ...


2

To create an address locator is simple in that you just need a street centerline shapefile of streets in Portland. This can be obtained from the Portland open data portal at this URL http://gis-pdx.opendata.arcgis.com/datasets/streets. Once you have obtained the street centerline shapefile you should use the Project Tool to project the shapefile in a proper ...


2

You should create two different label classes (changing labeling method in the layer's properties dialog) and based those two clases on SQL queries. One class with the statement Raised_Flat= 'RAISED' in wich the label field would be [Grave_Posi] The other with Raised_Flat= 'Flat' and the label field [Lot_1] You can look at this for a more detailed ...


2

There is a post by @KHibma on GeoNet that mentions how to release an Excel file lock from ArcCatalog While this is about ArcCatalog, it might also work with ArcMap - maybe from the Catalog pane within the ArcMap application. problem with ArcCatalog not releasing the file to use in Excel: If you click the upper folder that the excel file lives in and refresh ...


2

list as a variable name might get you into trouble caio, try to make it a habit to prefix (myVar, pVar etc) or proper case (ProperCaseExample) your variable names otherwise you might end up overwriting a keyword. Python is lax in its protection of keywords and will not even issue a warning if you do overwrite one. Most python keywords are all lower case, ...


1

The Basemaps you have available to you in ArcMap are based on your current location. For example, if you're in the USA you'll have some different basemaps available compared to if you're in Mexico, India, or the UK. Here are the available basemaps for those four examples from above: USA Mexico India UK There are likely other basemaps available (or not ...


1

I think that the constraints you are trying to use are mutually exclusive. You can not have a map that is fixed scale and also is cropped to the border of the townships because it appears that the townships are different sizes. You either need to have a fixed scale (in which case you can not have the map clipped to the extent of the township), or you need ...


1

ArcMap does not support multiple spatial columns in a feature class. You can create two separate views, each with a different spatial column, and add them to ArcMap as two feature classes.


1

You can edit attributes of multiple selected fields from the attribute table by using the Field Calculator. Select all the features you would like to edit (eg all the Route features) Right-click on the column header (Named Type in your screenshot) and click on "Calculate Field" In the Field Calculator window enter the value you would like to ...


1

Try CAD to Geodatabase: Reads a CAD dataset and creates feature classes of the drawing. The feature classes are written to a geodatabase feature dataset. Then export/convert the file geodatabase feature classes to shapefiles


1

You will have several options. You can used the built-in function of ArcGIS field by right-clicking, choose statistics and you can see the mean and other values of your selected list. Here is a screenshot of the Field Calculator You could also, right-click the field, choose field calculator which will provide you with the option to create a python script ...


1

Fortunately you are not dealing with polygons, so solution is simple. Extract vertices of your lines and clone them: FeatureVerticesToPoints("Contour_DEM_2016", "C:/SCRATCH/all_points.shp","ALL") Copy("C:/SCRATCH/all_points.shp", "C:/SCRATCH/all_points_Copy.shp", "ShapeFile") Run this field ...


1

I read your question as deciding which of the two given spatial reference systems apply to your CSV coordinates, fortunately this is a fairly easy decision. As geographic or projected are your only two options look at the numbers given for the coordinates, if they're less than 365 x 90 (a circle in the X then half a circle in the Y from -90 to 90, which is ...


1

You could use a search cursor and list to check for and delete duplicates. import arcpy fc = r'path' addr = [] with arcpy.da.UpdateCursor(fc, "ADRESSE") as cursor: for row in cursor: if not row[0] in addr: addr.append(row[0]) else: cursor.deleteRow()


1

I managed to solve the problem. In my case, I went to "Data Frame Properties" -> Data Frame, in the Extent tab select Automatic in the list box. Hope this helps!


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