Hot answers tagged

11

I assume you have installed comtypes successfully, according to the following SE Q/A: -How do I access ArcObjects from Python? import arcpy from snippets102 import * from comtypes.client import GetModule, CreateObject import comtypes.gen.esriFramework as esriFramework import comtypes.gen.esriArcMapUI as esriArcMapUI import comtypes.gen.esriCarto as ...


4

def des(num): aList=['Flat', 'N', 'NE', 'E','SE','S','SW','W','NW','N'] if num in range(1,11):return aList[num-1] return 'N/A' Alternatively select valid records and use: ['Flat', 'N', 'NE', 'E','SE','S','SW','W','NW','N'][ !MajAspNum! -1]


4

Use the 'Set Data Source' tool for map documents in ArcCatalog Instructions provided describe how to use the Set Data Source tool for map documents in ArcCatalog. When right-clicking a map document (.mxd) file in ArcCatalog, a Set Data Source command is visible. This opens a dialog box that makes it easier to update or repair some or all of the references ...


4

You could build a raster stack from the 120 layers with numpy and then apply a function to each cell to determine the first non-zero position. Don't know about the speed for large rasters though. import os import numpy as np # create some random rasters ncol = 20 nrow = 10 for x in range(1,6): rast = np.random.randint(0,2,(nrow,ncol)) * x ...


4

You could take a look at the maki https://www.mapbox.com/maki/ icon set from mapbox. They've got a couple of teardroped shaped symbols (marker-stroke and marker ), and are downloadable as SVG and PNG, and if you grab the github repository there's an ArcGIS Style file. As an added bonus they're released under a creative commons license so you can use them ...


4

Sounds like ArcMap is applying a "Stretch" to your images. In your raster layer properties, on the symbology tab, try adjusting through the Stretch drop-down options until you find one that looks right. I suspect turning off the Stretch altogether (select None) will give you the closest to what you see in MapWindow. You may also be able to apply ...


4

It sounds like what you are after is Background Geoprocessing, which was introduced at ArcGIS Desktop 10.0. However, I think ArcPy only became "Background Geoprocessing aware" with the introduction of Python Toolboxes at 10.1 - see Setting "Always run in foreground" within ArcPy code?


3

I would use Spatial Join GP tool for this. Target features: study areas (green solid polys); Join features: tracts (red color) Choose JOIN_ONE_TO_MANY. All other options - default. This is what you will get: Study area 3 (TARGET_FID field) intersects tracts 9 and 36 (JOIN_FID field). Study area 4 doesn't intersect any, hence JOIN_FID = -1. In case ...


3

A switch statement is ideal for what you want to do. Since Python doesn't support switch statements, you can use dictionary mapping to accomplish the same thing. def des(num): the_dict = {1: 'Flat', 2: 'North', 3: 'Northeast', 4: 'East', 5: 'Southeast', 6: 'South', ...


3

If you click "Fit to Display" in the Georeferencing menu, the un-georeferenced Image will be moved to the current window location making it much easier to georeference.


3

Addins are not backwards compatible and cannot be installed on an earlier version of ArcMap. You'll have to set up a development machine or VM with ArcGIS 10.0 and Visual Studio 2010 to compile the addin then it can be distributed to PCs running later versions of ArcGIS.


3

I would suggest reading up on spatial statistics. In particular, I would look at spatial autocorrelation and clusters. The ArcGIS Resource page on the Spatial Statistics toolbox might be a good place to start.


3

Once you did your analysis you can Copy your output with arcpy.CopyRaster_management. Where you can specify bit depth through the pixel_type arg. For example - arcpy.CopyRaster_management("inrast","outrast","","","-9999", "","","8_BIT") You can then delete the earlier output to cleanup.


3

You can set the extent of your map by going on the layer properties > Data Frame > Clipping There you can use one of your polygon with any shape and the graticule wil fit to this extent. In your case you need a rectangle drawn in a geographic coordinate system (densify its vertices before reprojecting to your conical projection)


3

Try splitting your raster into smaller parts. It seems to be really big. I just found this post: http://forums.esri.com/Thread.asp?c=93&f=995&t=225045, someone had a similar problem as you: Quote from link above: Any count exceeding 2^31-1 will therefore "roll over" into the most negative numbers; for instance, (2^31-1) + 1 will appear as ...


2

