Tag Info

New answers tagged

0

This is a long shot, but do you have a 'Production Mapping', 'Defense Mapping', 'Aviation', or 'Maritime Charting' extension for ArcGIS? It seems the "Dice Polygons" tool will accomplish what you need. I've never used the tool personally, but from the description, it sounds like a winner. Search Link EDIT: Alternatively, I've written a quick script ...


0

If you are importing that as a picture, then Export in JPEG. ArcGIS wants to recognize the features its exporting to PDF and layer, whereas JPEG is just an image. I've had that happen a bunch of times. You can change what font/format you use in Excel, but I don't know what a better option is, and that may help. Then it's up to you how you want to convert ...


0

Your code won't work. You loop the cursor until it finishes. At that point pFeature is Nothing. After that you try to access the OID value of pFeature, which is Nothing. If you only select a single building or only want the first building OID of any selection set don't loop the cursor, just get rid of the cursor loop. Then you should make sure you got ...


0

I think SDE_OBJECT_ID might be data type LONG. Have you tried pFeature.OID.ToString(), or whatever the conversion method in VBA is? Not sure if it might fix the issue. Just an idea.


0

You could also use "%Name%".replace(".tif","") in Calculate Value in Model Builder


1

In your code you have not specified the pathname to your shapefile correctly. Instead of: sFile = "E:\boundary\sample.shp" try: sFile = r"E:\boundary\sample.shp" This should make the 000732 error disappear.


0

Check whether your ArcGIS installation is current on patches. I recollect that there was a patched bug that might be causing the condition you have observed.


0

ArcMap 9.2 was released in 2006, 3 years before the release of Windows7. So 9.2 does not support Windows7. XP and ArcGIS 9.2 are both outdated technologies (9.2 was retired in 2012 and XP last year) so moving to the current versions might sound like an option.


0

Create a Euclidean Distance raster (distance from shoreline) then use add the Add Surface Information to populate each record in the shape file with the distance to the shoreline.


1

Directly export to Excel file using the Table To Excel (Conversion) tool. No field name truncation and no formatting issue with numbers: Table To Excel (Conversion) Then you can easily export to a correct csv(txt) file from excel


1

I think you're trying to create is working with Geocoding in ArcGIS. Here is a video tha you can follow the instructions to do the geocoding in ArcGIS. But before that you need to parse your XML data to get just the address. You can do it using a simple code using Python (it's installed by default when you install ArcGIS). Is that make sense for you?


1

What you are identifying in your image is a ToolPalette not a Button or Menu. So use the AddIn Wizard to create your Buttons that you want to see in the ToolPalette then create the ToolPalette and add the buttons by their ID. Below is some demonstration code to get you going. <ESRI.Configuration xmlns="http://schemas.esri.com/Desktop/AddIns" ...


1

8.9 is the 98th percentile which QGIS computes by default for the rendering. If you change to min/max and press Load, QGIS computes 21.9, just like Arc.


0

After much playing around with the various properties of the IMapTimeDisplay2 interface, I finally found something that worked. Perhaps this works because my dataset is time-enabled by an attribute called "Year" that has integer year values from 2010 to 2100 in 5 year increments, and I'm only interested in rendering one year at a time, so the "start time" ...


0

If you have ArcGIS version 10.2, to get the headings to sit properly as in the legend on the right you need to make sure that fixed frame strategy is switched off. So in the legend properties make sure fixed frame is switched off on the layout panel (see below). Then to define items to be in new columns select the item you wish to be in a new column on ...


0

I often find it easier to make multiple legends - each with only one or two feature classes and then just line them up next to each other. It is much easier to control the text that way and only slightly less convenient.


1

According to the Help file image is not an attribute of a menu element. In fact I cannot think of any menu on the ArcMap interface that behaves in this manner, i.e. has an image instead of a word, despite being able to change it to an image via the customize mode. So it's not a property you can define in the config file. Now I may be wrong, others can ...


1

There is a much simpler way using a Dictionary object. To be accessible/updateable for each iteration it must be outside the scope of the function (global) otherwise it's reset for each calculation. preDict = {} def CalcField3(Field1,Field2): global preDict # tell python this isn't a new variable but the other one if preDict.has_key(Field2): # if ...


