Tag Info

Hot answers tagged

8

Without knowing what your data looks like, the general syntax you need to insert into the select by attributes window is: [FIELD_1] IS NULL OR [FIELD_2] IS NULL OR [FIELD_3] IS NULL and so on for as many fields as you have to work with. For reference the full query would be: SELECT * FROM [TABLE_NAME] WHERE [FIELD_1] IS NULL OR [FIELD_2] IS NULL OR ...


8

You can use the Feature Class To Feature Class python snippet. Here is the general syntax. FeatureClassToFeatureClass_conversion (in_features, out_path, out_name, {where_clause}, {field_mapping}, {config_keyword}) To output to a shapefile, make sure that your out_path is a folder (and not pointing within a file geodatabase), and that out_name has a ...


7

Another approach to this would be to use the Spatial Join tool. Use the point as your input feature layer as above and the polygon layer as your identity features.Unlike SelectLayerByLocation, SpatialJoin does honor the extent environment. targetlayer = layername joinlayer=arcpy.PointGeometry(arcpy.Point(x, y)) fieldmappings = arcpy.FieldMappings() ...


7

You can unselect features with unselect and unselectAll methods of SelectFeature control: selectControl = new OpenLayers.Control.SelectFeature(vectorLayer); ... map.addControls([selectControl]); selectControl.activate(); // unselect any specific feature... selectControl.unselect(vectorLayer.features[0]); // ...or all features selectControl.unselectAll(); ...


7

Two possible solutions: You can use the "Vector->Research tools->Select by Location" and tick the "Use selected features only" checkbox. If you want to actually export the points which intersect your selected polygon to a new shapefile then "Vector->Geopressing tools->Intersect" and again tick the "Use only selected features" checkbox. The input layer will ...


7

create a new polygon layer, draw a single polygon that covers all your current polygons, then cut the newly drawn polygon based on all your existing polygons, then select all polygons from you current set that share a line segment with the newly drawn polygon using select by location and you're done ---Edited version much more efficient, based on ...


7

In arcpy, When you implement the Search Cursor or Update Cursor you have the option of using the where_clause parameter, which will allow you to select a specific row based on a field value (e.g. row ID). This help file will show you how to build an appropriate SQL query for selecting a specific row.


6

Use the looping and variable value as shown in Aragon's answer with the FID field (this is the zero-based object ID field for shapefiles) as the select field as shown in L_Holcombe's answer to generate the where clause, and all should be good. To program in the total number of features use the Get Count tool and divide by 10 assigned to the variable. Will ...


5

There doesn't seem to be a way to directly find a feature object's parent layer or whether it's selected from a method in the QgsFeature class. A similar approach to vlayer.selectedFeatures() is to test whether the feat.id() is in vlayer.selectedFeaturesIds(). QgsFeatureIds are not unique values compared with other vector layers, only within their own ...


5

Toolbars are located outside your screen area. You can use Python console to move them on screen. Here is example of moving Navigation Toolbar: qgis.utils.iface.mapNavToolToolBar().move(10,10) Names of other toolbars can be found by this link.


5

