[Qgis-user] How can I export Vector & Raster layers together to import into mapshaper

Thayer Young thayeray at yahoo.com
Thu Aug 12 16:57:15 PDT 2021


 Hi Kris,
Your best bet will be to follow the recommendations of the others and figure out how to get rasters to load into Power Bi. This may be better approached by finding a Power Bi community and asking them, because you are likely not the first person to have attempted this.
While you can download the vector data from OSM, it can be quite a challenge to style it to look nice. This is because you have to learn how OSM structures its data, which can be quite a steep learning curve.Polygonizing the OSM tiles will not work, because they are not single band (grayscale) rasters, they are 3 band RGB images. 
If the raster route does not work, something you can try is to use the OSMDownloader plugin in QGIS. The blog post below is one of many sources that show you how to download OSM data as vectors. https://www.geodose.com/2020/08/how-to-download-osm-data-qgis.html
If you use the OSMDownloader plugin and click "load downloaded data" the data will be styled in QGIS similar to what you see on the OSM tiles. You would then be able to open the layer properties for the downloaded OSM points lines and polygons and get an idea of the type of logic you would need to apply to repeat the styling in Power Bi.
-Thayer


    On Thursday, August 12, 2021, 12:45:10 PM EDT, qgis-user-request at lists.osgeo.org <qgis-user-request at lists.osgeo.org> wrote:  From: Kris Lagocki <kris.lagocki at gmail.com>
To: Ben Hur Pintor <bnhr.xyz at gmail.com>
Cc: Richard McDonnell <richard.mcdonnell at opw.ie>,
    "qgis-user at lists.osgeo.org" <qgis-user at lists.osgeo.org>
Subject: Re: [Qgis-user] How can I export Vector & Raster layers
    together to import into mapshaper
Message-ID:
    <CAELc7aCL2fDQxxrkSf2a_aqyOO_UaDcaMT8MUuYX7WJJV0zDow at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

I'm using a shape file that I created and the OpenStreetMap from the XYZ
Tiles in the QGIS app.  Tableau has a lot more capability than Power BI ...

When I export the 2 layers from QGIS, I want one to sit on top of the other
and be one file.  I'm thinking this might not be possible.  I did find a
Raster to Vector conversion in the app but I get an error message when I do
the conversion (Polygonize) on the OpenStreetMap raster layer.  Here's the
log:

QGIS version: 3.20.1-Odense

QGIS code revision: 1c3c5cd6

Qt version: 5.15.2

Python version: 3.9.5

GDAL version: 3.3.1

GEOS version: 3.9.1-CAPI-1.14.2

PROJ version: Rel. 8.1.0, July 1st, 2021

PDAL version: 2.3.0 (git-version: eac774)

Processing algorithm?

Algorithm 'Polygonize (raster to vector)' starting?

Input parameters:

{ 'BAND' : 1, 'EIGHT_CONNECTEDNESS' : False, 'EXTRA' : '', 'FIELD' : 'DN',
'INPUT' : 'crs=EPSG:3857&format&type=xyz&url=
https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0',
'OUTPUT' : 'TEMPORARY_OUTPUT' }


GDAL command:

gdal_polygonize.bat "crs=EPSG:3857&format&type=xyz&url=
https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0"
C:/Users/klagocki/AppData/Local/Temp/processing_zlZPOT/758f871034414b008c7bbbadb636143e/OUTPUT.gpkg
-b 1 -f "GPKG" OUTPUT DN

GDAL command output:

gdal_polygonize [-8] [-nomask] [-mask filename] raster_file [-b band|mask]
[-q] [-f ogr_format] out_file [layer] [fieldname]

Required parameter missing -

The system cannot find the file specified.

'url' is not recognized as an internal or external command,
operable program or batch file.

'zmax' is not recognized as an internal or external command,
operable program or batch file.

'zmin' is not recognized as an internal or external command,
operable program or batch file.

Process returned error code 1

Execution completed in 0.33 seconds

Results:

{'OUTPUT':
'C:/Users/klagocki/AppData/Local/Temp/processing_zlZPOT/758f871034414b008c7bbbadb636143e/OUTPUT.gpkg'}


Loading resulting layers

The following layers were not correctly generated.
?
C:/Users/klagocki/AppData/Local/Temp/processing_zlZPOT/758f871034414b008c7bbbadb636143e/OUTPUT.gpkg
You can check the 'Log Messages Panel' in QGIS main window to find more
information about the execution of the algorithm.


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210812/412c7b4e/attachment.html>


More information about the Qgis-user mailing list