Tag Info

Hot answers tagged

7

Pixel depth begets pixel depth. If you are using digital numbers as your input to the NDVI expression then the result will be integer. You will need to explicitly coerce to float in the raster algebra expression. Float("nir" - "red") / Float("nir" + "red")


5

Assuming you have a reference to the feature class pFC: ERSI.ArcGIS.Geometry.ISpatialReference pSP = ((ESRI.ArcGIS.GeoDatabase.IGeoDataset)pFC).SpatialReference; coord=pSP.FactoryCode coord now contains the code for the coordinate system. Note that not all projected coordinate systems are defined in esriSRProjCSType, there are more constants ...


5

Try unchecking the 'Add results of geoprocessing operations to the display' in the Geoprocessing Options in ArcMap. You can also access this option via the addOutputsToMap property of the env class: just add arcpy.env.addOutputsToMap = 0 in the beginning of your script.


4

Based on the conversation on the comments, ArcGIS online is making a guess at the coordinate system, while ArcMap is not. When it encounters an unknown coordinate system, ArcGIS Online appears to automatically assume WGS 1984. ArcGIS for Desktop treats undefined coordinate systems differently and does not make assumptions about the data's actual coordinate ...


4

The reason you cannot edit these layers is because it is not a file. It is a map service. What you are seeing is a web service. A web service is data that is hosted on a server elsewhere, that is not your computer. Your computer is going out and getting the data live from OLIVER when you look at it in ArcMap. In this case the data you want to edit is ...


4

You can access this through ILayerGeneralProperties "LayerDescription" property: Dim pLayerFile As ILayerFile Set pLayerFile = New LayerFile pLayerFile.Open ("C:\Tmp\Robert.lyr") Dim pLayer As ILayer Set pLayer = pLayerFile.Layer Dim pLayerGenProp As ILayerGeneralProperties Set pLayerGenProp = pLayer MsgBox pLayerGenProp.LayerDescription Code courtesy ...


4

First select "Open in ArcGIS Desktop": Once open on your desktop select the layer you want to export: Once you have exported the data open its properties and choose to import symbology from the layer you just exported: You should now have the layer symbolized as it was in the web map, if you already have the data saved locally you can skip step two and ...


3

Try using the Calculate Adjacent Fields, it will do this for 8 directions (NW, NE, SW, SE in addition to N, S, E and W). 8 fields are added with the neighbouring polyon in each direction. But there will be only one adjacent polygon for each direction, there is no grouping of the neighbours. If you want one single field concatenating the neighbouring ...


3

I can't explain why Clip is failing when you pass in the geometry. It happens for me as well. I can offer this workaround, though. Persist that geometry out to in_memory (or to disk), then clip with it. with arcpy.da.SearchCursor(splitFC, [splitField,"SHAPE@"]) as cursor: for row in cursor: name = row[0] geom = row[1] ...


3

It's used to eliminate any whitespace you may have around your layout in the output file. For example, I have some MXDs set up to print on a specific paper size with specific margins, so that the maps I print can be 3-hole punched or bound without the holes affecting the map window. But sometimes I don't care about that and just want everything to fill the ...


3

Shapefiles, which use the older dBase specs, do not support null values. If you must maintain null values and you have to keep the file format to shapefile, you'll need to use a representative or 'nodata' value for it. This can be any value you wouldn't normally encounter or expect to encounter in the data, or that even falls within valid data's range, such ...


3

Check out Creating Data Driven Pages, you can cycle through your polygons and have a map of each.


2

Here's how you can get Shape.area to display acres if it's in another unit. In ArcMap, go to the layer properties and the Fields tab. Under "Appearance", click "Number Format". Click the little button with the ellipses that is now displayed. Or right-click a field name in the table view, go to Properties, and click the little ellipses button next to ...


2

