Quantcast
Channel: Question and Answer » arcmap
Viewing all 248 articles
Browse latest View live

Cause of ERROR 000539: Error running expression?

$
0
0

The following errors in ArcMap are preventing me from moving forward:

1) In Raster Calculator using “Aspect”: “%DEM_Aspect%” <= 90 or “%DEM_Aspect%” >= 270

ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File “”, line 1, in
File “”, line 5, in rcexec
ValueError: The truth value of a raster is ambiguous. Invalid use of raster with Boolean operator or function. Check the use of parentheses where applicable.

I’m using SRTM1N34W087V2, 11-FEB-00 (Void Filled) raster.

I’m attempting to use ArcMap to accomplish the same results done in the QGIS tutorial Lesson 3: Terrain Analysis.

The lesson is found here: http://manual.linfiniti.com/en/rasters/terrain_analysis.html

enter image description here

enter image description here


In ArcPy, How to call specific columns of attribute table?

$
0
0

I’m trying to figure out how to spline specific columns of a shapefile attribute table, but my question is intermediate to this– how do I select a range of columns, e.g. the 20th column to the right-most column, as fields to apply a for loop operation to? My first thought was to try numpy, but I’m open to ideas. For now I’d just like to either print the names of the desired columns or specify the columns to be iterated in the for loop line. Thanks!

import arcpy, numpy as np
from arcpy.sa import *

fieldList = arcpy.ListFields(r"C:UsersafullharDesktopLab6Data For Lab on habitat modelingLayersstart_data10_km_Points.shp")

for field in fieldList:
    print format(field.name[19,:])

How to add item to an existing selection layer

$
0
0

I have a selection layer of about 150 properties in ArcGIS ArcMap, and I want to add one more building to it (see image, area outlined in red circle). The problem is that I missed this building in particular when I clicked to add all the buildings one-by-one originally.

When I click on it using the Selection Interactive tool to add it to the selection, I can’t seem to make it a part of the existing selection layer called “LargeBuilding selection” (nor can I change its color to green). I’m a relative newbie to ArcGIS, maybe I am missing something. Any help would be much appreciated.

in red circle is what I want to add to an existing layer

ArcMap creates unnecessary file types when saving shape file (.cpg .prj, lock, etc.)

$
0
0

When saving shape files, geocoding results or even exporting data in ArcMap, many different files are created. Most of the time when I save a shape file, I want only the shape file and not a .cpg, .prj, lock file, etc. Saving all these different data sets and layers in ArcMap soon creates an eruptive and cataclysmic explosion of numerous data files in my folders, making them cluttered and practically useless. IS there a way to tell ArcMap (desktop version) using either the UI or python code, to only save one file when saving shape files, dBase tables, etc.

How to mosaic to new raster for multiple DEM tiles?

$
0
0

I took some DEM files and turned them into raster .tif files, i then tried to Mosaic them together using the mosaic to new raster tool and i keep getting two problems consistently,

  1. there seems to be a miscalculation/discoloration in the top left corner and i cant figure out how to fix/adjust it, it doesn’t really impede me from using slope, aspect, etc. but it looks bad and this is for a university project.

  2. i am getting gaps in between some of the raster mosaic tiles (ie. not completely smooth so it looks bad) i tried a couple of the fixes i have found on here to patch them up using the raster calculator but none of them ended up working for me.

i am using arcmap 10.2.2 and the only thing ive done is added the dems, changed them to raster, projected their coordinate systems to match the data frame, and then mosaic to new raster.

Here is a picture of the multiple DEM files in full mosaic with errors.
thanks for looking at my post!

help!

Easy way to digitize DSM for feature extraction

$
0
0

I have a Digital Surface Model (DSM) that I would like to digitized to extract features (buildings, etc.) using ArcMap 10.1. I would like to know if there is an easy way to digitize the DSM or to process the DSM to make it easy to differentiate a building from other features.

enter image description here

ArcGIS Android export tile cache for higher levels (only level 9 in samples)

$
0
0

I need to cache a few tiles for the offline part of my application. Though in the samples provided for Android the following server link has been used for exporting local tile chache:

http://sampleserver6.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer

the sample itself can be found here:

