New answers tagged

2

As @ahmadhanb said in a comment, you need to replace the hyphen - with an underscore _ for the shapefile. # Get shapefile name and replace hyphen with underscore shpfile = os.path.splitext(csvfile)[0].replace('-','_') arcpy.CopyFeatures_management(outlayer,shpfile) In your updated question you have re-added your code which has an ...


0

Your code appears to be looping through all the *.csv files in the D:\SWAT-WEATHER-DATA folder, which you could confirm by including some print statements. Use print statements any where you need to be certain that variables are set to what you think they are. Instead of: csvlist = arcpy.ListFiles("*.csv") for csvfile in csvlist: outlayer = "...


0

We resolved this issue by killing the locks in SDE_state_locks table. Restarting the sdeArc service on the server killed 7/10 of the locks. The remaining 3 had the SDE_state_locks.direct_connection set to Y, the other 7 were N. I don't know what that means. So then I dropped all the tempdb tables associated to these 3 remaining locks, restarted the sdeArc ...


0

I know this question is old, but I have just uploaded a Matlab toolbox that will compute width from either 1) input channel mask or 2) input banklines (your case). It has a number of other tools that might be helpful to you; check it out here. You will probably want to define a centerline (for parameterization of your along-stream variables i.e. width). If ...


5

The Labeling Toolbar has a Pause Labeling button The Pause Labeling button will stop labels from displaying until you're ready for them to draw. Pause Labeling - Suspends drawing of labels See A quick tour of the Labeling toolbar for more info. To interrupt the labels while they are drawing, just hit the Esc key.


0

Function FindLabel ( [PIPE_MATL], [PIPE_DIA] ) ' this just pulls first digit from PIPE_DIA string 2", 3" & converts to Double type - you may have to play around with... If CDbl( Mid([PIPE_DIA], 1, Len([PIPE_DIA])-1)) > 2 then FindLabel = [PIPE_MATL] else FindLabel = "" end if End Function Adding unit decorations to a data ...


0

I'm not really good with VB, so I'll offer a Python attempt. You would need to change from the Visual Basic parser to the Python parser and give something like this a try: def FindLabel ( [PIPE_MATL], [PIPE_DIA] ): # assign pipe diameter string to S S = [PIPE_DIA] # trim the double-quote character from the end of the diam string/chg to float variable ...


0

I think it must be near your 'if ( [PIPE_INTERNAL_DIAMETER] > 2") then' line. Your wanting to perform a logical mathematical operation there and the double quote after the 2" is probably getting in the way - getting interpreted as a string. if PIPE_INTERNAL_DIAMETER is an integer field then you need to do something like: Function FindLabel ( [PIPE_MATL], ...


0

Another option would be the Data>Load option: Create geodatabase and import target shp (to feature class (fc)) In Catalog, right click on target fc and select Load>Load Data This option will allow you to manually define the field mapping for those field names that do not match between the to-be-merged shp and the target fc. Once loaded, you may right ...


2

Unfortunately ArcMap doesn't work the way you describe. To create points using X/Y values you probably have three options: Create another table in your File Geodatabase (including the XY column) and populate that table with the records you want to add, then you can use the Add from X/Y function to create a new events layer. This could also be done from ...


3

I do not know of a way to do so directly. If you only a few points, enter to editor, start editing, click "Create Features", select point, then right click on the map and select "Absolute XY". You can then input the coordinates, hit enter, and it will create the point location. You can then enter the table and input other attributes. If you have a lot ...


0

You can also use the Near Geoprocessing Tool to find only the nearest point and not the 2nd or 3rd nearest point.


1

Here's a very simple approach that uses numpy and will handle fields with null values (if you don't want to, then change null_value to any other number): import arcpy fc = "<my fc>" # Get all numeric fields that aren't required. fields = [f.name for f in arcpy.Describe(fc).fields if f.type.upper() in ['DOUBLE', 'INTEGER', 'SINGLE', '...


1

Model builder does not have the functionality you seek, you will need to do this using python. Below is the code that will do this, obviously you need to edit myTable and the parameter "SmallInteger" to suit your needs import arcpy import array myTable = r"C:\Scratch\fGDB_Scratch.gdb\tblTest" # Get list of fields fieldList = [f.name for f in arcpy....


1

For what it's worth, I've not found a method of creating a GeoTransformation using nothing but the information in a Map, so I've not been able to get ProjectEx() to work. Using Project(), on the other hand, is simple: double x; double y; var success = this.projectLonLat(this.axMapControl1.SpatialReference, -84.3880, 33.7490, out x, out y); if (success)...


0

It looks like your X (Longitude) is coming over as an integer, thus ignoring all the decimals while the Y is coming in correct. When teaching many students using excel would hit a space in a cell making the field come over into ArcMap as a text, preventing you from even being able to plot the points. The CSV option gets around this by stripping away the ...


1

In a web map you would be getting back web Mercator coordinates (Meters) not geographic Lat/Longs. In ArcGIS Desktop you would be getting back the projection of the data frame. I would change the map projection to 4326 (WGS-84) and then try it, it should the return Lat/Long decimal degrees. If this works then your issue is solved by using some coordinate ...


2

The comment above is incorrect. For work relating to environmental statements - ie for a windfarm OFFSETA needs to be the tip height of the turbine and OFFSETB is the height of the observer (general input of 2m). This is because you want to know if you were standing anywhere within a given radius of the wind farm would you see them. Hence you want to know ...


2

As commented by @MichaelMilesStimson: I've always found in a right pain to edit inside a geometric network. In order to re-model connectivity is necessary to break, move and then reconnect. There are also times when you'd like to move a line over another without breaking it. Usually I would edit without the benefit of a topology or network and ...


1

I am not sure what are you going to extract from the following formula because it is strange. The formula says multiply the elevation of the DEM by 1000 OR if the DEM values are more than or equal to 2m it will output 1 where the condition is met, and 0 if the condition is not met (thanks to Luke for his clarification), which does not make sense. But the ...


1

You need to add another data frame to your layout. In that new data frame you copy all the layers you want to display in your inset. The easiest way to do this is to just drag and drop from your main data frame into the new one. This will copy them to the new data frame. Insert Data Frame Copy layers to new Data Frame Once you have your new data ...


0

I'll try to expand PolyGeo's answer in order for you to understand more easily: The script lines arcpy.GetParameterAsText() show that these code lines are normally run similarly to a tool from the ArcGIS toolbox. The script requires an "interface" where you enter the required parameters. You could substitute these lines with a path to your data, as in: ...


1

This script includes the following lines: allLayers = arcpy.GetParameterAsText(0) # Must be a multivalue in script tool params lyrList = allLayers.split(";") PNGPath = arcpy.GetParameterAsText(1) The arcpy.GetParameterAsText() functions are asking for two parameters from a tool dialog that you need to configure separately. They indicate that the script ...


0

I'll go out on a limb here and link this page: ESRI FAQ Question Why does the data bit depth increase when a raster is projected, rotated, or >clipped? Answer Pixel depth is increased to provide the space to store 'nodata' values. This allows changes, such as a shift or a mask, to be applied to the raster. Pixels within the new raster's ...



Top 50 recent answers are included