Tag Info

New answers tagged

1

You could write a script with arcpy to iterate through the feature classes and tables in your SDE workspace by setting the workspace environment to the sde instance and using the ListDatasets, ListFeatureClasses and ListTables functions. You would use the ListFields function with each feature class and table to get its field list, and then iterate the ...


0

I doubt that this will end up being "the easiest" way to do it, but you can certainly achieve this using Python: points = [] arcpy.MakeFeatureLayer_management("line_file", "selected_lines") # change "line_file" with arcpy.da.SearchCursor("selected_lines", ("SHAPE@")) as cursor: for row in cursor: points.append(row[0].positionAlongLine(10)) ...


1

Here are couple of Google searches that explain what it is: http://www.functionx.com/win32/Lesson08.htm http://msdn.microsoft.com/en-us/library/aa979055%28v=vs.71%29.aspx#feedback From what I understand (and could be wrong) its just a number that is used to indicate what the parent window is. So I don't think you can use it to control the visibility of ...


0

Create equally spaced points along your line, using the method of your choice (I use ET GeoWizards Create Station Points tool). Use Extract Values to Points tool (requires Spatial Analyst, and I assume you have an elevation raster) to record the elevation values.


-2

I dont know if ArcGIS can do this, but I am sure Civil 3d can do it easily


0

After input from radouxju, Martin and Hornbydd and some trial and error I found the Python code below to be working. Problem was mainly the os.path.split(image)[-1][:-5] which was replaced with os.path.basename(image).rstrip(os.path.splitext(image)[1]) import arcpy, glob, os from arcpy import sa #spatial analyst liste_a = glob.glob("d:\\folderA\\*.tif") ...


0

import arcpy, glob, os from arcpy import sa #spatial analyst liste_a = glob.glob("D:\\folderA\\*.tif") #get a list of tif (or other extension) for image in liste_a: #loop on images print image # just checking... image_a = Raster(image) #create raster object based on the raster name image_b = Raster("D:\\folderB\\" + ...


0

Here is a simple workaround, (but of course it would be cleaner to do it with an insertcursor in Python). 1) Add the X andd Y coordinates for your points (from field calculator, or with the tool in Data management > features) 2) join the table of your point on your excel file 3) export the excel file to another table, and add it as point using "Make XY ...


4

Not wishing to detract from PolyGeo's excellent answer I wanted to know what other words can't be used for creating feature classes. To this end I wrote a simple script in python to try every alphanumeric combination and found some interesting results: Names cannot start with a number Dashes are not allowed At the risk of putting the 'horse before the ...


3

The cause of this error appears to be the use of the word "AND" in the name of the in_memory feature class that is trying to be created. The name "AND" may be undesirable, but can arise when the names are being constructed from field values. For example, "AND" is the abbreviation for the country "Andorra" in at least one of the Natural Earth datasets. To ...


0

In the GP tool dialog it's the last parameter at the bottom of the dialog. Perhaps you need to scroll down or enlarge the dialog box to see it? Or perhaps the Enterprise interface is different, but I wouldn't think so.


1

For processing XML files, I generaly use now xmltodict, a pure Python module, much easier. It is easy to install (even in ArcPy, one file). It converts XML files to Python dictionaries (standard OrderedDict, dictionary that remembers the order that keys were inserted): you process the XML tree with only lists and dictionaries Also, urllib is deprecated, ...


1

Part of what you're running into is a screen resolution issue. Points can only be displayed down to a certain size relative to everything else, and sometimes values will fall between two distinguishable sizes and get rounded one way or the other on the screen. There are only so many individual pixels on your screen with which to draw everything. This effect ...


1

As far as I know it's not possible to solve for alternate routes without some additional input or change to the analysis. In a network, given a particular impedance, there is only one shortest route between two points. As soon as you start looking for alternates without any additional input you've essentially removed the 'shortest' constraint and are back to ...


0

It is close to 0 percent likely this photo is in DD. 1) Define the spatial reference of the background image in ArcCatalog. 2) Ensure it aligns with some other dataset (say from arcgis online) in ArcMAP. 3) Create a blank polygon in ArcCatalog. 4) Define the projection of 3 in ArcCatalog. 5) Start a blank mxd in ArcMap. 6) Add (1) the image with the ...


4

Georeferencing is a process where you define which coordinates your image covers. It'll write in the coordinate system of the data frame. Therefore, it does not specify which coordinate system you use, only which coordinates it covers. The tool Define projection (under Data Management --> Projections and transformations) can be used on both vector and ...


3

