Tag Info

New answers tagged

0

You can definitely achieve this with arcobjects in any of the .net languages. Your question at this point is very broad. Most of the technical aspects you will find many examples of when performing a internet search such as; how to create ArcGIS add-in button, how to connect to database table, how to populate a data grid based on sql SELECT query, ...


0

While agreeing with @ChrisW about the question being too vague; here are few pointers to get you started. It sounds that Krigging is a good option, and in particular the probabilities map. Note that any question which seek to know literally: "what is...or... how to perform krigging?" is much too broad. Regarding the differece map. You started well and you ...


0

Unsplit Line (Data Management) Merges lines that have coincident endpoints and, optionally, common attribute values.


0

Another user asked a similar question on github, which might be of interest to you. Here's the gist of what one user recommended to import arcpy autocompletion data for anaconda: DamnWidget commented on Feb 26 https://github.com/DamnWidget/anaconda/issues/284 Open a PowerShell or CMD.exe and go to your anaconda installation under the Packages folder ...


0

Try this out: import arcpy, os, traceback, sys from arcpy import env env.workspace="in_memory" env.overwriteOutput = True try: def showPyMessage(): arcpy.AddMessage(str(time.ctime()) + " - " + message) mxd = arcpy.mapping.MapDocument("CURRENT") color_layer=arcpy.mapping.ListLayers(mxd,"silver.tif")[0] ...


1

One thing that should be mentioned, is that the Least-Cost-Path is computed as, literally, the least cost path, and not as th Shortest Path. Also cited from ArcHelp for Cost Distance Analysis: The cost distance tools are similar to Euclidean tools, but instead of calculating the actual distance from one location to another, the cost distance tools ...


2

If you're using ArcGIS, you can try the Extract Values to Points tool. It should give you the temperature at each point, assuming they intersect your temperature raster.


0

You can accomplish this with multiple layers pointing to the same raster source. Give each layer its own separate scale range and symbology. If you wanted to have a particular symbology between 1:25 and 1:100, you'd set those values on the General tab as shown below. Then choose the appropriate symbology on the Symbology tab. Then you might have, say, two ...


1

