The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

You just "zoom in" from the data view to increase the map size in layout view.


0

Without access to your data it is difficult to speculate what the issue is. May be it's the format of the data or may be it's something completely different such as a daft file name that is invalid? If you have no prior experience to image classification then I would recommend you start playing with the isocluster tool (unsupervised). This is one of the ...


2

Yes, you can usually see NoData cells without Spatial Analyst, directly from the raster. On the Symbology tab, look for the Display NoData As drop down button. This is usually set to no fill/no color. You can change this to a strong color (and perhaps change other symbology for the raster to grays). The no data cells should be easy to spot. Of course, if ...


0

Unfortunately, you cant chnage the aspect ratio for text if you add it from Insert menu. However, you can get text with this function by using the rectangular text box on the Draw toolbar. You can find it on the dropdown next to A. Although it would not be a dynamic text but should do the job.


0

Since you don't have the red boundary polygons as a layer you can do two things: if the red boundary is along the boundary of blue polygons, you can simply select those polygons and do a clip function with your purple polygons. if the red boundary is not along the boundary of blue polygons, you will have to edit your blue boundaries and then clip it with ...


0

Looks like the projecting is different for both your raster. Check your data frame properties to see your projection and make sure it is same for both your rasters. You can change the projection by going to Properties > Coordinate System.


0

For anyone that needs to download a state level Tiger road network (2019 the most recent version available) I have created these and made them available at nominal cost at the following site: https://tiger2019.dpdcart.com/. The files have been created to simplify the effort of downloading and merging the county level shp files available from ftp2.census....


0

It seems to me that you do don't have a polygon boundary representing the red color to use it as a clip polygon. Therefore, the only option you have is the manual editing. To get what you are looking for, you need to enable/start editing the blue polygon layer and use Cut polygons tool along with Trace tool. The cut polygons tool will be used to cut the ...


2

You are using the wrong tool, what you are showing is converting XY to points. You need to be using the XY to Line tool. This will create straight lines between your pair of coordinates.


1

Using a connection to USER_B: GRANT SELECT ON USER_B.TEST_TBL TO USER_A WITH GRANT OPTION;


0

