Hot answers tagged

10

Here's a python function that will select random features in a layer based on percent, ignoring current selection: def SelectRandomByPercent (layer, percent): #layer variable is the layer name in TOC #percent is percent as whole number (0-100) if percent > 100: print "percent is greater than 100" return if percent < ...


7

What you seek can be done easily using the digitizing tools plugin. The plugin adds a new toolbar with a couple of new tools. The tool you need for this task is the amend line. It get active when you turn edition mode in a line layer. And you use it by clicking the begin or end vertex of a line and then keep clicking for new vertex. To finish, you ...


7

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


6

Here's a handy list of keyboard shortcuts: http://www.esri.com/library/brochures/pdfs/arcgis-desktop-tips.pdf In an attribute table, Ctrl + Enter will move to the next row and select it. Then Ctrl + Shift + = (the equal key) will zoom to that feature in the map.


6

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


6

No need to create a new layer. You can show your layer's vertices using the Outline: Maker line Symbol layer type. Just add a new symbol layer Add a new symbol layer; Choose Outline Maker line (top right corner); In the Marker placement, Choose "On every vertex" You can even style the marker to look like the red cross symbol used on layers in edit mode. ...


6

You can use the "con" tool for reclassifying values in rasters. The conditional statement is the bread-and-butter of raster analysis and is a good thing to be familiar with. The con tool can be found in the ArcToolbox: Spatial Analyst Tools > Conditional > Con You can also do this via the raster calculator which, is my suggestion because you can define ...


5

Start editing that shapefile, double click on said point, right click on point and "move to" and it will give you an option to type in the x and y coordinates for where you want to move the point to. the drop down also gives options to change to DD or meters etc.


5

Select the rows that you want to add the text in using the Select by Attribute from the selection drop down, then using a query to get only those rows. Open the attribute table then use the Field Calculator to add the required text in the rows, enable editing before you use the field calculator as any changes made outside of an editing session are ...


4

The following works in 10.2.1 and essentially turns the sketch hollow as suggested by Ian. As soon as you stop being in sketch mode it returns to your selected transparency. In the Editor toolbar go to Editor > Options and untick Use symbolized feature during editing.


4

It's not strictly read-only access. You can load data via copy/paste and import into a SQLite or SpatiaLite database. Tables and feature classes can be appended to using append or Load Data. You can edit the SQLite/SpatiaLite data via code as Insert/Update/Delete are supported. What you can't do is open an edit session in ArcMap.


4

Depend what means 'many holes', but if it's not hundreds/thousands you can always use Auto Complete polygon tool. All you have to do is start edit session, select the tool, draw the line across a hole and merge created polygons to required polygon. It is better than digitising and Trace but still semi manual… see screenshots: Select Auto complete tool and ...


4

Fixed. The problem was is no primary key. In pgAdmin do this request. ALTER TABLE tableName ADD PRIMARY KEY (id); Example for planet_osm_line table and setting osm_id column ,as primary key : ALTER TABLE planet_osm_line ADD PRIMARY KEY (osm_id); untill osm_id is unique.


4

You don't mention Python, arcpy, or any coding in your tags, so I would assume that you're limited to working in ArcMap; is that correct? I have a Python/ArcPy function that creates Thiessen polygons on the vertices of each polygon, which mostly yields the results that you're looking for. The steps are basically: 1) Delete all extraneous fields (as step 3 ...


4

You can use the following code in the Python Console which iterates through each loaded layer (regardless if they're selected or not) and deletes the field with the name you specify. Just replace field_name with...a field name: for layer in QgsMapLayerRegistry.instance().mapLayers().values(): with edit(layer): fields = layer.pendingFields() ...


4

Lines and polygon dimensions are never exact and subject to the limitations of the feature class resolution and tolerance. Infinite precision is not possible and as a result these settings tell GIS to consider measures below those levels as "close enough" to exact measurements. There is no setting for absolutely no tolerance and infinite resolution for ...


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

There is a way to do what you want and not display the nodes in editing mode, or to actually only display the nodes for selected vertices. Go into Settings/Options/Digitizing and then you will see a section called Vertex markers. This is where you can customize the nodes by selecting to only show them for selected features, change the size, change the ...


3

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


3

If you create a single polyline feature from the lines shown, a multipart feature will always be created. This rule concerning self-intersecting features is built-in to the Esri specifications for a polyline and cannot be overridden. Polygons are made from closed polylines and polygons must force a multi-part polyline feature at self-intersections to draw ...


3

I had a Pro snapping related bug that rendered the software unusable for my purposes. The issue is described here: Is there a problem with ArcGIS Pro snapping environment? I contacted ESRI and they confirmed that there was a problem. I was told that the issue will be adressed in a 1.1 release. I donwloaded the 1.1 beta and it still had the issue but I was ...


3

I simply use the "delete" key on my keyboard. I just checked with the same version of QGIS and see the same thing you described: a single node is selected (highlighted in blue) but the "delete selected" button is grayed out. Using the keyboard does work even with the delete button inactive. If you select an entire polygon with the "select feature" tool the ...


3

Please define a primary key on your layer if it's missing. QGIS 2.10 doesn't allow you to edit layers without primary key - it doesn't say a word about it, which I find a UX/UI fail.


3

As far as I know, and we have run into this problem before, you can not undo this operation in AGO (if anyone has other information I would love to hear it.) Our solution was to create a versioned environment with the AGO web edits occuring on a child version of the GDB. That way if field crews screw up some data, which happens more often than you would ...


3

This page on OSM help covers this, and gives suggestions in Potlatch, iD and JOSM. Summarising off-site link: the mapping editors allow conversions of groups of selected polygons to convert them to relation multipolygons, and have a merge tool to allow this in each of their editors.


3

I have found a way to do this. Changes to the feature geometry (e.g. removing overlaps) and attributes are made to committed new features, only after the committedFeaturesAdded signal has fired. Signals from the EditBuffer can be used to trigger messages but not database changes. Where modifications fail, it is easier to delete the user feature and add a ...


3

In the settings you can reuse last entered attribute values. This only works for adding new geometries. Another way for existing data would be to use the field calculator updating selected features with a given value. Another way again will be to change the field edit widget to unique values, for a column where you need to select a value from a list of ...


2

I believe mkennedy nailed it. If your polygons are being simplified, try drawing a much larger one. If that is successful, it means some of the vertexes in your smaller polygons are too close together because of data frame/layer coordinate system mismatch, and they are being snapped.


2

Do you have an Advanced License? If so, I think you should be able to use the Near or Generate Near Table tool to find the 2 closest pipes to each valve. Then You could join that table back to the Pipes FC based on the FID to bring the diameter fields over.


2

I faced the same problem and it seems that disabling some plugins solves this issue. In my case I disabled TraceEditing and Rectangle Ovals Digitizing, following the discussion here: http://hub.qgis.org/issues/9229



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