Tag Info

New answers tagged

2

Insert Cursor can trip up on several things: sequence size not matching row size incorrect type trying to update fields that are not in the table/feature class trying to update fields not defined in the cursor fields see examples below.


1

The merge tool does keep the metadata, but oddly enough only the metadata for the first input in the list of merge inputs. As mattytunks21 said, copying the XML file that is associated with the other layer files will save the metadata and then you can just copy and paste the xml contents from one into the other to have all your metadata.


0

To preserve the data you could export the xml files before you do the geoprocessing.


0

I prefer to use Feature Class to Feature Class, as you can use it to go back b/n both formats.


0

If I got your question right, in ArcMap, within Catalog window browse the gdb and then right click to Export to SHPs.


-1

If you want make a wind map in ArcGIS, you can check this post. http://en.acolita.com/how-to-create-a-wind-map-in-arcgis.html


2

You can accomplish this function with the Feature to Line (Data Management) geoprocessing tool which will split lines when they intersect each other: "Where input lines or polygon boundaries touch, cross, or overlap each other at locations other than their start and end vertices, they will be split at those intersections" [Desktop Help Feature to Line][1] ...


1

Using python you can get the directory of the code file you are executing. Therefore you can put sde connection file and your python code file in the same folder and share the folder with your friends (Per mr.adam suggestion) sde_connection_file = "XXX_YYY_PROD.sde" currentDir = os.path.dirname(os.path.realpath(__file__)) sdeConnFullPath = ...


0

Before using the Moasic Dataset, I did not have the confidence to perform them until yesterday and gave a try. Now I have play it around and now I had to figure it out... Not sure the workflow is but here is what I did: Create mosaic dataset add rasters build footprints build seamlines Remove the dataset from ArcMap Run build overviews on the dataset ...


1

