Questions tagged [features]

Use this tag when asking questions about a representation of a real-world objects on a map.

Filter by
Sorted by
Tagged with
37
votes
6answers
38k views

Difference between map layer and spatial dataset (e.g. feature class, shapefile)?

What is the difference between a feature class and a feature layer? To me they seem very similar in concept.
7
votes
2answers
4k views

Applying categorized symbol to each feature using PyQGIS

I want to apply unique symbol to each feature. I have used following code for doing that from qgis.core import * from PyQt4.QtGui import * # supply path to where is your qgis installed QgsApplication....
14
votes
2answers
16k views

How to change the value of an attribute using QgsFeature in PyQGIS?

I would like to update one attribute of a feature. However, I don't know to update it using the feature object. I have to use data provider to update it. layers = QgsMapLayerRegistry.instance()....
11
votes
4answers
16k views

Get all the points of a polyline

I have some polyline feature objects in python. Now I want to get all the points of polylines. For example, if a polyline has start point [0,0] end point [5,5]. Result: [1,1];[2,2];[3,3];[4,4];[5,5]...
11
votes
4answers
45k views

Cutting features to do opposite of clipping in ArcGIS Desktop? [duplicate]

What´s the easiest/smartest way of getting the opposite output of the clipping tool? I just need the area of feature A1 which is not covered by feature A2 in a new Layer/File. Now, I get the result ...
33
votes
2answers
22k views

Reading feature class in file geodatabase using R?

I have a feature contained in a geodatabase that is larger than 2GB as an exported shapefile. I need to run an extract function in R to attribute the polygons with data from a raster file. Exporting ...
8
votes
2answers
2k views

How to sum up values of overlapping polygons in QGIS?

I have large single layers with many features overlapping. Simplified example with 50% transparency: Where the features overlap I want the attributes added together. I manually created the output ...
9
votes
3answers
28k views

Displaying properties of GeoJSON in popup on Leaflet?

This is my simple GeoJSON with Leaflet map. I want to display properties as popup but I don't know why it is empty. Can you tell me my mistake? <html> <head> <title>A Leaflet map!...
3
votes
1answer
3k views

How to “Merge Selected Features” with python?

I have been looking for the answer to this question for some time now, but can't seem to find it! My problem is straight forward: I have one layer It contains lots of features (only polygons), say ...
4
votes
2answers
2k views

Updating raster value to reflect total number of points within cell using Python?

I have to do a task in Python/ArcPy/GDAL/whatever because I'm trying to automate this process for a hundred or so different raster/shapefile combos. This is what I need to do: I have an empty ...
6
votes
2answers
656 views

Is there a maximum number of features that QGIS can save into a shapefile?

I have a very large .gdb that I want to reduce to my study area. Unfortunately, the study area is still quite big. I could select features that intersected my study area but when I tried Export > ...
4
votes
2answers
6k views

fixing polygons with “ring not closed” errors

I have a shapefile with a single Polygon feature. This feature has a "ring not closed" geometry error (seen here in QGIS): I tried using buffering and the GRASS v.clean command as suggested in other ...
2
votes
2answers
510 views

“Phantom” features showing up in QGIS?

I am using QGIS 2.4 on Windows 8.1. I have a project in which I have been digitizing from OpenMaps. Last night I was doing some more digitizing, saved, and closed the program. When I opened it this ...
2
votes
3answers
999 views

Symbolizing multiple polygons as one by dropping internal boundaries?

Using ArcMap (ArcGIS 10.2 for Desktop), is there a way to symbolize two features within the same feature class as one feature without editing the feature and merging them? For example, if I have a ...
2
votes
1answer
3k views

QGIS identify features button issue

Is there anyway to get the Identify Features button in QGIS to automatically select a layer and provide the information without having to highlight it first in the layers TOC? MapInfo and ArcGIS ...
4
votes
2answers
2k views

IdentifyFeature() use via PyQGIS?