1

A UTM projection uses eastings and northings with units of metres, which look like the ones you have shown. To get Latitude and Longitude, you need to reproject it. In the ArcToolbox: Data Management Tools > Projections and Transformations > Feature > Project And for the Output Coordinate System, choose: Geographic Coordinate Systems > World > WGS ...


1

Assuming "Nearby:" is at the beginning of the line (and never in the middle), you can simplify this logic with a one-liner, without the need of a codeblock: str(!Street1!).replace('Nearby:', '').lstrip()


2

as written, the function returns a string with 'Nearby:' removed only if the 'Nearby:' test is true (if 'nearby:' exists within the field string. If the test is false, the function is set to 'pass', which returns no value (deleting the original value in the process) to remedy, a value should be passed for both cases - true and false - something like def ...


0

There are several ways to tackle this problem, and available solutions depend on your license level. Most require higher than Basic or a third party tool. First, to answer the direct question of splitting a polygon with a line, see other duplicate questions here: Programatically split a polygon with a line Automated/geoprocesing tool to slice, clip, or ...


0

The event may not be wired by default, I don't think this is the case here. I think you have the wrong property, it should be arg.KeyCode == not arg.ModifierKeys ==, modifiers are shift, alt, Ctrl. I think the OnKeyDown is working but not entering the block because the value is None. if (arg.KeyCode == System.Windows.Forms.Keys.Enter) Then check your ...


1

I haven't tested this but I don't there would be any problem. I suggest to simply test the code with two MessageBox: public class Tool1 : ESRI.ArcGIS.Desktop.AddIns.Tool { public Tool1() { } protected override void OnUpdate() { Enabled = ArcMap.Application != null; } protected override void OnMouseDown(MouseEventArgs ...


0

ArcGIS 10.3 has a PDF to TIFF conversion tool, but it doesn't work on USGS geoPDF files. You get a mostly white image with some junk data from the PDF.


2

Use the ModelBuilders' Calculate Field to insert a python code like this: Expression: calculate(!Field1!, !Field2!) And a code block of: previousValue1 = "" previousValue2 = "" previousUnchangedValue1 = "" def calculate(field1, field2): global previousValue1 global previousValue2 global previousUnchangedValue1 #First item in list if not ...


1

If the purpose is to link data found in an attribute table to and excel file where the spatial information isn't necessary it may be best for you to export the attribute table as a .dbf. You can drag and drop the file into an open excel table (2010 maybe earlier), once the file is open in excel you can do all of your joining within excel and not ArcMap. It ...


1

You need to understand that ArcMap data is stored like a database instead of like a spreadsheet and so you need to use the tools ArcMap provides to efficiently get data in/out of it. There is a pretty thorough guide here on how to work with excel data in ArcMap. The actual function you are likely looking for is Excel to Table edit: or try converting your ...


0

I am not aware of any way to do what you are requesting. I have just done a quick search of ArcGIS Ideas to see if anyone has asked for it before and could not find an existing idea. I recommend that you post a new one there. I imagine the way to describe what you are after is: Scroll attribute window to first/next/previous/last selected row while ...


0

If you want to do this in geoprocessing create your buffer (as normal, to a temporary feature class) and then append the results into your feature class. With geoprocessing you can either completely overwrite an existing feature class or not; the append tool allows you to add to an existing feature class. You will need to use your own knowledge of your ...


0

As you have correctly noticed there is no way to run this as a GP tool or as a ModelBuilder process. The Buffer GP tool will create an output feature class with buffered features. The only way to achieve what you want is to use Python (arcpy). You can access individual features' geometry objects with the arcpy.da.SearchCursor and then use the Geometry ...


3

Another solution that is in concert with Aaron's solution, arcpy.AlterField_management(r'C:\Data\Garbo.gdb\Khyber', 'oldfieldname', 'newfieldname', 'ALIAS') is the easiest way to achieve this. There is the equivalent geoprocessing tool named "Alter Field" to be used in Model Builder. This tool is available starting with 10.2.1 Before running the model ...


1

Rather than playing with conditional statements (which are fine, but not necessary here), I would just do the following in raster calculator: ("raster.tif" * 0) + 1 Simple and effective.


2

Feature Class to Feature Class would be your answer. Particularly Field Mapping part is what you are after. If you look at the example below, names of the three fields on the left table are altered to new ones with this tool. One last note, if you have many fields to rename, this approach could be advantageous over the answer in terms of processing speed ...


5

You cannot rename fields in an attribute table. However, you can add a new field and copy the values from the old field to the new one. Finally, delete the old field if you wish. In sum: Add Field Calculate Field Delete Field (optional)


1

You can use a conditional statement in the raster calculator as follows: Con("your_raster.tif" >= 12, 1, "your_raster.tif") This command assigns any value greater than or equal to 12 a value of 1.


2

Have a look at the Reclassify tool (Spatial Analyst).


1

I suspect that the default location into which outputs of your geoprocessing tools are written, has been reset by the upgrade. Next time you run a tool pay careful attention to the workspace into which the output is being written, and check that against the source of any layer that you are expecting it to overwrite.


0

From one of my tools: <Button id="ButtonName" class="Button1" message="Does some stuff." caption="My Button" tip="Does some stuff" category="MyAddin" image="Images\Button1.png" /> As you can see the image has an extension and the XML is properly ...


2

Use Summary Statistics with the first field being the case field and use the maximum of field 2. arcpy.analysis.Statistics(in_tab, out_tab, [['Field2', 'MAX']], 'Field1')


0

There is a great chance something is wrong with your cost field. I'd create a new field and calculate it to contain the seconds and then re-build the network dataset supplying this field as a cost field and choosing seconds (you might consider using minutes as it is nicer to see 5 min instead of 300 secs).


0

If you have more than one feature already selected on your layer and you are running your cursor on this layer (i.e., selected features), you may prefer to use SQL query argument (i.e., where_clause, see for example Search Cursor) of the cursor(s) instead of actual selection. If this selection is based on a simple query via Select By Attribute, you can just ...


0

These are great string functions that I didn't know about. Just for good measure, I'll add a method I've used in the past: expression: zeros(!photoStr!) code block: def zeros(value): desired_len = 5 return (desired_len-len(value))*"0"+value


7

In addition to @DWynne's answer, I'll add that there is a built-in python function that does exactly this (located a little bit further down the page on DWynne's link). It's called zfill and according to the documentation: Returns the numeric string left filled with zeros in a string of length width. A sign prefix is handled correctly. The original ...


4

Actually, you could do this without a function. Try using str.rjust. An expression of !photoStr!.rjust(5, '0') will return a string with padded 0's to the left of your number string. '1' becomes '00001' '12' becomes '00012' '123' becomes '00123' '1234' becomes '01234'


3

Yes there is (in fact you have a choice of a property or an event to hook into): The IApplicationStatus.Initialized property changes once the application is fully initialized, and the IApplicationStatusEvents.Initialized event fires as well. It is suggested that UI changes from Add-ins only occur after application initialization, so this is just the hook ...


1

Assuming you will follow a manual verification process, I can suggest you somewhat quick and dirty solution: First by using Feature Vertices To Points tool (Data Management Tools\Features\Feature Vertices To Points) with BOTH_ENDS option, generate start and end points of each line segment (be aware that each segment will be your unit of analysis); Second, ...


0

What you will need to do is outlined as below. Make sure your lines are connected at end vertices only (if they are not, use the Split Line At Vertices (Data Management) tool). Iterate your line features and create a list of pairs of lines which share end/start vertex. Use ObjectID as an unique line feature ID. You should have [(45,50),(50,52),(52,67)] by ...


1

The problem is solved. arcpy.Union_analysis([r"C:\database.gdb\polygonA","polygonB"],"C:/test.gdb/union",join_attributes="ALL",cluster_tolerance="#",gaps="GAPS") Slight syntax changes fixed the issue. The addition of brackets and the removal of "in_features" and "out_feature_class" fixed the issue.


0

ETGeoWizards has a Split Polygons with Polylines tool in their polygon menu. The tool is included in the free download but I believe there are limitations on file size. Information can be found on the website: http://www.ian-ko.com/



Top 50 recent answers are included