0

QGIS version 3.2.1

Windows 10

Project File on GitHub

Shape files on Github


I am trying to create shapefile from coffee cup image.

The actual coffee should be the shapefile.

However I would like the background of shapefile to be original coffeecup.

Here is original coffee image

enter image description here

Here is how I'd wish shapefile to look like (the green polygon has shape properties). Remaining shapefile should have coffee cup and saucer as original image instead of additional polygon.

enter image description here

Both coffee image and created shapefile are the layers. When I unselect coffee image I get this

enter image description here

Perhaps there is a way to merge the image into the shapefile?

closed as unclear what you're asking by aldo_tapia, Vince, Evil Genius, nmtoken, Dan C Aug 15 '18 at 15:33

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Please clarify what you mean by "background of shapefile to be original coffeecup." Do you want to add the coffee cup to the shapefile as an additional polygon? – csk Aug 14 '18 at 16:29
  • @csk Remaining coffee cup should be original image, not additional polygon, – Artie Ladie Aug 14 '18 at 17:23
  • shape-file is as you know a vector-format (poly or line or point), you can "merge" it with a raster (=picture), raster only can be a seperate layer in the background. why not put the (green) poly-shapefile on top of the background-raster? – Kurt Aug 14 '18 at 17:40
  • @Kurt Silly question but how would I "merge" it. I created the raster, selected it along with shape file, saved as new shapefile, but only the polygon appears. Here is updated shapefile, github.com/ArtieLadie/Coffee/tree/master/coffee_merge. Please assist. – Artie Ladie Aug 14 '18 at 17:45
  • @Kurt I see option for Raster > Conversion > Rasterize (Vector to Raster), but it doesn't convert to shapefile – Artie Ladie Aug 14 '18 at 18:02
3

Please read up on the difference between raster and vector data:

What are Raster and Vector data in GIS and when to use?

The image is raster data. The shapefile is vector data. To combine them, first convert them to the same type. Either rasterize the polygon, or polygonize the image.

Once the two files are the same data type, you can combine them. Please refer to the appropriate section of the QGIS manual for further instructions:

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