Tag Info

Hot answers tagged

6

Here is the arcpy version of zoom to next feature. You may run this in your ArcMap python window: mxd = arcpy.mapping.MapDocument("CURRENT") # currently opened map doc df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0] # define layer you want to iterate and zoom on for lyr in arcpy.mapping.ListLayers(mxd): if lyr.name == 'myTOCLayerNameHere': ...


5

First part is the AddIn, the real work is done on a form: Inherits ESRI.ArcGIS.Desktop.AddIns.Button Private pForm As fFeatureInspector Public Shared IsFormLoaded As Boolean = False Public Sub New() End Sub Protected Overrides Sub OnClick() 'My.ArcMap.Application.CurrentTool = Nothing If Not IsFormLoaded Then pForm = New fFeatureInspector ...


5

A bit explanation why the OP's function is not working: f1 = a string list= a list When you are iterating over the list, for each member of list you will get either positive or negative response. So your list has nine members; you will get nine responses(+ and -). Then what the calc function will return, whole nine responses or one? Of-course python ...


3

The EPSG: 3857, WGS 84 / Pseudo Mercator in QGIS is called WGS84 Web Mercator (Auxiliary Sphere) in ArcGIS. You are simply not using the right projection.


3

Below is some code in VBA that shows how to set the extent of the viewer window to the current map. The key interface is IMapInsetWindow which gives you access to the IMapInset2 and it's read/write properties. Public Sub updateMapView() ' Get map document Dim pMXDoc As IMxDocument Set pMXDoc = ThisDocument ' Get Map Dim pMap As IMap ...


3

You could just check if your field value is in the remove list: def remove_zero(field): remove_list = ['01ST', '02ND', '03RD', '04TH', '05TH', '06TH', '07TH', '08TH', '09TH'] if field in remove_list: field = field.replace('0','') return field else: return field Then you'll want to do: remove_zero(!FIELDNAME!)


3

In this case, the same thing could be accomplished with !FieldName!.lstrip("0").


3

You can force all labels to display by changing the placement properties. Go to layer properties > Labels Tab > Placement Properties > Conflict Detection and tick on Place overlapping labels It will look a mess when you zoom out but then you get all labels.


2

Do you have the Data Reviewer extension? The Data Reviewer allows you to "Browse" through all features with the simple click of the "Next" button (zooms to both spatial location and attribute table record). There's a lot more functionality to Data Reviewer aside from this (such as flagging errors as "fixed", "marked" etc. and running batch jobs). Just an ...


2

I set the data frame projection to WGS84 Web Mercator (Auxiliary Sphere) as suggested by Nahas and this didn't change the end result. However looking at the previous thread supplied by Vince (QPJ files on ESRI software) the answer at the bottom suggested deleting the prj. and .qpjs files then bringing the data in. I did this, assigned projection to WGS84 ...


2

To simply state your problem, you have one set of points with a value but those points/values apply to both ends of a line; you want to add two different point values as separate attributes to one line. There are (at least) two ways to do this. The first is to extract the start and end nodes of all your lines as points. Since you have an Advanced license, ...


1

Here's the arcpy script. It will take a while to run, but should print out the information you need. On the desktop, create a new text file call "script.py" (rename the extension to .py instead of .txt), right-click, Edit in IDLE, paste in the following code, change the paths, and then hit F5 to run it. import arcpy shp = r"C:\path\to\shapefile.shp" ...


1

I feel your question is poorly titled. Your features are labeled but you are concerned that at certain scales the labels are suppressed. The common way that this is acheived (to prevent clutter like @Hornbydd says) is by setting minimum and maximum scales at which those labels are displayed:


1

Using the WMS tile service from http://lasigpublic.nerc-lancaster.ac.uk/arcgis/services/LandCoverMap/LCM2007_GB_25m_V2/MapServer/WMSServer can load the Landcover tiles in with QGIS You can save out for local files or create vector file from raster using the grass tools (r.to.vect)


1

The CEH data is a single band greyscale Tiff that has an Esri .lyr file associated with it to style it with the appropriate colours. This is not the most straightforward option for this dataset but it is consistent with other datasets that have multiple colour schemes. Digimap now provide a QML file along with the Layer file to make the data more ...


1

One solution (and a great chance to implement itertools) would be: import arcpy, os, itertools infc = r"C:\MyFolder\MyGDB\MyInputFeatureClass" # Replace with the path to your input feature class outfc = r"C:\MyFolder\MyGDB\MyOutputFeatureClass" # Replace with the path to your output feature class spatialref = arcpy.Describe(infc).spatialReference if not ...



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