Skip to main content

All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
109 views

Performing OSM place search with integrated python console in QGIS

I've been trying to find documentation on how to use the OSM place search plugin with the integrated python console on QGIS and had no success so far. Does anybody know what are the classes/methods ...
rafa's user avatar
  • 23
3 votes
1 answer
141 views

Filter the PyQGIS legend

I performed a selectByExpression on one of my layers and then created a new layer. layer 1 : co, layer 2 : co_temp co.selectByExpression("SECTION=1") co_temp = processing.run("...
mathias mirra's user avatar
0 votes
1 answer
1k views

Using the OpenStreetMap Service in PyQGIS

i am trying to learn how to use OSM Service in QGIS using Python. I wrote this script: import os from osgeo import gdal from qgis.core import QgsRasterLayer, QgsDataSourceUri project = QgsProject....
Sommo's user avatar
  • 53
5 votes
2 answers
1k views

Add .OSM (OpenStreetMap) data to a QGIS project using python

I try to load a .osm file into my QGIS project using python. So I've write this code: import processing from qgis.core import * # Creation of the .osm file, the QuickOSM plugin is needed. bbox = '...
obchardon's user avatar
  • 1,724
4 votes
0 answers
817 views

Add OpenLayers map on map canvas with PyQGIS

I have map canvas with two shapesfiles, and I want to add OSM map behind. My code for this is: from PyQt5.QtGui import * from PyQt5.QtWidgets import QHBoxLayout, QDockWidget, QWidget from osgeo ...
Neven's user avatar
  • 546
2 votes
1 answer
725 views

Importing multiple layer files like NAS/OSM in a standalone PyQgis script

I am trying to convert a dlm50 NAS file of Rheinlandpfalz (Germany) to shapefile. With ogr2ogr this repeadetly converts Polygons to Lines and whole layers are missing. If I import it into QGIS and use ...
gilla's user avatar
  • 329
1 vote
1 answer
1k views

Python code to import OSM data in QGIS

I am trying to automize the workflow: import osm data and select by a special tag. I have to do this steps a lot of time with different parameters and updated data. A Solution could be a python ...
Elke's user avatar
  • 11
4 votes
2 answers
1k views

Set predefined scales in PyQGIS for standalone application

I am trying to figure out how to set the zoom scales to match those meant for OpenStreetMaps and Google Maps, etc., as I am using OSM for a basemap. I've looked all over the internet and can't seem to ...
Alex92's user avatar
  • 461
2 votes
1 answer
583 views

OpenStreetMap heavily pixellated when loaded in QGIS and standalone application

I am loading an OSM street map into an application I am building. I load it as a raster layer via an XML document with the OSM GDAL data. My problem is that the map appears heavily mangled and ...
Alex92's user avatar
  • 461
0 votes
1 answer
72 views

osm2pgsql doesn't run in a QGis plugin

I have a problem with osm2pgsql when it runs in a qgis plugin. The function i use looks like this: osm2pgsql = "osm2pgsql -s -d {databaseName} -U {databaseUser} -H {databaseHost} -E {...
Martin's user avatar
  • 2,918