I think I would tackle this using Arcmap's Query Layers, why not leverage the power of your database? You won't have to export and make and store a derivative layer where it can possibly go stale (needing to be updated once source data changes). Open ArcMap, click File-->Add Data-->Add Query Layer Build the SQL Query (you may need to look up equivalent ...


0

For a raster-based approach, you can use the Euclidean Distance tool. For this example, I changed the raster display to histogram equalized stretched (Layer Properties > Symbology > Stretch > Type : Histogram Equalize). The stretch type will give you control on how the buffers appear--you may want to use a custom histogram. Also, you will want to ...


2

Here's a little background info on raster bands. Think about it like this: an RGB image would have 3 bands, one for red, one for green, and one for blue. Each raster cell would have 3 values, one for each band. The Landsat imagery has 4, because they include an extra band for infrared values as well. In your case, there is only one band because each cell ...


1

In the symbol selector you can choose 'Circular Gradient' then select edit symbol, here you can select the color ramp style and outline type. When selecting the outline type select 'Edit Symbol' again and choose the 'Null' option from the drop-down menu: The result is a gradient buffer with no outline like this: There may be other ways to accomplish ...


2

You haven't queried the raster(s) to get the spatial reference, the spatial_ref variable is still set to the spatial reference of the last feature class. Instead of this: for raster in rasters: arcpy.AddMessage("{0} : {1}".format(raster, spatial_ref.name)) Do this: for raster in rasters: spatial_ref = arcpy.Describe(raster).spatialReference ...


2

arcpy.AddMessage Btw, recommended practice is to use arcpy.AddMessage rather than print, for portability between command line/batch files and arcmap. But print is fine if you don't want your message to display inside arcmap. Getting print statements in Python script to print through a batch file


2

The Esri help can be quite counter-intuitive, you need to know what you're searching for to get the description... The issue here is that the pictureElement doesn't have a geometry property.. see the Help page for picture element: However the IElement, which implements JpegPictureElement, does have a geometry: Explanation of Esri help symbols, they are ...


2

You'll need to use Network Analyst for this. The first thing you will need to do is turn your lines into a network. The Network Analyst Tutorial exercise 1 covers this, but be aware it may not go into sufficient depth, as there are geometry and topology considerations to take into account. Why isn't the service layer shape properly spread out? touches on ...


1

If all spatial references are the same, build a few models to append a few of the feature classes at a time. Make another model that runs the smaller models. Run the model overnight. I've had terrible luck running into memory issues with large data loads operations, this method works best for me.


5

I don't think you can remove features from a selection layer once it's been created, but the workaround that I usually use is to create a new selection layer from your existing one: Select the features in your selection layer that you want to remove. Open the selection layer's attribute table and click Switch Selection, which will make all the features ...


1

I would do the following: Export the table (txt) Open in excel or similar Add column for year Use datepart to parse out the year Delete extra columns (leaving only year and UniqueID) Save as txt. Join back to the feature class in an mxd and symbolize by your new year column. I believe this should be fairly easy to automate using model builder to keep ...


1

If you have a Spatial Analyst license and using rasters an option, you could use the Focal Statistics tool with the Wedge neighborhood. It's probably more appropriate than vectors in your case anyway (overlap of several layers for a suitability analysis).


3

If you suspect the vector streams are incorrect, I'd start by trying a different data source but often this is approached the other way by burning the streams into the DEM. Convert Vector Streams to Raster with a value of 1 Use the Con tool or the "Minus" tool (under Math) in Spatial Analyst to subtract values in the DEM. This will create a DEM with ...


0

Are you looking for atan2 ? It's precisely meant to deal with this signs mess. https://docs.python.org/2/library/math.html#math.atan2


1

You can accomplish this task with a variety of the analysis tools. Intersect (Analysis) Computes a geometric intersection of the input features. Features or portions of features which overlap in all layers and/or feature classes will be written to the output feature class. Identity (Analysis) Computes a geometric intersection of the input ...


3

I don't have SDE, but since it sounds like you only have a few years, you should be able to select a year and create a layer from that selection. Or just add the SDE feature multiple times and use different definition queries.


3

Move your "is None" check up to the first evaluation. if Btype is None: return 'Olive' elif (Btype.startswith('Fig')): return 'Grape' elif(Btype.startswith('Lychee')): return 'Mango' Basically, if Btype is null, you can't do .startswith, etc. on it.


4

Could you do something like: Pre-Logic Script code: def mathFunction(y1, y2, x1, x2): return math.Atan(math.fabs(y2-y1) / math.fabs(x2-x1)) * (180/math.pi) Field = (on the bottom)...populate with your fields for y1,y2,x1,x2 mathFunction(!FIELDY1!, !FIELDY2!,!FIELDX1!,!FIELDX2!) See Python doc on the math module.


1

Hornbydd is correct. There's an out of the box tool to do this called data driven pages. Data driven pages is based on the old school DS Map Book. It gives you the ability to make a map book series and strip maps. There's a handy cartography tool box with a tool for building a polygon index grid over data (like your lines), this in turn can be used in data ...


0

You can try Xtools Pro (http://www.xtoolspro.com/tools.asp) "Near" tool. Advanced ArcGIS license is not required to use it.


0

You could have a look at the GRASS Tool "v.distance", its for free, therefore there should be no licensing problems, and it should do what you need. If you've never heard of GRASS have a look at this Website: http://grass.osgeo.org/


3

You are describing things that are actually handled in a couple of different ways in the network. First, one way (also known as direction of travel) is handled by a one way attribute for the network edge (the lines). You can get more info about that from my answer at Does OSM data contain the direction of travel? Next, when you talk about modeling ...


0

If you don't have available license and you want to import related library (e.g if you don't have editor license but you want to import arceditor), you will get this error. I think it is a bug, so what we did is use try-catch to catch this error.


0

To convert 2d contours into 3d use OGR2OGR with a few switches: -dim 3 -zfield Z_Field_Name Example: In this case the field with the elevations is called 'Altitude' ogr2ogr D:\SomePath\Output3d_ogr.shp D:\SomePath\Input2d.shp -dim 3 -zfield Altitude Or even better still, directly to DXF with OGR2OGR: ogr2ogr -f DXF D:\SomePath\Output3d.DXF ...


0

ogr2ogr will (sort of) do it. Scroll down to "How do I translate a mixed geometry file to shapefile format?" % ogr2ogr out_point.shp mixed.kml -where 'ogr_geometry = "POINT"' % ogr2ogr out_line.shp mixed.kml -where 'ogr_geometry = "LINESTRING"' % ogr2ogr out_poly.shp mixed.kml -where 'ogr_geometry = "POLYGON"' This stack answer covers it as well. ...


2

It sounds like maybe you are looking for the Near tool? http://resources.arcgis.com/en/help/main/10.2/index.html#/Near/00080000001q000000/ You do need to have the Advanced license to run this. EDIT: If you don't have the Advanced license, check out the Spatial Join tool: ...


2

for future seekers: Here's a modified version of the USGS raster split tool script that doesn't require anything above the ArcGIS Basic (ArcView) license level: """ Raster Split Tool 6/16/2011 ArcGIS 10 Script Tool Python 2.6.5 Contact: Douglas A. Olsen Geographer Upper Midwest Environmental Sciences Center U.S. Geological Survey 2630 Fanta Reed Road La ...


2

Are the reservoir data you have vector data (points or polygons)? If so, your best bet is to make a quarter-mile buffer around the reservoir using the Buffer tool. Then, use Zonal Statistics in the Spatial Analyst extension to extract the raster values. I'm not sure what values are associated with your raster layers, but you may have to investigate using the ...


2

You have coordinates in DMS (degree minute second) format, and need to get them into DD (decimal degree) to import easily into ArcMap. While in Excel, make a new column. This would be the formula to just convert from DMS to DD: degrees, plus minutes divided by 60, plus seconds divided by 3600. =MID([DMS], 2, 2)+(MID([DMS], 5, 2)/60)+(MID(A6, 8, 4)/3600) ...


2

Model builder, to my knowledge, does not expose the data driven pages functionality that you access on the toolbar. If you want to automate map output with data driven pages then you must use python and arcpy. Search help for DataDrivenPages (arcpy.mapping). From this page there is also a link to building map books.


2

You can use the Feature Vertices to Points tool with BOTH_ENDs option checked, on your lines, that will give you start/end points of the lines. Then Add XY Coordinates to populate the resultant points with Lat / Long values. Another way to go about your workflow.


2

Did you take a look at any those lines to see what might be going on? Their start and end points may actually be in the same place, if they were drawn incorrectly. Select one of them and zoom to it. If it shows up as a point, that's why the XY coordinates of the start and end points are the same. Depending on the coordinate system you're using, it's also ...


1

The following ESRI Knowledge Base artcile details the steps to turn your data from Excel into a shapefile. Hopefully you will find this is all you need. http://support.esri.com/en/knowledgebase/techarticles/detail/27589 Note: You will have to convert your coordinates to decimal degrees. Following @Erica's comment, and indeed a re-reading of your ...


1

The function below is based on Ryan's idea, but is a little more direct. ArcGIS map documents are actually OLE documents, which can be parsed with the oletools module (available on pypi: https://pypi.python.org/pypi/oletools). The function opens the file and reads the version string. Tested with 9.0, 9.3, 10.1 and 10.3, but should work with anything (not ...


0

You are misunderstanding how Clip operates. From your question you are attempting to clip a line layer with another line layer. Per the help file (see the second to last graphic), if both inputs are lines the output is all lines that exist in both layers, aka are coincident - essentially an Intersect. If you want to clip the roads layer using the NMW ...


0

My understanding is that a ModelBuilder model can only be run from start to finish without interruption. Consequently, as commented by @dof1985, I think your only option is to create two models/tools that you run before and after your user operation.


0

In your code where you have used a read-only search cursor: with arcpy.da.SearcCursor(fc, fields) as cursor: you need to use a read-write update cursor: with arcpy.da.UpdateCursor(fc, fields) as cursor: You will also need to use arcpy.ListFields() to produce Python lists of the fields in your feature class and table.


1

I'm not sure what the cause of the problem is, but if you're using ArcGIS you can use the "Move" edit tool (help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//…) to move it back to where it should be.


2

If you use the Table to Table tool, which can import Excel files to geodatabase tables, you can manually set the data type of each field during the import process using the field map. Right-click the field you're having trouble with, click Properties, then change the type:


0

Ok so maybe I was too hasty with my angst. I followed the CSV route found on this page and it worked fine. The frustration is still there however as to why you can't bring in an Excel sheet direct and retain the formatting.


5

Do you need parentheses around part of the expression? Either of the following could be correct, but I assume it is the latter. (PopDenZone = 'CPSE URBAN' AND Priority_Description = 'Life Threat') OR Priority_Description = 'Urgent Medical' PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR Priority_Description = 'Urgent Medical')


3

Perhaps try parentheses around the expressions. I think what you're trying to say is: PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR Priority_Description = 'Urgent Medical') It's worth noting that: (x AND y) OR z is different to: x AND (y OR z)



Top 50 recent answers are included