Yes, you want the Spatial Join tool. The difference between this and just right-clicking and joining your layer is that there is an option to select the Join Operation. If you change this to Join-One-To-Many your line feature will be repeated for every point it intersects: JOIN_ONE_TO_MANY —If multiple join features are found that have the same ...


2

perhaps something like dim x if InStr([ExternalRe],"ASP")>0 then x = 1 end if if InStr([ExternalRe],"Q")>0 then x = 1 else x = 0 end if Letting = x vbscript seems to be picky about quotes around strings too - single quotes can give an error. EDIT: depending on how you actually want to calculate the Letting field, you may want your ...


1

If your Have field is of type date and you Needed field type is string, you can do it with the following statement in the field calculator of Arcmap: !DateFieldName!.split( )[1]


-2

Have you tried .replace(X,Y) code in python? -replace one with another in the string


2

As mentioned in comments, I am not aware of any out-of-the-box way for ArcMap to symbolize layers using RGB values stored in an attribute table, or using RGB values in Excel joined onto an attribute table. However, there is an existing ArcGIS Idea to Set symbol color from RGB values in attribute table so I recommend that you add your vote to that. Note ...


0

You want the Zonal Statistics tool is what you want. Your classed raster will be your zones and your 'different' raster will be the input for the statistics. It will calculate the average value of the cells from each zone and create a new raster that looks like your classed raster but has the average values instead of class values in the data. Note this ...


3

You can use the Con (Spatial Analyst) tool to calculate the area of specified elevation values. In this example, I stated that I wanted all elevation values of a floating point DEM > 400 = 1, else = 0. The black and yellow image is the result (Figure 1). Then, simply open the attribute table and look at the count next to the Value = 1 row (Figure 2). ...


1

If your elevation raster is integer, Build Raster Attribute Table. Then, select the rows in the table of interest, and look at the Statistics for the Count field (right-click 'Count' -> Statistics). The SUM value is the number of pixels selected. Multiply this value by the area of one pixel (raster layer properties -> Source tab -> cell size). Repeat with no ...


2

I believe you seek the Clip tool.


1