SOLUTION: Look to the lower left of your computer's Taskbar, you should see a small globe icon. Right-click & "Test Connection Now". You will connect to ArcGIS Online and the ability to add Basemaps is restored. The unfortunate greyness is from not being auto-connected to ArcGIS Online. In the past just being online was good enough to pull a ...


2

Your question title differs from you question body! You can save geoprocessing results with the mxd file.Older geoprocessing can be accessed from Arcmap Main Menu. (Geoprocessing > Results). In there You can see all the pre processed geoprocessings!


2

I think you can use the addOutputsToMap (=False) property from the env class in arcpy. Further details here: http://resources.arcgis.com/en/help/main/10.2/index.html#//018z0000004s000000


2

It is really quite straightforward to obtain a Pearson's correlation coefficient. Given a population assumption: xBar = mean(x) yBar = mean(y) xyBar = mean( (x * y) ) covariance = xyBar - xBar * yBar correlation = covariance / ( sd(x) * sd(y) ) Unless your points represent a true sample (e.g., field data), there is no need to subsample. This equation ...


2

I'm getting the same error in my Arc 10.2 installation. I've encountered issues in the past when using geometry objects with geoprocessing tools, as you're doing with the geom object from your cursor and the Clip tool. It's just ironic since this is almost exactly the example in the Esri help page. One solution is to avoid using geometry objects by exporting ...


2

Make one after you run the tool using the Build Raster VAT tool. It must be integer data.


2

Personally I would avoid the batch tool approach. Create a sub-model and cycle through the datasets using an iterator deleting the fields as necessary.


2

If Shapefile you can only delete (single delete) one feature set. Or use Iterate with Feature Datasets (Geodatabase) Delete Fields http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//00170000004n000000


2

This is actually an exceedingly complex problem and not one that you're likely going to be able to solve using conventional ArcGIS tools. To do this, you'll need to develop for each depression in your landscape the relation between depth and volume, i.e. the depth vs volume curve, which will be uniquely defined for each depression based on it's form. To ...


2

So you want to convert all values to the same constant value and NoData should remain NoData. Instead of Reclassify, use the Con tool with your input raster as 'Input conditional raster', and the constant value as 'Input true raster or constant value'. E.g.: import arcpy cst = 5 # your constant value outCon = Con(r"C:\data\intput.tif", ...


2

If you happen to have all the featureclasses you want to convert in a map document, you could just run the Consolidate Map tool on that MXD. Make sure to check the "convert data to file geodatabase option". Inside the output folder will be one or more fgdbs (depending on how many source pgdbs held the original features). If you don't have an MXD with all ...


2

modulo is quite convenient for this. you can go to the properties of your layer, definition queries, and set MOD("FID"+4)%8=0 if you want to create a subset, you can also use this to select by attribute and export the layer in a new layer, but it is not necessary. As a remark, your display should go faster with a file geodatabase. Also, shapefile ...


2

This can be achieved in several steps. Run a Spatial Join for your buffer polygons and road network layers (right-click the buffer polygons layer in the TOC and choose Join and Relates > Join). You will get an output polygon feature class which contains information on how many road features were located (even partially) within the buffered polygons. ...


1

NAD1983 is a geographic coordinate system. There are a few different ways you could go about aligning these data, but I'll give an example that I think is simple and clean. (1) Add both of your CSV tables to ArcMap and plot the points. Make sure you plot them using the correct geographic coordinate system - File1(NAD1927) and File2(NAD1983). Right click the ...


1

Not sure by your question if you want the map spatial reference or a layer. For a map you may use the IMap.SpatialReference Property.


1

You would do something like this: dataset = "c:/data/landbase.gdb/Wetlands" spatial_ref = arcpy.Describe(dataset).spatialReference as per the ESRI help page here


1

Add the new values with the Add Values button, not the Add ALL Values button. The add ALL values button will override the existing symbology and re-add all unique values whereas the Add Values button allows you to preserve the existing symbology and add new unique values not present in the Symbol list. EDIT: Also, confirm that after importing symbology ...



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