The select tool has a "Select by Rectangle" option. (There are also freehand/polygon options if that would be more appropriate.) The node tool is for digitizing. I don't think that's what you want to do here. Then, right-click on the layer in layer list and use "Save selection as ...". This will create a new file with the features you selected. (You can ...


4

I am thinking you could do a spatial join of the points to your buffered polys which will join the attributes of both together, then you can select back the points that have matching ColumnX and ColumnY values.You can do just a Intersect or Identify as well, all three will give you a very similar result to append the attributed from the poly to the point ...


4

You can use enumarete function in python. myList = [] n = 99 for i, v in enumarete(myList): if i == n: print v 'first 100 item' #append your list if i > n and i < (n+2)*2: print v Or you can use this script from SO: def split_list(alist, wanted_parts=1): length = len(alist) return [ alist[i*length // wanted_parts: ...


4

Sorry, your introduction is very unclearto me. You are obviously searching for some "smart" solution, only those python geeks and R-specialists can give you ... Here my "unsmart" approach: Assuming you have fields for the species and date. create a new text field with field calculator, concatenate there the species name and the date, so you will have a ...


4

Unlike Arc you need to have the layer you want to identify highlighted in the table of contents as well as turned on. I think the deselect feature isn't doing anything if you don't currently have any layers selected. Also see this answer: QGIS identify features button issue


4

Use the Summary Statistics tool with the following parameters: Input Table: your point feature class Statistics Field: the address value field. Select MIN as the statistic type from the dropdown list. Case Field: the parcel address field. This will group records according to the Case Field, select the minimum address value and write this value to the new ...


4

You could try the Identity tool, using your line features as the input, and polygons as the identity features: "When the Input Features are lines and the Identity Features are polygons, and the Keep relationships parameter is checked (relationship set to KEEP_RELATIONSHIPS), the output line feature class will have two additional fields, LEFT_poly and ...


3

Perhaps something simple would work? Assuming "gid" is a column with consecutive integers: arcpy.Select_analysis("in_features", "out_features", '"gid" < 400') arcpy.Select_analysis("in_features", "out_features", '"gid" < 800 AND "gid" >= 400') etc. I haven't tried this, but it should work. ArcGIS SQL expression reference: ...


3

you should gieve a try to "mask" plugin: http://plugins.qgis.org/plugins/mask/ You can either select by hand or query your objects. It takes them, dissolve them and create a hole in a square feature that is 4 times larger than select objects. It adds a semi-transparent memory layer to your project. If Memory layer saver plugin is installed, your project ...


3

You could modify selectBox method of SelectFeature control: OpenLayers.Control.SelectFeature.prototype.selectBox = function(position) { if (position instanceof OpenLayers.Bounds) { var minXY = this.map.getLonLatFromPixel( new OpenLayers.Pixel(position.left, position.bottom) ); var maxXY = this.map.getLonLatFromPixel( new ...


3

The problem with your code lies in the logical flow and that you are selecting all the parcel features each time your arcpy.SelectLayerByLocation_management is called. You should re-work your code flow to: First cursor/select each neighborhood feature (within cursor use select by attribute) Select by location using neighbohood selected features to select ...


3

You can do something like this in the query builder--it looks much like what you already have--this is tried on a personal geodabase "backend"--each has its own sql flavor so the file geodabase may be different. The personal geodatabase requires brackets for field names. It is not fool proof, though. In my case here I select top five census tracts by ...


3

There are a few general ways to accomplish this: Use the select features tool (see first figure) Select by attributes manually (Right-click on layer > open attribute table) (highlighted in orange) Search by SQL (highlighted in red)


3

After a feature is selected, it's added to the vector layer's selectedFeatures array (and removed after it's deselected) You can test it in your browser: http://openlayers.org/dev/examples/select-feature.html Draw a polygon Open JS console (i.e. Firebug or Chrome dev tools) Type: var vectorLayer = map.getLayersByName("Vector Layer")[0]; var feature = ...


3

You can do it in several different ways. Assuming you already have a selection, you can add new feature to your selection by: Select them interactivelly with any of the selections tool(Rectangle, Polygon, freehand), pressing "Ctrl" or "cmd" (Like jake already said). Take notice that if you select a already selected feature, it will be unselected; If ...


2

For something like this, your best bet is to start learning Python and let ModelBuilder generate the heart of your Python code for you. Then just add the components that you need to accomplish your task. 1) Start by creating a model in ArcGIS like this: 2) Export it to a Python Script with Model-->Export-->to Script-->Python which will give you the ...


2

If you are using ArcServer 10.1 you could create a Geoprocessing service which references either a model or script that you built to do this. The link above gives step by step instructions on how to create the model, then create the services and finally consume it in your app. Alternatively, there is this sample that uses a query to select records, you ...


2

The thing I miss about polygon coverages is the way you could BUILD them with the LINE option then set up two relates, one for LPOLY# and the other for RPOLY# to find arcs that separate different polygons of interest. As a workaround the code below populates the polyline featureclass being edited with edges from a polygon featureclass which participates in ...


2

From the code supplied in the question it is not possible to see how you can tell that the zoom is not working when you specify the mxd (which is the way I do this) rather than CURRENT. Perhaps include an MXD.save(), MXD.SaveACopy(...), or an arcpy.mapping.ExportToPDF(...) to "trap" the result.


2

Ah, solved it. The mentioned error was the result of my mistake. I didn't specify a layer name with the selectCtrl. Also moving the actual select (thus the click and zoom) function to this selectCtrl gives the desired behaviour: var highlightCtrl= new OpenLayers.Control.SelectFeature( clusters, { hover: true, ...



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