Here's an idea, based on using Feature To Line. With ESRI, the tool is only available at the ArcInfo/Advanced license level, but with QGIS I'm sure you can find an version of it. So you could, as I often do, supplement your ArcView/Basic license workflow with free QGIS tools. Run Feature To Line to convert the lake features to lines (make sure you're ...


2

Use an iterator in your model, specifically the Iterate Feature Selection iterator, then use Copy Features to output each feature to it's own feature class. Your model will look something like this: The element called Value temporarily stores the name of the current feature in the iterator. I've also added a variable for a Folder called OutputFolder ...


2

This is imo a great question. If you would be interested in just finding the intersection between two polygons, you'd use the Intersect GP tool and then adding the area of the resultant features back to the wetlands. But you are interested not in intersection yet essentially in the edge, or a segment which polygons share. There is a very nice GP tool in ...


3

Split Layers by Attributes check out this python toolbox. Split Layer by Attributes, county being the attribute you want


1

The first step is to dissolve the districts into a single polygon. If you have an advanced license you can use Polygon to Line to extract the boundary as a line. If you don't have advanced then you can create a line feature class, open it in ArcMap as well as the dissolved polygon, start editing on the line features then copy and paste the polygon into the ...


0

ArcGIS Online, aka ArcGIS.com, will allow you to publish a map service from your ArcMap session. You can sign up for a free developer license at https://developers.arcgis.com/en/sign-up - if necessary you can then pay for further credits.


1

Yes, you can use an older book with a newer version of the software depending on how wide a gap there is. In the case of 10.1 and 10.3, you should be fine. Depending on your level of comfort in working with software in general and navigating help files, and depending on the changes made between versions, you may find it annoying or frustrating. I took a ...


5

I think that book should be fine for learning ArcGIS. The software hasn't changed dramatically between 10.1 and 10.3. For most changes between 10.1 and 10.3 you can check out the "What's New?" sections in the online help. What's new in 10.2 What's new in 10.2.1 What's new in 10.2.2 The help for 10.3 can be found here. One major new change that came ...


0

this was a bug in ArcGIS Server 10.1 SP1. identical queries will fail every other time. https://geonet.esri.com/thread/64835 you can intercept the request and modify it with a nonsense and unique parameter to work around the problem, but bumping to 10.2 (or better yet, 10.3) is a lot less trouble.


1

As it turns out this is caused by an "issue" in the env.settings. I used arcpy.ResetEnvironments() and arcpy.ClearEnvironment("workspace") before using the arcpy.arcpy.MakeRasterLayer_management and everything worked as expected. arcpy.ClearEnvironment("workspace") arcpy.ResetEnvironments() AddRasterMxd = ...


1

Your raster classification is incorrect. You need to change the symbology to either 'Unique Values' or 'Classified', doing this will enable your ArcScan toolbar. Right click layer > Layer properties > Symbology tab> "Unique Values" or "Classified" ***ArcScan tool bar WILL NOT enable with 'Streched' or 'Discrete Color' symbolization. ***ArcScan tool ...


-1

I was able to solve the problem using Spatial Analyst Tools > Generalization > Nibble Replaces cells of a raster corresponding to a mask with the values of the nearest neighbors.


0

From what I gather about your responses, it looks like you're trying to do things to the map before it is ready. You need to test whether the map has loaded its first layer before you can add your feature layers, etc. Here's how I would go about working with it. var map; function onMapLoad() { // when function called, do whatever you need to do to your ...


3

From TIGER: ftp://ftp2.census.gov/geo/tiger/TIGER2014/ZCTA5/ This is a shapefile of every ZIP code from the most recent update. You can spatial join your shapefile of points to the shapefile of ZIP polygons.


1

Start by checking if the value is None. If it is, replace the value with this if rowData[idx] is None: rowData[idx] = datetime.datetime(1970, 1, 1, 0, 0)


3

Building on @artwork21's excellent answer, the following is how you would accomplish the task with Python using an UpdateCursor. import arcpy # The input feature class fc = r'C:\temp\myfgdb.gdb\yourFC' # Add three new fields arcpy.AddField_management(fc, "TOWN", "TEXT") arcpy.AddField_management(fc, "ERF", "TEXT") arcpy.AddField_management(fc, "PORTION", ...


-1

var mymap; arcgisUtils.createMap(id,"map").then(function(response){ mymap = response.map;


13

If the length of the ID field values is always constant I would recommend using either Field Calculator or Calculate Fields tool with python slices. TOWN calculation: !ID![:8] ERF calculation !ID![8:16] PORTION calculation !ID![-5:]


1

Here is your answer: As you are trying to add a Cached Image Folder, you must use MakeImageServerLayer_management instead of MakeRasterLayer_management. Here is the simple snippet to do what you need. You can simply paste it into the python window and see the response. just change the path to your compact cache folder (Raster): import arcpy mxd = ...


1

You have commented "when i georef the shapefile" which makes me think your procedure is astray. Perhaps you are defining a Projected Coordinate System on a shapefile in a Geographic Coordinate System (which has lat/long values) i.e. using Define Projection when you need the Project tool. You should be georeferencing the CAD file not the shapefile. There ...


0

There is a bug called NIM082145 - In-memory raster layer is missing source information and tabs are not all correct. A .afr file is created instead of a .lyr file. This issue has been found in 10.1 and in fixed in 10.1 SP1. So, easy fix: upgrade to 10.2/3 or just install 10.1 SP1 from here.


2

ArcPad Checkout from python command line works in arcgis 10.1, but you need to add arcpad toolbox with arcpy.AddToolbox(). this is a working sample script, in this script i pass the path of the axf as first argument in commande line: import arcpy , sys arcpy.env.overwriteOutput = True arcpy.AddToolbox(r"C:\Program Files ...


1

There is a bug for this - NIM102547 - ArcPad tools fail to work in Python outside of ArcMap. It's been found in 10.2.1 but there's no reason why the behaviour should be different in previous versions. As an alternative, you can run your script as a script tool or from the Python window. Also, as @om_henners says, it's not a good idea to use combinations ...


0

This is a documented bug: NIM097138 - An extra white space appears between the legend items when the only show classes that are visible in the current map extent option is checked. It is not reproducible in 10.2.2, so the simplest solution is to upgrade ArcGIS, if you can. Alternate Solution according to the bug's description: Open the legend ...


2

The fist problem is it's not an add-in. public class PanDown : ICommand should read public class PanDown : ESRI.ArcGIS.Desktop.AddIns.Tool or public class PanDown : ESRI.ArcGIS.Desktop.AddIns.Button Have a good read of this and start again from scratch, ensuring that you select an add-in type for your project when you start in Visual Studio. There ...


3

You need to pass the returned value in a variable, not reference the column itself. Expression: result Codeblock: if [ColumnB] > 0 then result = [ColumnA] / [ColumnB] else result = 0 end if Here's how the two parts fit together in the field calculator - my data doesn't have the same field names, but you get the idea.


2

Simple method: Rename the file(s) to csv or asc to see the tables (you may need to edit each one and add a header line), create a feature class from XY table (or make XY event layer) then perform a Point to Raster (your cellsize is 15 metres), this will give you a DEM. With the DEM run GDAL_Contour or Esri contour: gdal_contour -i 10 ...


0

Hi Guys, I faced the same issue and I solved pretty much in the same way (hours lost finding out how to get rid of the $ as well!!). I used a wild card (Iterate Table > Make Var > from Par > Wildcard) to selct correct Exxcel sheets within the table. Sometimes it can be useful. Cheers, Marco


1

I always find it's easiest to first check if your value is not NULL before adding it to a table. For example, say you have a value to be added to your table in variable Value. A simple if statement will do the trick. if will return True if the variable contains a value and is not NULL Code: *processing* = Value if Value: *update table etc*


1

As geo_dd pointed out, the raster calculator tool (Spatial Analyst Tools > Map Algebra > Raster Calculation) should do the trick here you can find some examples of calculations


0

Here is what we are ending up doing: 1) Installed an SSL Certificate on our ArcGIS 10.x server, per ESRI online instructions. We have enabled both https/http access. 2) We have our network department opened port 6443 to the outside; we would have used IIS's port 443 but the Certificate issued to us was not .pfx format. 3) We will be serving secure content ...


3

This is python, and in your examples you're using the ampersand (&) to concatenate your string. You don't do this in the unformatted example that works. Use the plus sign - + - instead.Ampersand is used in VBScript.


3

@dvdhns suggestions, are what you should do. However you don't need to write a xslt for html conversion because Esri has done this for your before. see this code snippet: import arcpy from arcpy import env env.workspace = "C:/data" #set local variables dir = arcpy.GetInstallInfo("desktop")["InstallDir"] xslt = dir + "Metadata/Stylesheets/ArcGIS.xsl" ...


3

No. You cannot directly export ESRI Feature Class metadata into PDF files. This is how I would attempt to do it using python, rather than ArcObjects: Use arcpy to export the metadata to xml files. Use python and xslt (xml style sheets) to format the xml files into something human readable, my recommendation is a simply formated txt or html file. Use a ...


7

A good starting point to understanding this is a help page entitled Understanding the progress dialog box in script tools: There are four functions you use to control the progress dialog box and its progressor. This certainly works for foreground Geoprocessing and I assume that it will have a similar effect on the Background Geoprocessing dialog.


2

Here's a script I just happened to have lying around, it merges all lines, points and polygons from a database into a new database feature class; there's no field mapping, at this time we just wanted to see all the geometries together without having to load over 1k layers... A feature class (shapefile or database) can only store one geometry type so it's ...


2

It's definitely a major pain when ArcMap tries to be, um, helpful even when you really don't want it to be. One workaround I've found is to create a new temporary dataset, and add a few points with the minimum and maximum values that you know you'll need in the output - just be sure to cover the whole range. Create your symbology based on this fake dataset ...


1

It is about transferring points coordinates to table. You might use this process: Add X and Y fields to points' table Join above to TABLE using common field. Calculate similar field e.g. [XN]=Points!X Export joined table to new one. Create XY event table from output at step 4. Based on your Q you'll end up with duplicate points in some cases.


3

Append may be what you are looking for. You should be able to select the polygon you want to move from the yellow layer and append it to the existing red layer.


-1

you should open the data in newer version then exported and save it to old version. so then you can open the data in your 9.3.


1

A layer is just a view of data - not the data itself. When you create a layer from a selection, you're just making another view of the same data. So if you edit the data, then both views are going to change. If you want two independent features, you need to actually copy the data - either via copy in an edit session which just duplicates the feature in that ...



Top 50 recent answers are included