https://developers.arcgis.com/android/sample-code/export-tile-cache/

Where only levels 1-9 are supported.
How can I download for higher levels?
Or, what is the ESRI server link to export higher level tile packages?

P.S. I have already tried other REST services

ArcGIS Raster Calculator wont work in main model

$
0
0

I’ve created a Submodel in ArcGIS, which stretches my rasterdata to new values.

The strange thing is, that the model works, if I run it itself – as soon as i implement it in the main model, I get this error message:

ERROR 000539: Error running expression: rcexec()
Traceback (most recent call last):
File “”, line 1, in
File “”, line 5, in rcexec
File “c:program files (x86)arcgisdesktop10.2arcpyarcpysaFunctions.py”, line 244, in Con
where_clause)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpysaUtils.py”, line 47, in swapper
result = wrapper(*args, **kwargs)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpysaFunctions.py”, line 238, in Wrapper
where_clause)
File “c:program files (x86)arcgisdesktop10.2arcpyarcpygeoprocessing_base.py”, line 498, in
return lambda *args: val(*gp_fixargs(args, True))
RuntimeError: ERROR 010240: Could not save raster dataset to C:UsersMattiasDocuments1_UNIDiplomarbeitGISDATAdata_outscratch_IV.gdbplus_ras with output format FGDBR.
Failed to execute (Raster Calculator).

In my opinion, there’s nothing wrong with my syntax – else it would not work in the submodel directly…

Anyway, my map algebra expression is:

Con(“%to_be_stretched%”,”%min_r_raster%”,Con(“%to_be_stretched%”,”%max_r_raster%”,(((“%to_be_stretched%” * 1.0) – “%min_in_raster%”) / (“%max_in_raster%” – “%min_in_raster%”)) * (“%max_r_raster%” – “%min_r_raster%”) + “%min_r_raster%”,”VALUE >= %max_in%”),”VALUE <= %min_in%”)


Debugging/logging ArcPy / Python code behind ArcMap function?

$
0
0

Considering I Can use the right click –> set datasource at an mxd file to change the datasource.

The following pictures describes how this can be done in arcmap.enter image description here.
How can I see the arcpy / python code behind that process? Is there any sort of logging or debuging of what arcmap is doing on the back ? I suppose it calls the same arcpy functions as sb would call to perform the same result?

Question 2// COuld I see in some way the code behind “Set Datasource Tool” of arcmap.? If I will do this I will have my problem resolved

Arcmap Combine tool output missing one field [closed]

$
0
0

I have sets of two rasters in Arcmap with identical extents and resolutions, but different values. I previously have used Combine in the Local toolset of Spatial Analyst to create a new raster with new values, but that retains the values of the two inputs as separate fields in the output. Now, only the value from the first listed raster is retained. What gives?

Problem with ArcMap Cut Polygons Tool

$
0
0

I’m attempting to use the Cut Polygons tool in the editor toolbar of ArcMap 10.2.2, and every time I cut a specific polygon it then deletes one of the halves. I’ve used this tool a handful of times, and have never seen this behavior before. I have no idea what’s causing it. As far as I can tell it’s the same as any other polygon I’ve cut.

Has anyone else experienced this problem or know how to remedy it?

Strange interpolation with natual-neighbor metod

$
0
0

I have base shape file and try to use different interpolation methods to get image like this:

raster

This layer is constructed using point to raster conversion.

Generally, interpolation methods as idw and so on works normal, but exactly natural neighbor does very strange thing:

nat neighbor res

Result is veeeeery long image. What can it be?

P.S. 180th meridian goes through my map, may it be reason?

Script for splitting of polygons and spatial join of lines to polygons

$
0
0

For the past couple of weeks I have been arduously creating flood depth rasters using flood zone polygons and base flood elevation survey lines.

img

The issue is that some of the zones do not have a base flood elevation assigned. So far, I’ve just been using the lines to split the polygons and roughly shifting the lines a small distance diagonally, all at once, to perform a spatial join to the polygons. The lines are shifted because they are of course being used to split the polygons and are overlapping the splits. I then manually go through null values that resulted from a bad spatial join and manually change those.

