Tag Info

Hot answers tagged

8

You can use this command to replace all comas in the fields of your Species column with spaces: regexp_replace( "Species", ',', ' ' ) In this post answered by Nathan, the regex_replace function is described by : regexp_replace(string,regex,after) So in your case: 'string' is your column (species) 'regex' is the character you want changed (coma) ...


5

Assuming you have a reference to the feature class pFC: ERSI.ArcGIS.Geometry.ISpatialReference pSP = ((ESRI.ArcGIS.GeoDatabase.IGeoDataset)pFC).SpatialReference; coord=pSP.FactoryCode coord now contains the code for the coordinate system. Note that not all projected coordinate systems are defined in esriSRProjCSType, there are more constants ...


5

You can add the 22 data frames in one single map document (copy and paste) or you can export all as images/vector files and combine in Illustrator/Photoshop.


4

Check out X-Ray, a nice set of tools for looking at structures (and differences) of MXDs and geodatabases. See links below. The tools were developed by the ESRI Local Government Data model group for working with the large municipal basemap datasets and mxds they work with but have been released for general use, and looks like is very useful add-in when ...


4

What you describe sounds to me like a use case for Data Driven Pages. If they do not meet 100% of your requirements then they are well integrated with ArcPy to complete the necessary map automation.


4

To select from the map using the current selection environment (you can turn off selectability and visibility of layers then this wont pick them up. Firstly you need to be creating a tool: using ESRI.ArcGIS.Carto; using ESRI.ArcGIS.ArcMapUI; using ESRI.ArcGIS.Geometry; using ESRI.ArcGIS.Framework; using ESRI.ArcGIS.esriSystem; using ESRI.ArcGIS.Display; ...


4

You can use the Select (Analysis) tool to select a subset of features based on a SQL expression and export the selected results to a new feature class. In this case, I used the following expression: SHAPE_Area > 100 Alternatively, you can perform the same action directly on the attributes using the following workflow: Open attribute table > Select ...


3

The raster calculator syntax for you third raster is the following Con( ("raster1" < "raster2".maximum) & ("raster1" > "raster2".minimum) , 1, 0) there is no built in method to get the percentiles, so you should compute them based on the histogram of you image and manually enter the values in the raster calculator. But you can approximate (if ...


3

I'd try Summary Statistics from the Analysis toolbox. Set the neighbourhood attribute as the case field and the water consumption attribute as the statistics field with MEAN aggregation mode (or another appropriate one). This way, you get a data table. If you have a polygon layer covering the entire area (without gaps), you can just use Dissolve to obtain a ...


3

Rasters do not have attribute tables which can store independant attribute values. Only one numeric is stored by default, coming from the field that you select. A workaround in your case is to add one field in your line feature class where you make a copy of your FID field (unique values). You can convert your lines to raster using this new field, build a ...


3

I think you should check that you are using the List By Drawing Order view of your Table of Contents. Of the four views described in Using the table of contents it is the only one which will allow you to change the drawing order.


3

You need to use the Create Fishnet tool. Note there is a link at the top of that help page that leads to further information on How Create Fishnet Works, which includes some graphic examples. The simplest inputs to create the grid are to: enter an x,y coordinate for the origin point (bottom left) of the grid enter an x,y coordinate that, along with the ...


3

In order to solve your problem: Create a FileGeodatabase In the FileGeodatabase create a FeatureDataset Import the shape in the FeatureDataset In the FeatureDataset create a Topology In the wizard choose next and in the Rules page click Add Rule Select "Must Not Overlap" or "Must Not Have Gaps", check "Show Errors" and click OK. Complete the wizard and ...


2

I am going to write this in VB.Net since that is what I know, and hopefully you can figure out the C# way to do it: To find all the layers, use IEnumLayer interface: Dim pEnumLayer As IEnumLayer = My.ArcMap.Document.ActiveView.FocusMap.Layers(Nothing, True) The second argument determines if this drills down into composite layers. To get the layer from ...


2

If you want to draw features like the one you posted you should use the Arc tool. It is available on the Editing toolbar from the dropdown menu which usually displays Trace. There are a couple of different Arc functions, check them out here. You can also make Bezier curves, which are easier to reshape.


2

It is really quite straightforward to obtain a Pearson's correlation coefficient. Given a population assumption: xBar = mean(x) yBar = mean(y) xyBar = mean( (x * y) ) covariance = xyBar - xBar * yBar correlation = covariance / ( sd(x) * sd(y) ) Unless your points represent a true sample (e.g., field data), there is no need to subsample. This equation ...


1

You can use Expand to buffer raster "zones" that represent specific values in the raster. Buffers value 10 by 3 cells Expand("landcover", 3, [10])


1

You can use the euclidean distance tool, see: http://resources.arcgis.com/en/help/main/10.2/index.html#//009z0000001p000000


1

You would do something like this: dataset = "c:/data/landbase.gdb/Wetlands" spatial_ref = arcpy.Describe(dataset).spatialReference as per the ESRI help page here


1

Add the new values with the Add Values button, not the Add ALL Values button. The add ALL values button will override the existing symbology and re-add all unique values whereas the Add Values button allows you to preserve the existing symbology and add new unique values not present in the Symbol list. EDIT: Also, confirm that after importing symbology ...


1

You can set the scale on the fly using ArcPy's mapping module: from arcpy import mapping mxd = mapping.MapDocument(r"Some Path") df = mxd.activeDataFrame # you can also get access to all data frames through listdataframes() scales = [1500,3000,...,50000] for scale in scales: df.scale = scale # do stuff with map Hope this helps. Andrew


1

If you are using Data Driven Pages from ArcMap there is an option to round the best fit scale to nearest value of your choice (see below) To use this in ArcPy I would have a look at this question and answer: How to automatically generate useful scales for data driven pages in ArcGIS desktop


1

After running your Union, open the resultant Attribute Table and I think you will see that all polygons of overlap have IDs from both input feature classes that are >= 1 whereas where there is no overlap one or other ID will be 0. Use the Select (Analysis) tool to select the polygons with both IDs >= 1 out into a new feature class and you should have the ...


1

I would try it this way: Open a new Blank Map, switch to Layout View and set its desired page size. Open each of your other 22 maps (which you will not alter) in turn. Right-click on any data frames in the Table of Contents of each map that you want to appear on your large page and copy them to the clipboard. Right-click on the layout of your large ...


1

There are many ways to accomplish this. Data driven pages is one, if you know what you are doing - copying the data frame of each mxd into one mxd is another. The most straight forward way is to produce high quality output of each mxd and put together the poster in your favorite software. i.e. photoshop, illustrator, paint, poster artist etc.


1

Your code looked ok to me. I did simplify it a bit so I could run it to as an add-in Button and it worked fine in 10.2.2. You will be able to run this on two layers, The first layer in the Map will need to have a field called ID, and the Second layer needs a feature with OID 5 as written. What line is the code failing on? public class Button1 : ...


1

Yes, you may do this by joining it based on a common ID column between excel and dbf or geodatabase feature class table. Import/convert excel table to geodatabase and remove all fields except for joining field Open up ArcMap and add geodatabase table to map Right click on table in TOC>Properties>Joins and Relates>Joins and join table to excel table Open ...


1

There's also a downloadable tool called Curves and Lines, originally developed for preparing data for the parcel fabric, that might do what you want. Takes some time to figure out what tolerances to set the parametes to, so try it on a copy of your data first. This is designed to clean up existing features, not add new ones.


1

This tool should do what you are asking for Smooth Line (Cartography) without having to click and drag.


1

Note: Edited answer based on additional info provided by OP Try the following: 1) Combine the county and hospitals datasets, either via a spatial join or with identify (I personally prefer identify so I have a new layer to work with, but either should work). This should give you a single point dataset with all your hospital info, but with the addition of ...



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