Skip to main content
10 votes

Points not showing on map on QGIS

Look at the layer's order, it is because OpenStreetMap layer is covering everything. Just drag down the OpenStreetMap to the bottom of the layer list. It should fix your problem.
GforGIS's user avatar
  • 3,126
10 votes
Accepted

Hiding/showing layers in legend does not work in QGIS standalone

QgsLayerTreeMapCanvasBridge must be in global scope. But you define bridge in add_legend method's scope. Therefore, variable bridge is gone after add_legend finished. One of the solutions: Add bridge ...
Kadir Şahbaz's user avatar
7 votes
Accepted

Turning off layer visibility in ArcGIS Pro with Python

I expect that your for loop never runs, because there is no layout element that matches your "Layer" wildcard. You should be getting your layers from the map, not from the layout. Use m....
Son of a Beach's user avatar
7 votes

Having layers on top of hillshade in QGIS

Lowering the opacity of your fill colour might be sufficient. Otherwise, you could try changing the layer blending mode to Overlay. With this method, you might need to experiment with the colour to ...
Matt's user avatar
  • 17.4k
6 votes
Accepted

Showing feature count in layer name in QGIS

Here is a PyQGIS solution. QgsVectorLayer inherits a special method called setName() from the QgsMapLayer class. Set the display name of the layer. If it is a one-time action For a single layer : # ...
Taras's user avatar
  • 33.3k
6 votes

Khmer Language is not properly displayed in layer fields in QGIS

Shapefile is an old format with many limitations. One of them is the Unknown character set: There is no way to specify the character set used in the database. Many applications are using the old ...
Babel's user avatar
  • 73.1k
5 votes
Accepted

Set points according to coordinates using QGIS 3

You can use Advanced digitizing tool to lock the coordinates, then place a point anywhere: But if you have many points to place, you can save them in a csv table and add as a delimited text layer. ...
Bera's user avatar
  • 74.7k
5 votes
Accepted

Calculating field with input from two layers in QGIS Graphical Modeler

you can use the fieldcalculator in your model to do the calculation: since your fields have the same name "NUMPOINTS" you can use a prefix for the joind NUMPOINTS field in the JOIN ...
eurojam's user avatar
  • 11.1k
5 votes
Accepted

removeLayer or removeFrom(map) not working on betterwms layer from leaflet map

The problem in your code is that with var camadabairro = requestBairro(nomeBairro); you create a new layer every time check box is checked/unchecked. Solution is to put camadabairro layer variable at ...
TomazicM's user avatar
  • 26.3k
4 votes
Accepted

Side-by-side Leaflet map - How to add an array of layers to show on one side?

Leaflet side-by-side plugin is a bit outdated for newer versions of Leaflet. You can find updated plugin code in the answer to this question: imageOverlay is not working with Leaflet side-by-side. To ...
TomazicM's user avatar
  • 26.3k
4 votes

What is the name given to the table layer in QGIS?

The layer_styles table is used for saving the QGIS styles into a database (for example GeoPackage). The table is hidden when GeoPackage data is added if the "Show system and internal tables" ...
user30184's user avatar
  • 67.3k
3 votes

Removing points outside of polygon but keeping points with the same feature ID using PyQGIS

There are some logic omissions and errors in the posted script. In addition to not including any spatial geometric testing between points and polygons, the ids_within_polygon variable is storing "...
Ben W's user avatar
  • 21.8k
3 votes
Accepted

Test whether layer exists using expression in QGIS

You can use function try() together with any other function that uses a layer's name as argument (e.g. overlay_nearest()): if the layer is not found, the function returns an error. try() returns if ...
Babel's user avatar
  • 73.1k
3 votes

Test whether layer exists using expression in QGIS

You can use is_layer_visible, it should return false if the layer is not visible or if there is no such layer in the project. Example: is_layer_visible('road') add that as the condition in your CASE ...
Dror Bogin's user avatar
  • 3,545
3 votes

Test whether layer exists using expression in QGIS