So far, this is what I have been doing and everyone is satisfied with the result. It has proven accurate. The polygons are then used to create a raster.

Is there an easier way to do this? Not necessarily looking for a script.

Merge or dissolve line features based on two or more attributes

$
0
0

I am working in Arcmap 10.2 and I would like to do the following according to the example table below, but I do not have a clue on how to do this. I am working in ModelBuilder. Is there a tool for this or another easy way to do this?

Lines

The attribute table shows line features, some attributes have the same number (attribute B) and the same material (attribute A) this means that they are the extent of each other like the figure below:

Line features

If attributes have the same number and material I would like to make one Object of these ones and I would like it to sum the shape lengths. So for example ObjectID 1 and 2 will become one Object from Wood (Attribute A) with number 13324 (Attribute B) and a Shape length of 8.997 + 0.012 = 9.009. In the figure red and blue parts will be one part.

Generate a series for each Survey_ID based on chainage sequence [closed]

$
0
0

I want to generate ascending series for each Survey_ID based on the chainage sequence. For example, the number of records in the first Survey_ID is 8 and its chainage starts with 23 and ends with 93. So in the Series field, the sequence is automatically generated from 1,2,3… to 8. Similarly, in the second Survey_ID, there are 10 records with the chainage starting at 10 and ending with 100 so the Series should be 1,2,3,…,10 following the chainage sequence.

Data

this is description of the attribute table that i had posted
enter image description here


Georeferencing of OMI Swath product in ArcGIS

$
0
0

I am using Aura OMI UVB Level 2 Data Product-OMUVB (V003) to monitor solar irradiance over Pakistan.

This is a swath product with He5 format so i have used panoply to open it.

I exported the required irradiance wavelength in csv. format.

While opening this data in ArcGIS, i come across the problem of georeferencing.

As this is a swath product i am unable to georeference by using control points.

Recalculating full extent of File Geodatabase feature class?

$
0
0

I have a featureclass in an Esri file geodatabase. When I edit the features using the editor in ArcMap, and I delete most of my features and keeping only the ones in the middle, the zoom to layer command doesn’t work as expected. Instead of zooming to the extent of the features remaining in the feature class, the extent will be the former one (containing all deleted features). When reviewing the extent values in the properties dialog for the feature class, I can clearly see the old values. So the edit session doesn’t seem to alter the full extent values.

Is there a way to recalculate these values?

I am pretty sure that this problem should occur to everyone editing features in ArcMap…

Distance unit between line and point shapefile

$
0
0

I have two files:

  1. A point shapefile containing latitudes and longitudes of points.
  2. A .kml file that I am converting to a line shapefile.

Objective: To find the minimum perpendicular distance of the points from the lines. Suppose we have four points p1, p2, p3, p4 and two lines l1, l2. For point p1, I have to find the distance of the closest line. Same for other points.

I joined the line shapefile on point shapefile. As a result, I get an extra field in the point shapefile. The extra field denotes the required minimum distance. The problem is that I do not know the unit of this distance. I am using NAD 1983 geographical coordinate system (GCS) whose angular unit is degrees.

I tried changing the GCS of both point and line shapefiles to a projection coordinate system with distance units as meters. However, this displaces the points far away from the lines (virtually not displaced at all) in ArcMap. Consequently I get the distances in thousands of miles, which is erroneous.

Please suggest a way out.

Semivariogram modeling in Arc Gis Geostatistical anaalyst

$
0
0

I want to know that what units of distance for lag size is used in geostatistical analyst 9.3.1 Arc Map.

I am not getting the same from software. Please reply, if anyone knows about it.

EPANet dll integration in ArcMap Addin not working?

$
0
0

I am unable to get EPANet dll function running from my ArcMap Addin (C#.NetAPI).

The same source for dll’s function calling is working in an independent console application but when I do the same calling from ArcMap Addin button click, it returns error 305 which means “Cannot open hydraulics file” .

But I do not understand why ArcMap calling causes to stop creating/accessing this file.

I also tried to run the same console executable in a different process (started from ArcMap Addin button even), but still no luck.

Do anyone of you have any clue regarding this matter?

Viewing all 248 articles
Browse latest View live