Hot answers tagged

9

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

Use field calculator (Python) on shape field, e.g.: arcpy.Point(1747952,5907660) If you know coordinates of this point. This is extension of original answer. Create a copy of the layer in table of content and and call it 'points'. Select correct point in 'points. Use field calculator (Python) on shape field for record with missing geometry: def ...


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


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

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


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

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

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


3

You could create two different services. A feature service for all of your editable feature classes and a map service (which is read only) for the non-editable feature classes. You could also look into ownership-based access controls, which will limit access based on the owner of the data.


3

You could define your feature classes in a list, and looop through it and then perform the update cursor on the common fields. Here is some mock code: arcpy.env.workspace = 'C:\Users\cbgibson\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\TEST_WSdata.sde' fcList ['WATERLINES', 'HYDRANTS', 'VALVES', 'AIR_RELEAS'] for fcName in fcList: with ...


3

I was looking for a possibility to delete isolated lines from OSM data, too. Unfortunately, I have a huge amount of data. And having to deal with Network Datasets anyway, I just didnt want to examine Geometric Networks. But using Michaels suggestion worked, thank you very much! I had to change 2 things: First, I had to unsplit the lines in the beginning, so ...


3

For QGIS 2.6: Project Properties: General, Selection Color: Reduce the Opacity:


3

When you have a record but no geometry it's known as a null geometry. The quick fix while in an Edit Session is to select the record/row in question and use the Replace Geometry tool on the Advanced Editing toolbar. This will allow you to create a point to replace the null. It works on points, lines, and polygons, and can replace both null and exisiting ...


3

In QGIS, try Settings -> Options, Digitizing tab: Feature creation [x] Reuse last entered attribute values. This works for newly created objects, but not if you fill in data of already existing objects.


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

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

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.


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

I recommend never editing a shapefile's dbf outside a GIS software, you could risk damaging your GIS file (for example if you delete a line in the dbf). Keep a column with a unique id number in the shapefile and export all the other columns plus a copy of the one with the ID in a table format like dbf, csv, or others QGIS can read. You could even put the ...


2

For C# NetTopologySuite is a great option. It's one of the children of the JavaTopologySuite, father of GEOS, Shapely, JSTS, ffi-geos... and maybe Thorin too. I haven't tested on a real SQL Server database, but you could use it like this: MsSql2008GeometryReader geometryReader = new MsSql2008GeometryReader(); MsSql2008GeometryWriter geometryWriter = new ...


2

There is the "Proportion" tool in the advanced editing toolbar that splits polylines by distance. It requires a standard or advanced license.



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