Intent is to have two variables (QgsVectorLayer and feature.id() within said layer) as input for the Identify feature map tool in Qgis (2.6). Wondering if a feature can be selected programmatically (...
3
votes
2answers
8k views

Defining which layer (overlay) is displayed on Leaflet map?

I have 7 layers overlay on a base map, i need to define which layer is selected (active,displayed,shown) on the map. var overlays = { "AL HOUDA Espaces_Verts": alhouda6_layer, "...
5
votes
1answer
3k views

How to create and remove multiple QgsRubberBands in PyQGIS?

Currently the following code-snip works great to highlight a shape based on the 'feature' and 'layer' variables: self.rubberHighlight = QgsRubberBand(self.iface.mapCanvas(),QGis.Polygon) self....
4
votes
1answer
786 views

Getting features in order they are selected using PyQGIS?

Is there a way of establishing the order that a user selected features using QGIS and Python? By example: we have a network of line features representing a road network, and the user defines a route ...
3
votes
2answers
4k views

Delete SDE feature class features with ArcPy

I'm working on a script that will empty my SDE database of all data. How would I go about deleting features from feature classes using ArcPy? I have an SDE connection created with a user that should ...
3
votes
2answers
8k views

Deleting lines in QGIS

I have a layer with several shapes and from here I want to delete the lines. I tryed Toggle editing and Select features by polygon but when closing the polygon, it dissapears. Also I tried to delete ...
2
votes
1answer
803 views

Cutting rectangle set (not squares) into triangles using ArcGIS for Desktop?

I have some large features that I need to split into smaller pieces for terrain alignment through vertices in another program. I figured triangles would be the best solution. So basically I want to ...
7
votes
1answer
22k views

OpenLayers: Get Coordinates of drawn features

Can someone help in finding coordinates of drawn features? I am using this example OpenLayers website. I need to be able to export drawn objects as set of coordinates. Posting the code from the ...
5
votes
2answers
312 views

QGIS renders outlines where none should be

QGIS always renders the borders of a feature polygon. How can I disable this? Even if I set Border style to "No Pen" and the colour is exactly the same for different categories there is a small grey ...
2
votes
2answers
1k views

QGIS equivalent to “Features to Line” ArcGIS tool

I have a python script in Arc10 that uses the features to line tool. I however don't have the license to run it. I was wondering if there is a Qgis tool or process that would essentially do the same ...
1
vote
2answers
813 views

Length of Feature

I have a shapefile which renders a map. I want to calculate and preferably store length of each feature in the shapefile either using QGis or through programmatic means. What is the best way to get ...
0
votes
1answer
2k views

Merge two points of two different polygons to get one polygon at the end

I would like to join points from two different features. I already searched for plugins, but so far but didn't find one working plugin or solution for my task. So here is a picture of 2 polygons/...
27
votes
3answers
67k views

setStyle() function for GeoJSON features - Leaflet

Ok, since I already asked a very long question about this, but since it didn't get any new replies for a while, and not to get confused in details, I will keep this one simple the best way I can. If ...
7
votes
5answers
6k views

Using OpenLayers Selectfeature get mouse position? [closed]

How do I get mouse coordinates after a SelectFeature, which returns the feature by itself?
11
votes
2answers
8k views

How to use label classes, expressions, and annotations?

I've always found that when it comes to python, vector analysis, QGIS gives ArcGIS a run for its money, hell some of the qgis plugins exceed ArcGIS's performance by a few hours; however, I always have ...
13
votes
2answers
12k views

Difference between Copy Features and Feature Class to Feature Class tools?

I have a feature class within a feature dataset in a file geodatabase (FGDB), and I need a copy of it in another FGDB. In ArcGIS 10.1, I've used the "Copy Features" tool, and it looks to be the same (...
10
votes
1answer
868 views

Features in commercial GIS software missing in FOSS GIS?

For example, a program I use (TransCAD) has the ability to do travel time matrices based on minimal data input, which is really useful if you're looking at doing back of the envelope type calculations....
9
votes
1answer
4k views

How to Verify if a FeatureLayer already exists?

I am currently working on a project where when user loads up their map (mxd) into our system, we create several custom featuerlayers for them. My problem is though, I have no idea how to check if I ...
12
votes
3answers
23k views

Exporting multiple featureclasses to shapefiles using ArcGIS Desktop?

I have many feature classes in a geodatabase and I need to save/export them into shapefiles. Any Ideas? Click on every single layer -> export is not a good option, due to the number of feature ...
11
votes
3answers
8k views

What is a non-geographical feature?

When using the term "feature" in GIS, what is often (if not always) meant is a geographical feature which "is a representation of real world phenomenon associated with a location relative to the Earth"...
11
votes
3answers
23k views

Deleting multiple features easily in QGIS

I have a vector layer being rendered in QGIS. I want to delete various features in the layer. I'm currently deleting each node by selecting the node through node tool and then pressing the delete ...
8
votes
2answers
7k views

QGIS select feature, “add to current selection” feature

I am trying to perform a feature selection on qgis similar to "add to current selection" interactive selection method in Arcgis Desktop, is that possible? An example: I perform a spatial query and ...
6
votes
2answers
992 views

What does feature mean in QGIS?

I can't understand the meaning of feature in QGIS QgsFeature class. How it is related to layer and geometry? I have read QGIS documentation but I can't understand what is feature.
4
votes
1answer
544 views

GetFeatureCount gives same result after deleting a feature

This is my code: num1 = layer.GetFeatureCount() layer.DeleteFeature(1) layer.SyncToDisk() num2 = layer.GetFeatureCount() print num1 print num2 For some reason, num1 and num2 are the same number. Why?...
3
votes
3answers
2k views

How can I turn islands into individual features in QGIS?

I have what seems like a pretty straightforward task in QGIS: I have a shapefile that, in some cases, groups multiple separate landmasses into a single feature. For example, the Hawaiian islands are ...
20
votes
2answers
24k views

How to select features containing specific text string using an expression in QGIS

I need to style a survey parcel polygon shapefile, based on whether the polygon is a mineral claim or not. Unfortunately, the only information on whether a polygon is a mineral claim or not is ...
9
votes
2answers
497 views

Quickly browsing of features for the active vector layer?

I often need to view on the canvas the (selected or not) features from the current active vector layer. In this situation, I only need to view something on the canvas, without doing anything on the ...
7
votes
2answers
284 views

Features to stay selected by default in QGIS?

Does anyone know if there's a way to configure QGIS so that when you plot a new feature (i.e. a polygon), it stays selected by default? If I have to select it separately, and it happens to fall on ...
6
votes
2answers
7k views

Merging overlapping line segments in ArcGIS Desktop?

I'm working with fish distribution data, and have combined several 24k habitat maps into a single layer that I'll call "critical habitat" In merging multiple distributions into one dataset, there are ...
6
votes
1answer
243 views

How to store and serve data and its progress over time in GeoServer?

I recently started working with GeoServer and stored some shapefiles. I successfully can retrieve the data as JSON. The data I want to maintain in the database changes over time. I do not want to ...
5
votes
3answers
859 views

Selecting polygons by number of sides

I'm using ArcGIS 10 to build some figures for a journal article. One is a figure of an unstructured finite element mesh of triangles spanning the western Atlantic Ocean. I exported this mesh from ...
4
votes
3answers
17k views

How to select features of visible layers in QGIS

In QGIS 1.8 I used plugin "Select features of visible layers by rectangle" to know the layer that owns a visible feature. In QGIS 2.0.1 this plugin is no more available. I wonder if it is possible to ...
4
votes
1answer
1k views

Merge selected feature pyqgis

I want to merge the selected features. I found this post but I can not do it. Can anybody help me? layer = iface.activeLayer() obj1 = 24 obj2= 25 expr = QgsExpression( " \"ID_PARCEL\" = '{}' OR \"...
4
votes
2answers
2k views

Replicating ArcMap's Point Sketch Geometry Editing (Feature Templates) in ArcObjects

I'm looking for a way to place, select, move, delete features inside a custom C# ArcObjects application (using AxMapControl). I found the exact behavior in ArcMap, but I want to save the user some ...
4
votes
1answer
2k views

How to integrate OpenLayers and ArcGIS Server?

I am using the OpenLayers JavaScript API within a web application. I am displaying non-base layers hosted on an ArcGIS server. When I load the ArcGIS layers, I load them using OpenLayers.Layer....