Questions tagged [vector-layer]

A vector layer represents geographic data whose features are given by sequences of points. (Contrast with a raster, which is a grid of values.)

Filter by
Sorted by
Tagged with
1
vote
1answer
20 views

OpenLayers: projection of WMS and vector layers

I have two layers in my OpenLayers map, the background in WMS and GeoJSON features in a vector layer, both in ESPG:3006. (And a standard OpenStreetMap background just to see which one of the layers ...
1
vote
0answers
31 views

Use svg file in openlayer to represent a layer

I want to use an SVG file as a source for one of the layers for my map in OpenLayers. The svg file is in a coordinate system such that it overlays my coordinate system of my map. I have tried the code ...
1
vote
2answers
40 views

Realising vector file mapping using QGIS Modeler?

I pretty often get lots of vector files with different column namings. I need to produce a defined vector data file with certain columns. Is it possible to build a model that allows to make a mapping? ...
2
votes
1answer
37 views

Pyqgis Set the field value of a dynamically created vector layer in QGIS 3 before user saves to database

I am quite new to both QGIS and Python. I have inherited a project that needs to be upgraded from using QGIS 2.0 DUFOUR to 3.8 Zanzibar. The way it works is, there is a separate application written ...
4
votes
3answers
66 views

Counting number of polygons inside zone using QGIS?

I've seen a lot of questions about counting the number of points within a polygon but my question is I have 1 vector layer with polygons showing past landslides that have occurred and another 206 ...
1
vote
1answer
25 views

'Unknown exception' when editing vector layers in QGIS [closed]

I keep coming across the unknown exception error message when trying to edit or add to a vector layer. Anyone else come across this problem? Any fixes? I'm currently running QGIS 3.4
0
votes
0answers
18 views

Error when using v.net in GRASS GIS

I'm new to using GRASS GIS and GIS in general. I have a point layer and a line layer which I added on to the layer tree using two .shp files. I need to use v.net tool to create a network by connecting ...
0
votes
1answer
63 views

Error Updating the Attributes value [closed]

The code below is not working: This code doesn't affect the table at all layer = point_layer3 selected_feature = layer.selectedFeatures() print(len(selected_feature)) layer.startEditing() for ...
0
votes
0answers
26 views

Labelling only the selected features with custom text using pyqgis

I want some alternate to this code as this code just labels only the current feature in the loop . FEATURES = point_layer3.selectedFeatures() for f in FEATURES: total = f['parkeer_approx'...
2
votes
0answers
55 views

Changing color of each selected feature based on expression using PyQGIS?

Code below changes the color of all the selected features based on the last condition it satisfied instead of changing the color of the feature which satisfied the condition. for f in FEATURES: ...
0
votes
2answers
44 views

How to transfer POI layer from QGIS to OSMAnd?

I've got a POI layer (vector layer with single-point geometry) in QGIS and would like to import these points to OSMAnd under "My Locations" including the attributes (like name of the point). How can I ...
0
votes
1answer
25 views

Style OpenLayers.Feature.Vector in OpenLayers.Strategy.Cluster()

I'm using the clastering feature in my project. I collect list of points like so: cluster_features.push(new OpenLayers.Feature.Vector( new OpenLayers.Geometry.Point(lon,lat), {heading:deg} )...
2
votes
1answer
97 views

Access geometry.coordinates of sliced vector grid

I am trying to represent LineString GeoJSON as vector tile layer using Leaflet.VectorGrid. But i need to do some interactive by clicking on vector tile layer. but this vector tile layer has came with ...
2
votes
1answer
63 views

Delete points inside a polygon

I am working under QGis 3.4.8 Madeira under Windows 10. I have uploaded two layers on my project. Layer A is a points layer. Layer B is a polygons layer. Some points of layer A are located in the ...
1
vote
0answers
27 views

CRS Options Missing

I'm very new to GIS and am trying to use QGIS 3.4.8 to map some spatial data for a larger project. I've been using OpenStreetMap as my basemap, managed to load in my vector layers and for a few days I ...
2
votes
1answer
57 views

Identifying overlapping lines within layer

I am trying to identify the overlapping lines within a layer that consists of polygons of land parcels. I have already converted my data to lines and exploded those lines. Indeed, I have run a "no ...
3
votes
2answers
53 views

Symbology for traffic direction into and out of city

I'm using QGIS 3.4.7. I have one vector layer with road lines and a second with city polygons (and a third with city centroid points if that is better). I have already used symbologies with arrows to ...
0
votes
1answer
101 views

Use PNG external graphic for vector layer with OpenLayers 5.3

I am currently working on a webmapping project using Mviewer device, linked to OpenLayers 5.3. I am trying to create a new vector layer to locate points, with js. So far, I managed to create a layer ...
0
votes
1answer
130 views

OpenLayers refresh vector source with bbox strategy after map moved

I have a vector layer, in GeoJSON with a Vector source on which I applied the BBOX strategy. I have unique IDs for each feature in the layer and having a look at the network tab in the browser the ...
0
votes
2answers
101 views

Networks plugin missing from QGIS 3.4.7?

I installed the Networks plugin in QGIS 3.4.7 successfully, but it does not appear in the Vector Tab. Can anyone suggest another way to reverse the direction of a vector used in a network (graph)?
0
votes
1answer
226 views

Changing Opacity of Vector layer in Google Earth Engine

While importing a Shp file in Earth Engine, I want to control or change opacity/transparency of the layer. I have gone through almost all read me files, I find nothing. This doesn't work: Map....
-1
votes
1answer
68 views

Summing amount of vector points in area of another vector using Google Earth Engine?

So I have 2 layers each are both vectors and not images. here the link: https://code.earthengine.google.com/e7aec6c9683ed40a959a01a7ed5dd31f I have written some basic code to display the data which ...
0
votes
0answers
18 views

mssql Vectorlayer import have no Coordinatesystem

Hi I'am using QGIS Version 3.4.6. If I add a Vectorlayer out of my mssql database a CRS dialog pops up for choosing a coordinatesystem. Like loading layer without CRS. uri = QgsDataSourceUri() uri....
1
vote
0answers
73 views

PyQGIS overlaying raster image on vector map correctly?

I have some code written in Python using PyQGIS where I am trying to overlay a raster image gridded with coordinates on to a vector shapefile map with the same coordinates. However, when overlaying ...
3
votes
3answers
448 views

Assign a specific color to vector layer based on RGB codes in attribute table

I use QGIS and have a geological map for a large area. I present this after ID codes based on the geology ("Geokartnr" in photo). I want to use international/nation color codes for each rock type, ...
2
votes
0answers
45 views

Identify same entities across time period

I have a few election district boundaries layers across several different elections, and I am trying to ascertain whether/how much the district boundaries have changed over time. They are labeled ...
4
votes
2answers
126 views

Is a PK required for GeoPackage vector layers?

According to geopackage.org's "Getting Started With GeoPackage" guide, features are stored in user-defined data tables. It seems like it says that these tables require a primary key: Other than the ...
1
vote
1answer
49 views

How to set layer transparency QGIS C++ API 2.14?

I want to set transparency for already loaded layer by taking it from canvas QgsVectorLayer *myLayer = mpMapcanvas.layer(0); myLayer.setLayerTransparency(50); myLayer.triggerRepaint(); but get an ...
2
votes
0answers
81 views

Inverting shapefile in QGIS 2.18?

I asked a question earlier about how to invert my file "hydropolys.shp" from a vector of ocean and seas to a vector of land and got sent to here, but I am experiencing issues where using the "...
0
votes
0answers
25 views

How to make the background of an shapefile the vector layer? [duplicate]

So from another question I asked about show raster layer over background, I learned how to duplicate a shapefile and use the inverted polygons tool to make the land the vector layer. I am now ...
2
votes
0answers
107 views

automatically georeference QgsGeometry.fromPoint features on creation

Is there a way to automatically georeference fromPoint features upon creation? I use this layer URI: self.pinLayer = QgsVectorLayer( "Point?crs=epsg:3857&field=id:integer&...
2
votes
1answer
96 views

Making points count automatically when zooming out in QGIS?

Can I make the point count itself when there are too much stacked up points in one area when I zoom out my map? I want my output e.g. Area of ganli points to be like this when i zoom out Water ...
1
vote
1answer
372 views

Loading WFS GeoJSON from Geoserver in Openlayers

I am trying to load a WFS JSON layer into my web map. I am running the web page on a MAMP server. The layers are loaded from Geoserver and from a POSTGIS database. I have 2 WMS layers being loaded ...
0
votes
0answers
95 views

Creating Polygon from groups of points

I have a point feature class (Address Points) and I am interested in creating a polygon feature class around groups of 500 address points. Is there a way I can do this programmatically, as opposed to ...
0
votes
0answers
27 views

QGIS 2.18.12 Add Feature to Vector Layer Problem

I have created a new line vector layer and have attempted to add a linear feature. I finish editing, and the feature is depicted on the map. However, it does not show up in the attribute table. I WAS ...
0
votes
1answer
78 views

OpenLayers VectorLayer from GeoServer wont show up

I have a SQLServer database containing geospatial data, have created layers from those data in GEOServer and it works fine, I'm working on a webgis application to allow users select features on the ...
1
vote
1answer
292 views

Python Scripting in QGIS to add features and select them?

I'm trying to migrate a python plugin I wrote from QGIS 2.18 to QGIS 3.4. In the plugin, I'm creating new vector features and eventually adding them to an existing vector layer. I'm trying to have the ...
4
votes
2answers
396 views

PyQGIS QgsVectorLayer() Loading Invalid Layer in Standalone Python Script?

In my standalone python 3 script, QgsVectorLayer() is loading an invalid layer. When I use the exact same function and inputs in the QGIS GUI python console, the layer loads fine. I am not sure what ...
1
vote
0answers
37 views

QGIS Breaks Vector file when Projected [duplicate]

I am using QGIS3.4 and I am running into an unexpected problem. I have received a gdb file, the file looks fine in WGS 84 projection. But when I use any other, the polygons seems to be cut strangely. ...
2
votes
0answers
76 views

PyQgis How could I open the “identify results” dock using “onSelectionChange()”

Using iface.mapCanvas().selectionChanged.connect(function) I'd like to open the Identify result dock for the selected feature as shown below: it could be manually done by selecting the feature with ...
1
vote
1answer
142 views

Adding new feature in QgsVectorLayer with openFeatureForm leads to segfault?

In a QGIS 2.18 plugin, I'm trying to create new features in an existing vector layer and I want to display the attribute form so the user can fill the attributes data. The geometry is build before ...
1
vote
1answer
36 views

Tracing Intermittently Working in QGIS

I'm trying to cut/create polygons in QGIS 3.2.1 using snapping/tracing, but it only works intermittently - it will follow an existing vector line quite happily for a short distance, then drop it, then ...
1
vote
1answer
107 views

QGIS cannot save to SpatiaLite after vector difference?

In QGIS I have a spatialite DB full of roads. I'd like to do a Difference operation (Vector > Geometry Tools > Difference) with another layer in order to keep roads only available in a given ...
2
votes
0answers
248 views

Copy polygons to another layer with different attribute

I am working in QGIS 3.0.2-Girona. I am digitizing images in which there are rocks that can be encrusted, totally or partially, by algae. I want to have a polygon for the rock and one for the algae. ...
2
votes
0answers
60 views

Insert point layer as input for GRASS viewshed in QGIS 3.2 modeler

I’m building a QGIS (3.2 Bonn) tool for my colleagues using graphical modeler. The tool should get 3 inputs: DEM raster layer, vector layer of points, vector layer of a point of interest (POI). The ...
1
vote
3answers
74 views

Digitizing lots of points and polygons outside GIS software?

I have orthophoto of marine bottom from which I want to extract several informations. This information can be for example position of animals (i.e. a point) or the position/contour of a rock (i.e. a ...
2
votes
0answers
45 views

Seeking National Land Cover Vector Dataset? [closed]

I am looking for a National land cover vector dataset. I tried to work with the National Land Cover Database 2011, downloaded the dataset but it was a picture file.
0
votes
0answers
52 views

Converting from ESRI Shapefile to Aircom Asset data format

I've shapefile contains vector layer of 3D buildings with their Z values. I'm looking for help to convert this file to AIRCOM International’s ENTERPRISE format. The aim is to use converted vector ...
1
vote
1answer
70 views

Extract a line segment out of a polyline on the basis of numeric values (distances) defined as attributes [QGIS]?

I have a set of points (red in the picture) in a shapefile containing an ID as well as two numeric values representing distances in Meters for each point. After creating polylines for each point via ...
2
votes
2answers
2k views

Add a vector GeoJSON layer in OpenLayers 5.1.3

I am trying to add a simple capitals GeoJSON vector layer to my map for basics learning, without managing to get it to work. I spent hours of roaming the documentation API. As follow is my script: ...