If I had posted the entire ENVI header file, the solution would likely have been clear to most. Turns out I missed the fact that the header file had no georeferencing information. The key line in the ENVI header file that allows ArcGIS to correctly georeference the image file is: map info = {Geographic Lat/Lon, 1.0000, 1.0000, -139.00000000, 56.00000000, ...


3

The short answer is yes, you can make points smaller than 1.0. There could be a few different things going on: (1) Are you in map view or layout view? The map data view may be scaling your points so that they appear the same size as you zoom in. (2) It is very difficult to eyeball the difference between 1.0 and 0.5, for example. On my screen they look the ...


1

The size they are represented is also linked to how big your map is when you are exporting it (assuming you are exporting it) so yes a point can be displayed at less than size 1 but it depnds on what you want to do next. However if you have a lot of points and reducing the size doesn't help an alternative that might be worth looking into is the Point ...


0

I cannot imagine this being an out-of-box option within the application. In 10.2, you may assign shortcut to turn on/off all layers in the TOC, but not specific to certain layer names. Most likely you will have to develop either VBA or .net function using arcobjects that calls a command on keyboard shortcut (to turn x layer on or off). Assign Shortcut Key ...


1

You need to intersect your Thiessen polygons and your ward polygons. Import your CAD file into ArcGIS Make sure that the extent of your Theissen polygons equals or exceeds the total extent of your wards. If it doesn't you can remake the Thiessen polygons with the exact extent by using Tool Environment Settings > Extent in the Create Thiessen Polygons tool ...


0

Connecting to a linux database is absolutely no different from connecting to a database on Windows, or any other platform for that matter. The interconnect protocol (SQL*net) is the same everywhere. The platforms for the client and server play no role here, neither does the fact that one is 32-bit and the other is 64-bit. Also the versions of the Oracle ...


2

To remove polygons that don't have an intersection with lines: Open ArcMap and add the polygons and lines to the table of contents. Locate the Select by Locations dialog and select the ones that do intersect. Switch the selection by going to the selection in the table of contents Right click on the layer name and select 'switch selection'. Start ...


1

Python lacks the isNumeric condition for the string. The best I could find is to use try/except on the int of the value (the crash 'n burn approach): def FindLabel ( [STREETNAME] ): nVal = "" # set to an empty string just in case there's no numbers for part in [STREETNAME].split(): # breaks the string down to words and then steps over them as a ...


1

In ArcGis you can use point sampling using the spatial analyst tool Sample which creates a table showing the values for each point. Add the fields required, attribute join the table from the sample and use field calculator to copy the value from the joined data. To do this in QGIS (if you don't have the spatial analyst license) you can use the point ...


0

There are several environment settings that affect raster operations. In this instance you should be setting: Output Extent - to ensure that the new raster will be of the same size. Snap Raster - to the raster to match with, this ensures the cells line up exactly. Cell Size - to make the output raster the same cell size as the one you're matching to. All ...


3

To determine whether an arcpy SpatialReference object is projected or geographic use the property type: geoSR = arcpy.SpatialReference(4326) print geoSR.type Geographic projSR = arcpy.SpatialReference(28356) print projSR.type Projected


1

Based on the comments and with help from ChrisW it was determined that the points were unavailable to participate in the Network because they were of geometry type multipoint (multiple points for a single row): A Multipoint geometry represents an unordered collection of single locations in space, and can be used to represent geographical features ...


0

I think the most appropriate way to average slope is using trend. Clip LiDAR using individual meshblock geometry Convert clipped raster to points Interpolate point using TREND with polynomial order =1, i.e. linear. Specify output RMS file, say cba.txt RMS file contains coefficients (C,B,A) for the flat sloped surface Z=C+BX+AY The slope of above surface = ...


4

It has to do with the " representing inches, but interpreted as a quotation surrounding a string. The clue is in the records it imported. It did not import the records with ID numbers 252, 299, 301 and 306. Why, because these records are enclosed between quotation marks on the end of the line above them and at or toward the end of them. Line 249 is the ...


1

You can do this in the Field Calculator, using an expression like: calc(!SHAPE!) and Codeblock: def calc(shape): return arcpy.PointGeometry(shape.firstPoint).distanceTo(arcpy.PointGeometry(shape.lastPoint)) Distance > 0 means not closed. Granted, this will not zoom to the offending vertices.


1

I think it has to do with the '-' hyphen in Field5 . For ArcGIS to work with multiple data types, certain characters in field or table names are not supported. These characters include spaces, hyphens, such as in the term 'x-coord', brackets, and other special characters. These limits are imposed so that ArcGIS is able to function with the maximum amount of ...


0

As Maksim suggests, using a Topology with the no dangles rule would be one approach. Another would be using the COGO Traverse tool, although this would be a bit slow and requires more than Basic licensing. You can load a traverse from a sketch, and then once it's loaded there's a closure button that will tell you how far off it is. Looking at the sketch ...


2

Take a look at this tool Feature Class To Feature Class (Conversion), the help section contains sample scripts if you want to go the arcpy path. Right clicking on the tool reveals a "batch" option, you can set the names how you want.


0

With help I have found my solution, though the reasoning behind it is a bit blurry currently. In my code, creating a version through one SDE connection file and then creating the feature layer to be edited through another SDE connection file that is connected to the new version works. Also, edit.startEditing must have the variable 'multiuser_mode' set to ...


2

You could use the Parse Path (ModelBuilder) tool with the input being your MXD. The resulting PATH will be your input to the Create File GDB (Data Management) tool. Below is a simple model showing this. It seems that you cannot use the output value from the Parse path tool as a direct input into the Create File GDB tool. This is probably because the File ...


3

You can use the Replace function detailed in this guide: Remove all spaces with the Replace function Sometimes, we want to remove all spaces between character and numbers in a range, we can use Replace function to solve it. Highlight the range that you want to remove all spaces. Click Home > Find & Select > Replace…, the Find and ...


4

Here is the code that should work for you: import arcpy mylist = ['A4126','A4190'] print str(tuple(mylist)) tempFeat_1 = r"C:\ArcGIS\Default.gdb\AR_postalcodes" tempFeat_2 = r"C:\ArcGIS\Default.gdb\AR_postalcodes_sel" qry = """POSTCODE IN {0}""".format(str(tuple(mylist))) arcpy.Select_analysis(tempFeat_1, tempFeat_2, qry) A couple of comments: ...


2

Actually, if I open the recent History .xml file, C:\Users\USERNAME\AppData\Roaming\ESRI\Desktop10.1\ArcToolbox\History The most recent will have parameters & env. settings & time. It gives all the geoprocessing tools used (if w/in arcpy) and all the settings and environment settings and time started and finished.


0

# Import system modules import arcpy from arcpy import env This code in the last line won't function. # Set environment settings env.workspace = "C:/temp" print env.workspace # Set local variables inFeatures = 'task7.mdb' print inFeatures outLocation = 'C:/temp/output.gdb' print outLocation # Execute TableToGeodatabase ...


5

I certainly wish that more people would be as concerned about the display of digital elevation data as you are. I see so many examples of poorly rendered DEMs that it's somewhat disconcerting. So thank you for raising this question. First, to answer your question of "how can I be sure that I am using a correct setting", I don't think that there is such thing ...



Top 50 recent answers are included