1

Can not seem to figure out this problem when i am running Clip Raster by Mask Layer function:

> INFO gdalwarp -of GTiff -cutline "C:/Users/user/Downloads/gis files/final 23.05.2020.shp" -cl "final 23.05.2020" -crop_to_cutline crs=EPSG:3857&format&type=xyz&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0 "C:/Users/user/Downloads/gis files/tst.tif" 2020-05-23T18:09:16 INFO GDAL execution console output

         FAILURE: No target filename specified.

         Usage: gdalwarp [--help-general] [--formats]

          [-s_srs srs_def] [-t_srs srs_def] [-to "NAME=VALUE"]* [-novshiftgrid]

          [-order n | -tps | -rpc | -geoloc] [-et err_threshold]

          [-refine_gcps tolerance [minimum_gcps]]

          [-te xmin ymin xmax ymax] [-tr xres yres] [-tap] [-ts width height]

          [-ovr level|AUTO|AUTO-n|NONE] [-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]

          [-srcnodata "value [value...]"] [-dstnodata "value [value...]"] -dstalpha

          [-r resampling_method] [-wm memory_in_mb] [-multi] [-q]

          [-cutline datasource] [-cl layer] [-cwhere expression]

          [-csql statement] [-cblend dist_in_pixels] [-crop_to_cutline]

          [-of format] [-co "NAME=VALUE"]* [-overwrite]

          [-nomd] [-cvmd meta_conflict_value] [-setci] [-oo NAME=VALUE]*

          [-doo NAME=VALUE]*

          srcfile* dstfile



         Available resampling methods:

          near (default), bilinear, cubic, cubicspline, lanczos, average, mode, max, min, med, Q1, Q3.

         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.
  • Not sure if you can consider XYZ tiles as rasters. That's probably why it's not working – Alexandre Neto May 23 at 19:59
  • Isn't the base-map a raster file? Embarrassed. What i am trying to accomplish is the equivalent of "clip to extent" available in arcgis. – rexhepib May 27 at 8:23
  • Wondering if anyone could help on this? Is there another way to make this happen? Basically, i just want the basemap to only show on the background of the area covered by "Komunat_Finale" polygon: ibb.co/j5XKfvw – rexhepib May 28 at 12:57
  • Is this for display purposes only? Duplicate polygon layer and use a inverted polygon renderer on top of the basemap to mask it. – Alexandre Neto May 28 at 13:34
  • @AlexandreNeto Yes, for display purposes only. Could you please elaborate how i can use that feature, or kindly lead me to some guides? – rexhepib May 28 at 13:47
1

Having a vector layer with a polygon, you can use it to visually mask other layers. Open the layer styling panel (F7)

enter image description here

Click the symbol render option.

enter image description here

Select the inverted polygons option. Then choose the make color. In this case I choose white and no stroke. enter image description here

| improve this answer | |
  • Thanks so much @Alexandre Neto! This worked perfectly. – rexhepib Jun 1 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.