Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

3
votes
3answers
190 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
43 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
66 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
26 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
70 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
22 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
32 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
46 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
82 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
55 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
19 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
41 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 ...
0
votes
0answers
120 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 ...
2
votes
1answer
74 views

PyQGIS QgsVectorLayer() Loads Invalid Layer in Standalone Python 3 Script

In my standalone python 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 is ...
1
vote
0answers
36 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. ...
1
vote
0answers
53 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
48 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
28 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
68 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
99 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. ...
1
vote
0answers
48 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
69 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
31 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
43 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
58 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 ...
1
vote
2answers
806 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: ...
0
votes
1answer
51 views

QGIS - Moving vector layer relative to world map

I have a shapefiles with coordinates that are supposed to be in EPSG:4326 but seem to be located at a totally wrong place on the planet. I confirm that by adding an osm layer to. Can I somehow move my ...
1
vote
0answers
154 views

Can I stream GeoJSON data in openlayers, using Angular6+

I am using angular 6 and openlayers 5. Angular 6 combined with RxJS can easily create streams. I was thinking to use RxJS streams in order to feed GeoJSON data to ol5 vector layers. Why? Because ...
0
votes
1answer
154 views

Using Vector Tile Maps Offline in a Hybrid App (ArcGIS API for JavaScript)

I will create a hybrid map by using ArcGIS API for Javascript. I want to use my own hosted vector tile basemap as offline. What do you advise? Are there any ways to use ESRI Vector Tile Package (....
1
vote
0answers
66 views

Programmatically created and added vectorlayer can't be edited

I'm trying to create a vector-layer (point, shapefile) and open it in my project. It all works fine but once I try to edit that layer later it doesn't work. addFeatures gives me back false and when I ...
0
votes
1answer
326 views

OpenLayers 4 VectorLayer Feature setStyle makes features disappear

After I have already displayed my map I want to highlight certain features. For starters I am trying to highlight all features like this: public highlightMapFeatures() { this.map.getLayers()....
0
votes
1answer
241 views

QGIS 3.0: Naming layers for saving in GeoPackages programmatically

I have problems to save a vectorlayer at QGIS 3.0 with his original name in a GeoPackage. canvas = qgis.utils.iface.mapCanvas() layer = canvas.currentLayer() writer = QgsVectorFileWriter....
0
votes
0answers
24 views

$length returns text value that cannot be used to sum line lengths within polygon using QGIS?

I am trying to calculate the total length of roads within polygons using QGIS 2.18.15 The roads had no length field so I added one, but it came back as either text or 64-bit. This means I can't use ...
0
votes
1answer
40 views

What vector output can I use in GeoServer to convey geometries, style and metadata?

We've been successfully using GeoServer for a few years to serve raster tiles of objects contained in a database. In order to improve the user experience and performance, I'm looking into switching to ...
2
votes
1answer
43 views

Use LonLat coordinates to perform queries on API

I'm programming a map with OpenLayers (4.6.5) and I use this API : https://adresse.data.gouv.fr/api What I want to do is /reverse/, I want to retrieve coordinates that I'm using in my popup (see my ...
0
votes
1answer
34 views

Lines on SVG export from QGIS are rasterized

I'm working with QGIS 3.0.2-Girona on Windows 7 64bits. I have a lot of roads on a large map (30 x 40 km approximately). I am trying to export them into vectorial format to print a map. However, the ...
0
votes
1answer
154 views

Openlayers 4 WFS & vector select

I want to convert this project for other use from OL2 to OL4 but I can't convert the code and get back a map, http://www.trafficorders.uk/ here the OL2 code: layer = new OpenLayers.Layer.WMS("...
0
votes
0answers
181 views

Missing vector menu of QGIS 3.0 for mcOS Sierra

No vector menu between the voice "plugins" and "raster". I tried to reinstall Python 3.6, GDAL, and QGIS 3.0. Nothing changes. The "processing" plugin is already installed. How can I fix the problem?
0
votes
0answers
80 views

QGIS project in Lizmap showing only points vector layers

I am trying to set up a QGIS project in Lizmap, but the problem is that I can't see polygons or lines vector layers. They appear in the legend; I can zoom on them or use "select by location"; and I ...
0
votes
0answers
54 views

Adding min/max for graduated polar style in QGIS?

I'm working with differences, for displaying I use a graduated polar style and I want to add min/max for vector data. I want as I add the min value 1 and max value 831, and I want if QGIS do the ...
1
vote
1answer
36 views

Non-destructive improvement of vector layer (shapefile) representing a road network?

I have a QGIS project with some vector layers backed by shapefiles. One of these layers contains all the roads, and I would like to "improve" it: It is organized in a way that each vector feature ...
1
vote
1answer
178 views

Drawing point not under mouse cursor

I'm trying to draw on a map using this OpenLayer tutorial. initDrawEvent() { var draw; var source = new VectorSource({ wrapX: false }); var vector = new VectorLayer({ source: source }); ...
1
vote
1answer
49 views

Merging a temperature point layer with a vector layer for statistical analysis in QGIS

I have a point layer with x,y,z coordinates with geothermal temperature data. This data should be related to a given vector layer of political communities. In order to analyse every single community ...
0
votes
0answers
46 views

Extracting data from increasing, multi-concentric buffers around each focal point in a vector layer

I have a dataset (vector layer) with 150 focal points, each of them retaining an observation of several ecological variables (attributes). I want to extract data (sum and average of several variables) ...
0
votes
1answer
200 views

Getting missing buildings from OpenStreetMap (OSM) file into QGIS?

I am trying to build a map with the footprints of the buildings using QGIS. So far, it was straightforward to import OSM file generated by OpenStreetMap, but unfortunately, the map is not complete. ...
1
vote
0answers
33 views

ArcGIS: Get coverage of Polygon A in Polygon B

We have dissemination area (DA) units for a city [Polygon B], and shapefiles of all parks in the city [Polygon A].Polygon A overlaps Polygon B in some areas. We initially wanted to calculate the ...
0
votes
0answers
41 views

Why there is a mismatch of layers in R according to how the plot panel is resized?

Background In R, I have downloaded two datasets using the following commands (slighlty modificed from https://mgimond.github.io/Spatial/point-pattern-analysis-in-r.html): library(maptools) z <- ...
0
votes
1answer
976 views

openlayers 4 cannot add vector source

I'm trying to add a vector layer from vector source , but getting error like this AppComponent.html:1 ERROR TypeError: this.adaptAttributions_ is not a function at Object._ol_source_Source_ (...
4
votes
0answers
100 views

QGIS Import multiple text files at once [duplicate]

I have been needing to import anywhere between a few to 10's of text layers into a project per day for my job. The text files are in a .log format (Space Delimited) The X, Y, and CRS designations ...
2
votes
1answer
67 views

union of two vector layers gives only one layer attributes as output

layer1 layer2 Resultant union LayerIt is giving only one layer as output I have used the following val='layer1' val2='layer2' operation='qgis:union' processing.runalg(operation,val,val2,'result....