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

Kris Lagocki kris.lagocki at gmail.com
Thu Aug 12 09:31:47 PDT 2021


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.

On Thu, Aug 12, 2021 at 12:04 PM Ben Hur Pintor <bnhr.xyz at gmail.com> wrote:

> Hi Kris,
>
> The OpenStreetMap (OSM) raster layer you mentioned, was this a TIFF file
> (something you loaded locally) or was this a basemap loaded as an XYZ tile
> layer (i.e. you loaded the OpenStreetMap tile layer found by default under
> XYZ Tiles in the QGIS browser)? In the case of the latter, it's stored and
> served by a tile server (in this case,
> https://tile.openstreetmap.org/{z}/{x}/{y}.png) and as far as I know you
> can't save XYZ tile layers as raster layers.
>
> I don't use PowerBI but if it supports loading tiled maps, OGC services
> (WMS) via Leaflet or Mapbox, you should be able to add/load the OSM basemap
> layer by using its URL (https://tile.openstreetmap.org/{z}/{x}/{y}.png).
> As far as I can tell, this option is available in similar BI platforms like
> Tableau.
>
> I hope this helps.
>
> All the best,
> Ben Hur
> ---
> *Ben Hur S. Pintor | BNHR <https://bnhr.xyz>*
> bnhr.xyz
> hi at bnhr.xyz
>
>
> *BNHR*
> openness. data. geospatial.
>
>
> On Thu, Aug 12, 2021 at 9:40 PM Kris Lagocki <kris.lagocki at gmail.com>
> wrote:
>
>> My issue seems to be with the raster layer, can't seem to figure out how
>> to have it export together with the vector layer.
>>
>> On Thu, Aug 12, 2021 at 5:27 AM Richard McDonnell <
>> richard.mcdonnell at opw.ie> wrote:
>>
>>> Hi,
>>>
>>> There is a TopoJSON Writer Plugin available for QGIS, you might give
>>> that a try. It should write the vector dataset out as TopoKSON for you.
>>>
>>> Regards,
>>>
>>>
>>> Richard
>>>
>>>
>>>
>>> ——
>>> Richard McDonnell MSc GIS, FME Certified Professional
>>> *FRM Data Management*
>>>
>>> ——
>>> Oifig na nOibreacha Poiblí
>>> Office of Public Works
>>>
>>> Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
>>> Jonathan Swift Street, Trim, Co Meath, C15 NX36
>>> ——
>>> M +353 87 688 5964 T +353 46 942 2409
>>> https://gov.ie/opw
>>>
>>> ——
>>> To send me files larger than 30MB, please use the link below
>>> https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie
>>>
>>> Email Disclaimer:
>>> https://www.gov.ie/en/organisation-information/439daf-email-disclaimer/
>>>
>>> *From:* Qgis-user <qgis-user-bounces at lists.osgeo.org> *On Behalf Of *Kris
>>> Lagocki
>>> *Sent:* 11 August 2021 14:32
>>> *To:* qgis-user at lists.osgeo.org
>>> *Subject:* [Qgis-user] How can I export Vector & Raster layers together
>>> to import into mapshaper
>>>
>>>
>>>
>>> Hi - I created a shape file using QGIS with a US Postal Code shape file
>>> that I found on the Census website and joined it with a data file listing
>>> the Postal Codes and which Sales Territory they belong to.  I added in a
>>> raster layer OpenStreetMap.  I'd like to export both layers together and
>>> import them into mapshaper so that I can export as Topojson.  It has to be
>>> in this format to use within Power BI.  Has anyone accomplished this?  Any
>>> help is appreciated.  Thanks.
>>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210812/67190460/attachment.html>


More information about the Qgis-user mailing list