You should apply reverse Spatial Join, from point to buffer. 1-Firstly create a field with unique value in buffer polygons (you can use objectID or FID). 2-Than apply spatial join (right click on point layer and choose Join or search it in toolboxes) 3- Summarize the new layer by this field (open attribute table and right click on that field name you ...


0

Before you address the second part of the question, which will likely be solved using raster algebra or a similar function, you will need to clarify in statistical terms what you mean by "probability of occurrence". The "Kernel Density" tool gives you a raster where the cell values represent the "number of seals per unit area". In other words, how many ...


0

Sure, you can do that. Start with the table that has the greater number of rows and to it join the table with the fewest rows. Be sure 'keep only matching records' is not checked. A common situation similar to yours is where you might have a feature table with many features classified into 5 'Types'. To that table you want to join a much smaller dictionary-...


0

As @LeoM says in the comments, Project one layer first, then you can Merge the two files. You might want to also look into Dynamic Segmentation as a cleaner way to store speed limit data then breaking the road into a bunch of separate line features.


3

Currently, the loop should be creating a row value of a list containing the number 0, which would probably error out. I think the deletion of row and cursor are also unnecessary as you have a with statement which should close out of the cursor properly. If you want just the first item of a string value from the first element in the row, calculate it as ...


2

By running print(sys.executable) I have found that it is using an old 64 bit installation of Python from an older version of ArcGIS. It turns out that there are several versions of Python installed from various versions of ArcGIS. After deleting the other older installs of Python (which required restarting the machine first), and then re-running PyScripter,...


1

pre-logic code block might work better as: def thing(last_allpaving): return '{}-{}-{}'.format(last_allpaving[:5], last_allpaving[5:7], last_allpaving[7:]) as stated in some comments, it is not necessary to use a pre-logic code block, but if you choose to do so, this should help. In general... When using The Field Calculator with a Python expression, ...


1

Step 1 - create a table with all the fields you want on your layout - if you don't need to store history, you can just keep one record with the most recent values in it. Make sure your table has an ID field, and put "1" in as the ID Step 2 - do an intersect (ArcToolbox, Analysis Tools, Overlay, Intersect) to determine where the conflicts lie. You probably ...


1

Make sure your filename has no spaces, i.e can't be called "Group Building ID Updation_addin". You're trying to call the class Pid. You can't do this. You need to create an instance of it, my_pid = Pid() then use my_pid.items inside updateid and self.items inside the Pid class.


0

It looks like you need to remove the shortcut keys. http://desktop.arcgis.com/en/arcmap/10.3/guide-books/customizing-the-ui/removing-a-shortcut-key.htm


0

This should do the trick: Con("raster1" == 0,0, ("raster1" + "raster2"))


3

You could use describe and then get the properties from the feature class Also if this help ListFeatureClasses also allows for a "feature_type" so if you really only want certain types you could provide a value for this parameter (more info). import arcpy arcpy.env.workspace = r"C:\ArcGIS\Data" fcList = arcpy.ListFeatureClasses("") for fc in fcList: ...


1

You can use slicing along with string formatting to accomplish this: new_string = '{}-{}-{}'.format(old_string[:5], old_string[5:7], old_string[7:]) Explanation of the 3 slices: The first 5 elements of the sequence (index 0-4) 2 elements, index 5 & 6 All remaining elements (index 7-end) This page gives a decent explanation on slicing strings


3

Try Pivot Table: Creates a table from the input table by reducing redundancy in records and flattening one-to-many relationships. If you also have geometries, dissolve or do whatever you want with them first then join the pivot table.


1

edit: After contacting NSIDC they referred me to this page - the key point here is that you must create an entirely new .hdr file, rather than simply appending those lines to the .txt 'header' that comes in the tarball. I found a work around. For each product there is a .dat file and .txt header file. The begging of each header file looks like this: ...


3

Add a try/except block around the call to the desc.FIDSet property. It's likely that there are several layer types that do not support that method (group layer, raster layer, etc.). I'm not sure where the stdout is logged to for addins, but you seem to be getting a traceback so this should at least help you identify what layer is failing to report FIDSet. ...


1

As commented by @Hornbydd: You can set the environment setting output workspace at the model level and any tools that honour that setting will pick it up unless you have overridden it at the tool level.


2

This is unrelated to you using ModelBuilder. As per the Help page on Warning: Event layer not editable: Event layers that are based on tables without ObjectID fields cannot be edited in ArcGIS. Solution: Export the event layer to a new feature class or use an editable table for the data source of the event layer.


0

ArcToolbox -> Analysis Tools -> Extract -> Split You can add this tool to a model or run it directly from ArcToolbox. It splits an existing feature class using a Polygon feature class to spatially define the groups to create. The groups will be created in a target dataset and given a name based on a selected attribute of the dividing polygon feature class....


1

In ArcGIS a feature_class name MUST be unique within a GDB. ie: if Dataset_AA contains Feature_Class_AA then Feature_Class_AA cannot exist anywhere else in the same GDB regardless of whether it is in a Dataset or not. take this schema for example: in this map: and this script: import arcpy arcpy.env.overwriteOutput = True feature_class = r'C:\P2P\...


0

Try using a feature class in the database as your "in_table" parameter, which is currently set to 'ffff'. I assume you want to update the 'Boundaries' feature class, and you do not need to set the env.workspace. Code should look something like this if you want to remove rows from the Boundaries feature class in your DMP_GeoDB_EXP.mdb database: import ...


1

Use double-quote mark " instead of single-quote ' around your text, and put the colon : inside the quote. Also you're missing an ampersand & between "Name:" and [name] "Name:" & [name] & "_" & [OBJECTID] Single-quote marks in Visual Basic (which VBScript is derived from) signifies a comment, so the parser ignores all text after the single-...


1

Try this in a Label Expression for your grid (after removing comments) ... you will have to check 'Advanced' and make sure the Parser is set to Python. The expression will render the PageName as provided by the Grid Index Tool as well as a Second Line with the preferred Excel-style 'ABC....ZZ' columns and '123...' rows import numpy def FindLabel ( [PageName]...


1

There is a pivot table tool in ArcMap like there is in Excel. Maybe that would do it?


1

You need to obtain other map layers which contain the data that you seek to extract. A good place to start would be to google something like ' "myarea" shapefiles ' where myarea is the place you are looking at (i.e. Germany shapefiles, Alaska shapefiles, Madagascar Shapefiles, etc..) Once you find a data repository that has some open source layers, you can ...


1

Create a new attribute in the attribute-table of your shapefile with field calculator - someting like field-name: origin and fill all rows in this field with something like 'shapefile'. Then do as you did: spatially join the layer with OSM. In the resulting combined layer, select all entries where the 'origin' field is empty and delete these objects.


3

You actually have two questions and answers here. The input coordinate system uses a conformal map projection, transverse Mercator / Gauss-Krüger. Conformal projections maintain local shapes and angles, not areas. It's using DHDN as the earth model. That's an older system that is definitely offset compared to a more recent geographic coordinate reference ...


1

Instead of: # create tableview cList = arcpy.MakeTableView_management("CensusTract", "cList", WC) # add tableview to dataframe mxd = arcpy.mapping.MapDocument(r"C:\TableView.mxd") df = arcpy.mapping.ListDataFrames(mxd)[0] arcpy.mapping.AddTableView(df, cList) try this: # create tableview tblView = arcpy.mapping.TableView("CensusTract") # add tableview ...


1

It seems that you cannot concatenate the two arrays because of two reasons: dtype for FEATURE is different (<U50 vs. <U10). The fourth field name is different (LENGTH_M4 vs. Shape_Length) You said you wanted to eventually prepare some pivot table using pandas so here is one approach that creates a DataFrame from each array, renames the columns of the ...


1

For a beginner, there are three important concepts to accomplish this: How to use the codeblock part of the Field Calculator to write and call a function How to test for null values How to return the first or last four characters of a string I will explain each of these concepts below. Item 1: You need to check "Python" and "Show Codeblock", then ...


Top 50 recent answers are included