Create an array of all layer names in a project with variable @layers() (all the map layers in the current project as a list) and function layer_property(), then test if a certain layer name (here: '...
Babel's user avatar
  • 73.1k
3 votes

QGIS - selecting single polygon highlights multiple polygons

You could use Actions: Open the layer properties and navigate to actions Add a new Python action with the following code layer = QgsProject.instance().mapLayer('[%@layer_id%]') field = 'my_field' ...
MrXsquared's user avatar
  • 34.9k
3 votes

Test whether layer exists using expression in QGIS

If the problem is just the discrepance between @layer_id an the layer's name, you can use operator ~ to perform a regular expression match: @layer_id ~ 'point' Or, if it is not just the current layer,...
Babel's user avatar
  • 73.1k
3 votes
Accepted

QGIS Action to "enable" (display) a raster layer that is already loaded

You can use the following code in your Python action script. from qgis.utils import iface project = QgsProject.instance() layer_id = '[%@layer_id%]' fid = [%$id%] layer_obj = QgsProject().instance()....
Ben W's user avatar
  • 21.8k
3 votes

Creating dummy (random) vector layers of different geometry types, with random attributes

Short answer You can create a model to create a point, line and polygon layer at once that have correct geometries and topology. You can download the model from here: https://drive.switch.ch/index.php/...
Babel's user avatar
  • 73.1k
3 votes

Delimited text layer ACLED data base: I can't see all the points

It's because you have 23 locations. If you concatenate the latitude and longitude as text then just count that you get 23 locations and their counts. I show this below. This is creating stacked data ...
Hornbydd's user avatar
  • 43.8k
3 votes
Accepted

How to get the point of highest elevation inside a radius on a raster (PyQGIS)

Here is an example using the QgsZonalStatistics class to find the highest elevation from a DEM within a given distance from the clicked coordinate. Specifically, we can use the calculateStatistics() ...
Ben W's user avatar
  • 21.8k
3 votes

CSV with Coordinates in QGIS

Don't tick the "GMS-Koordinaten" box. Your Latitude/Longitude fields are double precision so almost certainly in decimal degrees, not Degree/Minute/Second (GMS in German?). Also you should ...
HeikkiVesanto's user avatar
3 votes

QGIS: Make larger symbols appear behind smaller symbols from the same layer

This should be possible by enabling the "Symbol Levels". You can activate them in the Layer Symbology in the bottom right corner in the "Advanced" menu. Give the symbols you want ...
nuenueke's user avatar
  • 161
3 votes
Accepted

QGIS: Make larger symbols appear behind smaller symbols from the same layer

You need to go to the "Layer Rendering" section at the bottom of the Layer Styling panel, check the "Control feature rendering order" box and clich on the sorting icon on the right ...
J.R's user avatar
  • 16.6k
3 votes
Accepted

Displaying two different layers in the same coordinate systems in QGIS

The problem seems to be a CRS issue: you probably (wrongly) changed the layer's CRS what you should never do if you're not really 100% sure what you do: see here for details. Whenever a layer does not ...
Babel's user avatar
  • 73.1k
2 votes

Labeling layer with two attributes in QGIS

To get two labels you can use rule based labelling, and do not any filter for each rule, i.e. all features for each. You can style each differently. Label placement is more tricky. A simple option ...
Oisin's user avatar
  • 1,826
2 votes

Setting different symbols for a CSV layer with attribute "Type"

I have created a set of points with a field "type" in the attribute with 2 unique values "Hotel" and "View". Opened the layer property box, selected the Symbology Tab ...
GforGIS's user avatar
  • 3,126
2 votes
Accepted

Changing gradient color of layer polygon on conditions that depends on another layer on QGIS

In QGIS, you can give the polygons a new field based on the values of the points contained within them, then you can use symbology to symbolize. To join the attributes Go to Vector > Data ...
MidPiedmont's user avatar
2 votes
Accepted

Where to find the comment of column in QGIS?

You will find it under Layer Properties → Fields:
ahmadhanb's user avatar
  • 41.1k
2 votes

How to see the size of individual layers in a geopackage

Use the SQLite utility "sqlite3_analyzer https://www.sqlite.org/sqlanalyze.html Usage example and an excerpt of the very comprehensive report showing the data for one data layer. Notice that it ...
user30184's user avatar
  • 67.3k

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