Tag Info

Hot answers tagged

8

I agree with @ChrisW in that ArcGIS can work with massive datasets in file geodatabases (1TB), yet shapefiles have size limitations (2GB). A few recommendations: Make sure your vector data are in a file geodatabase. Ensure that 64-bit background geoprocessing is enabled. Simplify your data in any way you can prior to processing. If your objectives allow, ...


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 ...


6

in provides a quick logical test for determining if a value is contained in a list, dict, or string. if from_g in dct_max: either from_g is found in dct_max (true) or it's not (false). The rest of your questions would be resolved by researching how dict objects work (lots of good examples on Stack Overflow).


6

The format of your 2 fields is probably double. Turn them to integer first (with or without the string.format() method, but the latter is more elegant): vakkrt_name = str(int(row[0])) + "_" + str(int(row[1])) or vakkrt_name = "{}_{}".format(int(row[0]), int(row[1]))


5

Export your table to a text format. Grab the header row and paste it to a new file. Delete irrelevant column headings (could also turn them off prior to export to avoid this step), and then use find/replace functions to change the delimiting characters to proper syntax for the formula (ie quotes around field names, a plus sign in the middle). Copy and paste ...


5

I have used this code below in the past. It works pretty well. #http://stackoverflow.com/questions/14580540/get-location-coordinates-using-bing-or-google-api-in-python import urllib import json import arcpy import time import os arcpy.env.overwriteOutput = True GOOGLE = 'http://maps.googleapis.com/maps/api/geocode/json?' def Message(msg): print ...


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)


4

I've had the same issue with ArcMap and even though it nowadays probably can handle that size, I still find that using a geographical database such as PostGreSQL+PostGIS is the easiest and most reliable way. Plus, it connects nicely to QGis, so you can visualize your results quickly after you've done your updates. The downside is of course that you'd need ...


4

The Print dialog in ArcGIS isn't set up to directly input pixel units. You have to do a little math and set two different parameters to get the output you want. First, in the page setup, uncheck the box that says use printer paper settings and enter a value of 5 inches for width and height. Next, when you go to export your svg, you need to do a little ...


4

Per this Can I publish a service to 10.3.1 using an earlier version of ArcGIS for Desktop? Generally, you can use a 10.1 or later version of ArcGIS for Desktop to publish a service to a 10.3.1 server. However, there are some restrictions to publishing if you are attempting to take advantage of functionality exclusive to 10.3.1: If you're using web-tier ...


4

Since this is for your university work, you should really research on your own how to do this, as much as possible. If you get stuck, of course you can come here and ask your (specific) question. Going to university is about learning to learn, think and work independently. Yes of course it is possible (see @crmackey's answer), but presumably the point of ...


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 ...


3

The ultimate result of this calculation is a boolean typed value (i.e., True or False). ArcMap does not have a boolean type built in, but you can simulate it in one of two ways: If you are using a geodatabase, best practice would be to store the result of this calculation using an Attribute Domain that you define to your needs. If that's overkill, you ...


3

You might check out: Entering attributes immediately after creating a new feature You can turn on a setting so you will be prompted to enter attributes into the Attributes window after any editing operation that results in new features. You will need to close the window before you can do anything else with ArcMap. Turning on this setting is most useful in ...


3

Well, after helpful advice from 'dmahr' I manually tested this process in the ArcMap GUI and it worked successfully. That drew on the conclusion that possibly a naming issue was at fault. Indeed such seemed to be the case. After using a text+numeric name, the processing worked without troubles. The following ad hoc changes temporarily resolved the ...


3

As far as I know there is no direct way of doing this but alternative to this is given in Erasing polygon from raster. Basically it suggests to create a polygon with a hole which will be used as a mask (to use by Extract by Mask tool). More specifically it says: By using Draw toolbar, create two polygon graphics, one for the overall coverage and the other ...


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 ...


2

Per Bill Huber's (whuber) clever workaround: xmap = (FlowAccumulation(1) + 0.5)*cellsize + xmin ymap = (FlowAccumulation(64) + 0.5)*cellsize + ymin Curtis Price has developed a python script to do this: from arcpy.sa import * from arcpy import env as E # Calculate $$NROWS and $$NCOLS from current environment cellSize = float(E.cellSize) ...


2

I can confirm, this appears to be the behavior I am seeing as well (ArcMap 10.2.1). I have the Abbreviate Label last on the Fitting Strategy Order (with Stack Label and Reduce Size enabled). As long as the Abbreviate Label check box is enabled, Maplex abbreviates the label, regardless of space. This functionality is clearly not behaving as it is ...


2

A new PDF to TIFF tool has been added to ArcGIS 10.3 for Desktop: Exports an existing PDF file to a Tagged Image File Format (TIFF). If the PDF has georeference information, the TIFF can be a GeoTIFF. These TIFFs can be used as a source for heads-up digitizing and viewing in ArcMap. Both GeoPDF and ISO standards of georeferenced PDFs are ...


2

This is advice I offered at https://geonet.esri.com/thread/64649 because I have come across it a couple of times. If you have borrowed a license and have left the web address of the license server you are borrowing from in the ArcGIS Administrator, then maintained access to the web but no longer to the license server, then ArcMap appears unable to start. ...


2

you could use some Python scripting, I assume that the field "resultfield" exists and that you can identify the fields to sum based on one common string (i.e. "score") : import arcpy allfields = arcpy.ListFields("featureclassname") scorefields = [x.name for x in allfields if x.name.find("score")>-1] with arcpy.da.UpdateCursor("featureclassname", ...


2

You cannot publish a basemap which is an ArcGIS Server service itself. You need to add the basemap Topo to your web application or some other client from which you want to access your GIS services. From the Help: Your data frame contains a basemap layer. Basemap layers contain layers or map services meant to be used as a background or reference ...


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')


2

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


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 ...


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 ...


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 ...


1

The easiest way to select the features you've identified is to right-click the layer name in the left panel of the Identify window and choose Select. The features that were identified will be selected. Now you can right-click the layer in the TOC and choose Data > Export data or do anything else you wish.



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