I had the same problem and simply convert .xlsx to .csv only helped to display the x coordinate. I used the table to table file to create a new table from the .csv file and define the field type to be numeric. After that it worked. To me it seems to be more of an excel problem rather than an ArcGIS 10.3 problem...


2

I had the same error a few months ago with windows 8.1. I contacted MapAction and they informed me that it was a known issue due to changes in Windows on Microsoft's part. "Thanks for contacting us. We know this is a problem at the moment when using Windows 8.1. The problem is to do with the windows font that needs to be installed - Microsoft changed ...


2

Based on your description, the simplest answer to your question (not be the best solution, see why below) would be to call a Python script from R with system() > system(paste('python ExportedModelBuilder.py', argumentIn, argumentOut, sep=" ")) for the python file, you can export it from model builder and change the required variables as arguments using ...


2

One workaround would be the following procedure: Turn off the visibility of the layer that you want to be queried in Google Earth (e.g. parcel) Use "Map to Kml" and make sure to check "Convert Vector to Raster". This will convert all of the visible layers to raster. When using this option, enter the "Map Scale Output" parameter carefully, so your scale ...


2

In ArcMap you can go to File->Map Document Properties ...., and in "Pathnames" check "Store relative pathnames to data sources". As long as your MXD is in the "main" folder, all the data in the same or chid folder will be find even in other machines, without having to replace the data source. The only thing you need to do is preserving the folder tree from ...


2

Similar questions have been asked on the forums and "Ask a Cartographer". The question, How can I give my map an "antique" feel? has a link to a historical style (the 2nd link isn't working). There's also a presentation from NACIS 2006, on Historical Map Effects. The link is here. Scroll down the page or search for Historical. There should also be some ...


2

When working with tools, both models and scripts, the output is only added to the ToC if the particular output is a parameter. Parameters control interaction between the tool and the map. In a script, use something like the following to set the output arcpy.MakeFeatureLayer_management(layer, temp, where_clause) arcpy.SetParameterAsText(0, temp) This help ...


2

Ok, after seeing your python environment from the sys.path, it is definitely your anaconda install that has caused the problem. This isn't really a "problem" per se, just that when you run your Python IDEs they will default to the most recent version of Python you installed. So in your case, you installed ArcGIS at some point, then you installed Anaconda ...


2

You can calculate member using field calculator. INPUT: 1st out of 3 rasters to be mosaicked later: I used Con("rain" >= 340,-0.0104167 * "rain"+4.54167) to compute 2nd raster and Con(IsNull("ge340") & IsNull("le152"),1) to compute 3rd. MOSAIC RESULT Alternatively just reclass your rasters into say 0.5, 1.0, 0.5


2

To simply merge or append, see this question on Combining Layers Using ArcMap.Be advised, that you will need to ensure that your two datasets are using the same data types for columns that you are wishing to merge, that your column lengths are similar so you don't truncate data, etc. Basically, make sure your data schema matches. Otherwise, you will end up ...


2

I believe the Euclidean Distance (Spatial Analyst) tool will accomplish what you're after. The tool creates a raster file where each cell displays the distance to the nearest input feature. For your weighted analysis, you could then reclassify the EucDist raster into discrete distances (eg 500-1000m). ...


2

If the featurelayer is selected in the TOC then you can use the DeleteLayer method of IMap. Otherwise you need to first disconnect it from the data source by casting the layer to IDataLayer2 and then calling the disconnect method. This is mentioned at the bottom of the help file: IMap.DeleteLayer Method Also it would be a good idea to catch your exception ...


2

You can try enabling it via the Python window (under Geoprocessing > Python). Open a Python window and enter: arcpy.CheckExtension("Spatial") That will tell you if a Spatial Analyst license is available. If it is, enter the the command: arcpy.CheckOutExtension("Spatial") That will check out the license and you'll be able to use the Spatial Analyst tools. ...


2

If I understand you right, you want the opposite of a buffer. Then first, you need a polygon of your area of interest (AOI), say the border of a state or something like that. Second you calculate your distance buffers which you could clip from the previous AOI polygon. That should give the "outside" of the buffers.


2

There is a tool in the analysis toolbox called symmetrical difference that you could use. You would put all your buffers in one layer and your counties in another layer. Then the tool would tell you all the areas in the counties that don't intersect any of the buffers.



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