[Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

Hi,

how to change the backgroundcolor of a georeferenzed raster image?

When a raster image is rotated by qgis after setting all points the
backgroundcolor is black RGB(0,0,0).

Set black to transparent is difficult when there is black text.

regards

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Charles Dixon-Paver
There's not really any way for a GIS system to automatically differentiate
between black background pixels and black data pixels. QGIS supports users
setting custom pixel values to render as transparent pixels, but it's left
up to users to ensure that their data and background values are different.

>From my view, there are a couple of options when it comes to fixing this
issue in your data. One is to use an image processing tool like GIMP or
Photoshop effectively, but that requires retaining the geographic
information and knowing how to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow this workflow in
QGIS:

   - Start a new QGIS project
   - Set all black pixels to transparent in the transparency tab of the
   raster layer properties
   - Digitize a "bounding area" - you can do this with a memory layer
   - Move your vector layer to render underneath the raster
   - Give the vector a simple black symbology
   - Use the "Convert map to raster" tool from the processing toolbox

There are a wide number of variations on that workflow that are possible of
course, but I think that's the easiest to get started.

Regards



On Fri, 1 Oct 2021 at 09:28, L.W.  wrote:

> Hi,
>
> how to change the backgroundcolor of a georeferenzed raster image?
>
> When a raster image is rotated by qgis after setting all points the
> backgroundcolor is black RGB(0,0,0).
>
> Set black to transparent is difficult when there is black text.
>
> regards
>
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

Thanks for answering, but I think this is not the way I want to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the points,
QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data pixels.
QGIS supports users setting custom pixel values to render as
transparent pixels, but it's left up to users to ensure that their
data and background values are different.

From my view, there are a couple of options when it comes to fixing
this issue in your data. One is to use an image processing tool like
GIMP or Photoshop effectively, but that requires retaining the
geographic information and knowing how to reprocess the raster
accordingly.

The simplest solution I'm aware of is probably to follow this workflow
in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency tab of the
raster layer properties
  * Digitize a "bounding area" - you can do this with a memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing toolbox

There are a wide number of variations on that workflow that are
possible of course, but I think that's the easiest to get started.

Regards



On Fri, 1 Oct 2021 at 09:28, L.W. mailto:eagl...@gmx.de>> wrote:

Hi,

how to change the backgroundcolor of a georeferenzed raster image?

When a raster image is rotated by qgis after setting all points the
backgroundcolor is black RGB(0,0,0).

Set black to transparent is difficult when there is black text.

regards

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Charles Dixon-Paver
You can translate pixel values with the raster calculator (available under
the raster menu). Black pixels will have a value of 0,0,0 on RGB bands and
red pixels would have a value of 255,0,0 so it's just a matter of changing
the values accordingly on those bands.

The raster calculator will contain an if expression in the next QGIS
release, but if you're using an existing release you will have to use a bit
of a quirky syntax to achieve that.

So if you select the red band and use an expression similar to ( "Image@1"
=  0 )  *  255 it should work. If you need assistance on raster calculator
syntax gis stack overflow has a large number of Q&A on the topic.

If you need info on a particular pixel value at each band, just use the
identify features tool (it works on rasters too).

Note that the previous statement about the GIS identifying valid data
values from background pixel values still applies to the calculator.


On Fri, 1 Oct 2021 at 10:36, L.W.  wrote:

> Thanks for answering, but I think this is not the way I want to go ...
>
> Or, I do not have written detailed.
>
> I have a raster image e.g. a white rectangle, after setting the points,
> QGIS rotats this image, let's say, by 45 degrees.
>
> The corners of the imported image are now black triangles.
>
> I do want to have e.g. red triangles ...
>
> Regards
>
>
> Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:
>
> There's not really any way for a GIS system to automatically differentiate
> between black background pixels and black data pixels. QGIS supports users
> setting custom pixel values to render as transparent pixels, but it's left
> up to users to ensure that their data and background values are different.
>
> From my view, there are a couple of options when it comes to fixing this
> issue in your data. One is to use an image processing tool like GIMP or
> Photoshop effectively, but that requires retaining the geographic
> information and knowing how to reprocess the raster accordingly.
>
> The simplest solution I'm aware of is probably to follow this workflow in
> QGIS:
>
>- Start a new QGIS project
>- Set all black pixels to transparent in the transparency tab of the
>raster layer properties
>- Digitize a "bounding area" - you can do this with a memory layer
>- Move your vector layer to render underneath the raster
>- Give the vector a simple black symbology
>- Use the "Convert map to raster" tool from the processing toolbox
>
> There are a wide number of variations on that workflow that are possible
> of course, but I think that's the easiest to get started.
>
> Regards
>
>
>
> On Fri, 1 Oct 2021 at 09:28, L.W.  wrote:
>
>> Hi,
>>
>> how to change the backgroundcolor of a georeferenzed raster image?
>>
>> When a raster image is rotated by qgis after setting all points the
>> backgroundcolor is black RGB(0,0,0).
>>
>> Set black to transparent is difficult when there is black text.
>>
>> regards
>>
>> ___
>> Qgis-user mailing list
>> Qgis-user@lists.osgeo.org
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

I think one of us is on the wrong track with what is to be achieved.

I don't want to manipulate the image itself, just the background at the
moment when the raster image (or raster pdf) is converted to a TIF and
georeferenced.

if the rectangle contains black text, as described, this would also be
manipulated after the described manipulation, that's not what I want.

Thank you for your efforts.


Am 01.10.2021 um 10:49 schrieb Charles Dixon-Paver:

You can translate pixel values with the raster calculator (available
under the raster menu). Black pixels will have a value of 0,0,0 on RGB
bands and red pixels would have a value of 255,0,0 so it's just a
matter of changing the values accordingly on those bands.

The raster calculator will contain an if expression in the next QGIS
release, but if you're using an existing release you will have to use
a bit of a quirky syntax to achieve that.

So if you select the red band and use an expression similar to (
"Image@1" =  0 )  *  255 it should work. If you need assistance on
raster calculator syntax gis stack overflow has a large number of Q&A
on the topic.

If you need info on a particular pixel value at each band, just use
the identify features tool (it works on rasters too).

Note that the previous statement about the GIS identifying valid data
values from background pixel values still applies to the calculator.


On Fri, 1 Oct 2021 at 10:36, L.W. mailto:eagl...@gmx.de>> wrote:

Thanks for answering, but I think this is not the way I want to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the
points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data
pixels. QGIS supports users setting custom pixel values to render
as transparent pixels, but it's left up to users to ensure that
their data and background values are different.

From my view, there are a couple of options when it comes to
fixing this issue in your data. One is to use an image processing
tool like GIMP or Photoshop effectively, but that requires
retaining the geographic information and knowing how to reprocess
the raster accordingly.

The simplest solution I'm aware of is probably to follow this
workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency tab
of the raster layer properties
  * Digitize a "bounding area" - you can do this with a memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing toolbox

There are a wide number of variations on that workflow that are
possible of course, but I think that's the easiest to get started.

Regards



On Fri, 1 Oct 2021 at 09:28, L.W. mailto:eagl...@gmx.de>> wrote:

Hi,

how to change the backgroundcolor of a georeferenzed raster
image?

When a raster image is rotated by qgis after setting all
points the
backgroundcolor is black RGB(0,0,0).

Set black to transparent is difficult when there is black text.

regards

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org 
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user

Unsubscribe:
https://lists.osgeo.org/mailman/listinfo/qgis-user


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Roland Spielhofer
Maybe this has to do with this longstanding issue:

https://github.com/qgis/QGIS/issues/23760

 

Regards,

Roland

 
 

Gesendet: Freitag, 01. Oktober 2021 um 11:30 Uhr
Von: "L.W." 
An: "Charles Dixon-Paver" 
Cc: "qgis-user@lists.osgeo.org" 
Betreff: Re: [Qgis-user] Geo Raster Background


I think one of us is on the wrong track with what is to be achieved.

I don't want to manipulate the image itself, just the background at the moment when the raster image (or raster pdf) is converted to a TIF and georeferenced.

if the rectangle contains black text, as described, this would also be manipulated after the described manipulation, that's not what I want.

Thank you for your efforts.

 

Am 01.10.2021 um 10:49 schrieb Charles Dixon-Paver:


You can translate pixel values with the raster calculator (available under the raster menu). Black pixels will have a value of 0,0,0 on RGB bands and red pixels would have a value of 255,0,0 so it's just a matter of changing the values accordingly on those bands.
 

The raster calculator will contain an if _expression_ in the next QGIS release, but if you're using an existing release you will have to use a bit of a quirky syntax to achieve that.

 

So if you select the red band and use an _expression_ similar to ( "Image@1" =  0 )  *  255 it should work. If you need assistance on raster calculator syntax gis stack overflow has a large number of Q&A on the topic.

 

If you need info on a particular pixel value at each band, just use the identify features tool (it works on rasters too).

 

Note that the previous statement about the GIS identifying valid data values from background pixel values still applies to the calculator.

 

 


On Fri, 1 Oct 2021 at 10:36, L.W. <eagl...@gmx.de> wrote:



Thanks for answering, but I think this is not the way I want to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards

 

Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:


There's not really any way for a GIS system to automatically differentiate between black background pixels and black data pixels. QGIS supports users setting custom pixel values to render as transparent pixels, but it's left up to users to ensure that their data and background values are different.

>From my view, there are a couple of options when it comes to fixing this issue in your data. One is to use an image processing tool like GIMP or Photoshop effectively, but that requires retaining the geographic information and knowing how to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow this workflow in QGIS:

	Start a new QGIS project
	Set all black pixels to transparent in the transparency tab of the raster layer properties
	Digitize a "bounding area" - you can do this with a memory layer
	Move your vector layer to render underneath the raster
	Give the vector a simple black symbology
	Use the "Convert map to raster" tool from the processing toolbox


There are a wide number of variations on that workflow that are possible of course, but I think that's the easiest to get started.
 

Regards

 



 
 


On Fri, 1 Oct 2021 at 09:28, L.W. <eagl...@gmx.de> wrote:

Hi,

how to change the backgroundcolor of a georeferenzed raster image?

When a raster image is rotated by qgis after setting all points the
backgroundcolor is black RGB(0,0,0).

Set black to transparent is difficult when there is black text.

regards

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user






___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Nicolas Cadieux
Hi,

Perhaps you can add a file or a screen shot because what you want to do it not 
clear.  An image would help. In your second email, you talk about triangles?  
Did you mean to write rectangles?

Nicolas Cadieux
https://gitlab.com/njacadieux

> Le 1 oct. 2021 à 05:30, L.W.  a écrit :
> 
> 
> I think one of us is on the wrong track with what is to be achieved.
> 
> I don't want to manipulate the image itself, just the background at the 
> moment when the raster image (or raster pdf) is converted to a TIF and 
> georeferenced.
> 
> if the rectangle contains black text, as described, this would also be 
> manipulated after the described manipulation, that's not what I want.
> 
> Thank you for your efforts.
> 
> 
> 
> Am 01.10.2021 um 10:49 schrieb Charles Dixon-Paver:
>> You can translate pixel values with the raster calculator (available under 
>> the raster menu). Black pixels will have a value of 0,0,0 on RGB bands and 
>> red pixels would have a value of 255,0,0 so it's just a matter of changing 
>> the values accordingly on those bands.
>> 
>> The raster calculator will contain an if expression in the next QGIS 
>> release, but if you're using an existing release you will have to use a bit 
>> of a quirky syntax to achieve that.
>> 
>> So if you select the red band and use an expression similar to ( "Image@1" = 
>>  0 )  *  255 it should work. If you need assistance on raster calculator 
>> syntax gis stack overflow has a large number of Q&A on the topic.
>> 
>> If you need info on a particular pixel value at each band, just use the 
>> identify features tool (it works on rasters too).
>> 
>> Note that the previous statement about the GIS identifying valid data values 
>> from background pixel values still applies to the calculator.
>> 
>> 
>> On Fri, 1 Oct 2021 at 10:36, L.W.  wrote:
>>> Thanks for answering, but I think this is not the way I want to go ...
>>> 
>>> Or, I do not have written detailed.
>>> 
>>> I have a raster image e.g. a white rectangle, after setting the points, 
>>> QGIS rotats this image, let's say, by 45 degrees.
>>> 
>>> The corners of the imported image are now black triangles.
>>> 
>>> I do want to have e.g. red triangles ...
>>> 
>>> Regards
>>> 
>>> 
>>> 
>>> Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:
 There's not really any way for a GIS system to automatically differentiate 
 between black background pixels and black data pixels. QGIS supports users 
 setting custom pixel values to render as transparent pixels, but it's left 
 up to users to ensure that their data and background values are different.
 
 From my view, there are a couple of options when it comes to fixing this 
 issue in your data. One is to use an image processing tool like GIMP or 
 Photoshop effectively, but that requires retaining the geographic 
 information and knowing how to reprocess the raster accordingly.
 
 The simplest solution I'm aware of is probably to follow this workflow in 
 QGIS:
 Start a new QGIS project
 Set all black pixels to transparent in the transparency tab of the raster 
 layer properties
 Digitize a "bounding area" - you can do this with a memory layer
 Move your vector layer to render underneath the raster
 Give the vector a simple black symbology
 Use the "Convert map to raster" tool from the processing toolbox
 There are a wide number of variations on that workflow that are possible 
 of course, but I think that's the easiest to get started.
 
 Regards
 
 
 
 On Fri, 1 Oct 2021 at 09:28, L.W.  wrote:
> Hi,
> 
> how to change the backgroundcolor of a georeferenzed raster image?
> 
> When a raster image is rotated by qgis after setting all points the
> backgroundcolor is black RGB(0,0,0).
> 
> Set black to transparent is difficult when there is black text.
> 
> regards
> 
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

yes, maybe to orange, a color that is not in the original image, so I
can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original image, eg,
the "triangles" resulting from rotation, treated as no data? Wouldn't
this issue be resolved by setting the no data value to something other
than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the
points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data pixels.
QGIS supports users setting custom pixel values to render as
transparent pixels, but it's left up to users to ensure that their
data and background values are different.

From my view, there are a couple of options when it comes to fixing
this issue in your data. One is to use an image processing tool like
GIMP or Photoshop effectively, but that requires retaining the
geographic information and knowing how to reprocess the raster
accordingly.

The simplest solution I'm aware of is probably to follow this
workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency tab of
the raster layer properties
  * Digitize a "bounding area" - you can do this with a memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing toolbox

There are a wide number of variations on that workflow that are
possible of course, but I think that's the easiest to get started.


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread David Strip

  
  
When georeferencing, aren't the areas
  outside the original image, eg, the "triangles" resulting from
  rotation, treated as no data? Wouldn't this issue be resolved by
  setting the no data value to something other than black?
  Just guessing here, obviously.
  
  
  On 10/1/2021 2:36 AM, L.W. wrote:


  Thanks for answering, but I think this is not the way I want to
go ...
  Or, I do not have written detailed.
  
  I have a raster image e.g. a white rectangle, after setting the
points, QGIS rotats this image, let's say, by 45 degrees.
  The corners of the imported image are now black triangles.
  I do want to have e.g. red triangles ...
  Regards
  
  
  
  Am 01.10.2021 um 09:50 schrieb
Charles Dixon-Paver:
  
  

There's not really any way for a GIS system to
  automatically differentiate between black background pixels
  and black data pixels. QGIS supports users setting custom
  pixel values to render as transparent pixels, but it's left up
  to users to ensure that their data and background values are
  different.
  
  From my view, there are a couple of options when it comes to
  fixing this issue in your data. One is to use an image
  processing tool like GIMP or Photoshop effectively, but that
  requires retaining the geographic information and knowing how
  to reprocess the raster accordingly.
  
  The simplest solution I'm aware of is probably to follow this
  workflow in QGIS:
  
Start a new QGIS project
Set all black pixels to transparent in the transparency
  tab of the raster layer properties
Digitize a "bounding area" - you can do this with a
  memory layer
Move your vector layer to render underneath the raster
Give the vector a simple black symbology
Use the "Convert map to raster" tool from the processing
  toolbox
  
  There are a wide number of variations on that workflow
that are possible of course, but I think that's the easiest
to get started.

  


  

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Charles Dixon-Paver
I just loaded an unreferenced png with black content into qgis, then set
the nodata value to 9, then did a fake georeference with arbitrary
coordinates, and the result seemed to be rotated without any background
pixels. Using 3.20 on Windows. The geoereferencer has a checkbox for
setting nodata to 0, so uncheck that first. Otherwise, if you're still
unable to get the "triangles" to change, my previous messages should still
apply.

On Fri, 1 Oct 2021 at 18:27, L.W.  wrote:

> yes, maybe to orange, a color that is not in the original image, so I can
> do this color transparent.
>
>
> Am 01.10.2021 um 18:25 schrieb David Strip:
>
> When georeferencing, aren't the areas outside the original image, eg, the
> "triangles" resulting from rotation, treated as no data? Wouldn't this
> issue be resolved by setting the no data value to something other than
> black?
> Just guessing here, obviously.
>
>
> On 10/1/2021 2:36 AM, L.W. wrote:
>
> Thanks for answering, but I think this is not the way I want to go ...
>
> Or, I do not have written detailed.
>
> I have a raster image e.g. a white rectangle, after setting the points,
> QGIS rotats this image, let's say, by 45 degrees.
>
> The corners of the imported image are now black triangles.
>
> I do want to have e.g. red triangles ...
>
> Regards
>
>
> Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:
>
> There's not really any way for a GIS system to automatically differentiate
> between black background pixels and black data pixels. QGIS supports users
> setting custom pixel values to render as transparent pixels, but it's left
> up to users to ensure that their data and background values are different.
>
> From my view, there are a couple of options when it comes to fixing this
> issue in your data. One is to use an image processing tool like GIMP or
> Photoshop effectively, but that requires retaining the geographic
> information and knowing how to reprocess the raster accordingly.
>
> The simplest solution I'm aware of is probably to follow this workflow in
> QGIS:
>
>- Start a new QGIS project
>- Set all black pixels to transparent in the transparency tab of the
>raster layer properties
>- Digitize a "bounding area" - you can do this with a memory layer
>- Move your vector layer to render underneath the raster
>- Give the vector a simple black symbology
>- Use the "Convert map to raster" tool from the processing toolbox
>
> There are a wide number of variations on that workflow that are possible
> of course, but I think that's the easiest to get started.
>
>
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

Hi,

nope this isn't what I want ... it is the same as setting transparent
color manually.

I am using PDF and TIF for georeferencing.

Regards

Without no-data-0 or transparent-color:

Set transparent-color to 0,0,0 or use no-data-0:


Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:

I just loaded an unreferenced png with black content into qgis, then
set the nodata value to 9, then did a fake georeference with
arbitrary coordinates, and the result seemed to be rotated without any
background pixels. Using 3.20 on Windows. The geoereferencer has a
checkbox for setting nodata to 0, so uncheck that first. Otherwise, if
you're still unable to get the "triangles" to change, my previous
messages should still apply.

On Fri, 1 Oct 2021 at 18:27, L.W. mailto:eagl...@gmx.de>> wrote:

yes, maybe to orange, a color that is not in the original image,
so I can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original image,
eg, the "triangles" resulting from rotation, treated as no data?
Wouldn't this issue be resolved by setting the no data value to
something other than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want to
go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the
points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data
pixels. QGIS supports users setting custom pixel values to
render as transparent pixels, but it's left up to users to
ensure that their data and background values are different.

From my view, there are a couple of options when it comes to
fixing this issue in your data. One is to use an image
processing tool like GIMP or Photoshop effectively, but that
requires retaining the geographic information and knowing how
to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow this
workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency tab
of the raster layer properties
  * Digitize a "bounding area" - you can do this with a memory
layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing
toolbox

There are a wide number of variations on that workflow that are
possible of course, but I think that's the easiest to get started.


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Nicolas Cadieux

Hi,

Start by setting the nodata value in the input raster. 
(raster/conversion/translate/Assign a specific nodata value to output 
bands).  Make sure you select a data type that allows your nodata 
value.  For example, if you select Byte - Eight bit unsigned integer, 
and a no data value of *-999*, -999 does not exist in that data type so 
the nodata values will be 0 therefore affecting all black pixels in the 
image.  Select something like int16 of float32... and a no data value of 
-999 for the test.  Load the new raster and in the layer properties, 
make sure you have been successful changing the nodata values.


Then, when georeferencing, make sure you *DO NOT select "Use 0 for 
transparency when needed".*  The nodata from the georefrenced file will 
be taken from the original file (-999). Therefore, pixels with the value 
0 in the image will not be affected.


Nicolas


On 2021-10-01 2:33 p.m., L.W. wrote:


Hi,

nope this isn't what I want ... it is the same as setting transparent 
color manually.


I am using PDF and TIF for georeferencing.

Regards

Without no-data-0 or transparent-color:

Set transparent-color to 0,0,0 or use no-data-0:


Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:
I just loaded an unreferenced png with black content into qgis, then 
set the nodata value to 9, then did a fake georeference with 
arbitrary coordinates, and the result seemed to be rotated without 
any background pixels. Using 3.20 on Windows. The geoereferencer has 
a checkbox for setting nodata to 0, so uncheck that first. Otherwise, 
if you're still unable to get the "triangles" to change, my previous 
messages should still apply.


On Fri, 1 Oct 2021 at 18:27, L.W. > wrote:


yes, maybe to orange, a color that is not in the original image,
so I can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original
image, eg, the "triangles" resulting from rotation, treated as
no data? Wouldn't this issue be resolved by setting the no data
value to something other than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want to
go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting the
points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data
pixels. QGIS supports users setting custom pixel values to
render as transparent pixels, but it's left up to users to
ensure that their data and background values are different.

From my view, there are a couple of options when it comes to
fixing this issue in your data. One is to use an image
processing tool like GIMP or Photoshop effectively, but that
requires retaining the geographic information and knowing how
to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow this
workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency
tab of the raster layer properties
  * Digitize a "bounding area" - you can do this with a memory
layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing
toolbox

There are a wide number of variations on that workflow that
are possible of course, but I think that's the easiest to get
started.




___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


--
Nicolas Cadieux
https://gitlab.com/njacadieux

___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

sounds like rocketscience ... for a simple task to set the
background-color ...

may be I am searching the web where I have to place my feature request
for this ...


Am 01.10.2021 um 21:39 schrieb Nicolas Cadieux:


Hi,

Start by setting the nodata value in the input raster.
(raster/conversion/translate/Assign a specific nodata value to output
bands).  Make sure you select a data type that allows your nodata
value.  For example, if you select Byte - Eight bit unsigned integer,
and a no data value of *-999*, -999 does not exist in that data type
so the nodata values will be 0 therefore affecting all black pixels in
the image. Select something like int16 of float32... and a no data
value of -999 for the test.  Load the new raster and in the layer
properties, make sure you have been successful changing the nodata values.

Then, when georeferencing, make sure you *DO NOT select "Use 0 for
transparency when needed".* The nodata from the georefrenced file will
be taken from the original file (-999).  Therefore, pixels with the
value 0 in the image will not be affected.

Nicolas


On 2021-10-01 2:33 p.m., L.W. wrote:


Hi,

nope this isn't what I want ... it is the same as setting transparent
color manually.

I am using PDF and TIF for georeferencing.

Regards

Without no-data-0 or transparent-color:

Set transparent-color to 0,0,0 or use no-data-0:


Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:

I just loaded an unreferenced png with black content into qgis, then
set the nodata value to 9, then did a fake georeference with
arbitrary coordinates, and the result seemed to be rotated without
any background pixels. Using 3.20 on Windows. The geoereferencer has
a checkbox for setting nodata to 0, so uncheck that first.
Otherwise, if you're still unable to get the "triangles" to change,
my previous messages should still apply.

On Fri, 1 Oct 2021 at 18:27, L.W. mailto:eagl...@gmx.de>> wrote:

yes, maybe to orange, a color that is not in the original image,
so I can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original
image, eg, the "triangles" resulting from rotation, treated as
no data? Wouldn't this issue be resolved by setting the no data
value to something other than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want
to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting
the points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data
pixels. QGIS supports users setting custom pixel values to
render as transparent pixels, but it's left up to users to
ensure that their data and background values are different.

From my view, there are a couple of options when it comes to
fixing this issue in your data. One is to use an image
processing tool like GIMP or Photoshop effectively, but that
requires retaining the geographic information and knowing how
to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow this
workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency
tab of the raster layer properties
  * Digitize a "bounding area" - you can do this with a
memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing
toolbox

There are a wide number of variations on that workflow that
are possible of course, but I think that's the easiest to get
started.




___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-user

--
Nicolas Cadieux
https://gitlab.com/njacadieux
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Nicolas Cadieux

Hi,

It's quite simple, you just need to set the nodata value (what you call 
the background-color) in the original file and then save it.  The 
complication is that this requires that the datatype for the file 
accepts the no data value. This part is harder to figure out for your 
not used to dealing with datatypes.   Perhaps, what should be asked for 
is a check to see if the nodata in the translate tool check in  
compatibility with the datatype format. Another possibility is to allow 
for setting the nodata value (other than zero) in the Georeferencer tool 
(for both the input file and the output file).


Nicolas

On 2021-10-01 4:04 p.m., L.W. wrote:


sounds like rocketscience ... for a simple task to set the 
background-color ...


may be I am searching the web where I have to place my feature request 
for this ...



Am 01.10.2021 um 21:39 schrieb Nicolas Cadieux:


Hi,

Start by setting the nodata value in the input raster. 
(raster/conversion/translate/Assign a specific nodata value to output 
bands).  Make sure you select a data type that allows your nodata 
value.  For example, if you select Byte - Eight bit unsigned integer, 
and a no data value of *-999*, -999 does not exist in that data type 
so the nodata values will be 0 therefore affecting all black pixels 
in the image.  Select something like int16 of float32... and a no 
data value of -999 for the test.  Load the new raster and in the 
layer properties, make sure you have been successful changing the 
nodata values.


Then, when georeferencing, make sure you *DO NOT select "Use 0 for 
transparency when needed".*  The nodata from the georefrenced file 
will be taken from the original file (-999).  Therefore, pixels with 
the value 0 in the image will not be affected.


Nicolas


On 2021-10-01 2:33 p.m., L.W. wrote:


Hi,

nope this isn't what I want ... it is the same as setting 
transparent color manually.


I am using PDF and TIF for georeferencing.

Regards

Without no-data-0 or transparent-color:

Set transparent-color to 0,0,0 or use no-data-0:


Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:
I just loaded an unreferenced png with black content into qgis, 
then set the nodata value to 9, then did a fake georeference 
with arbitrary coordinates, and the result seemed to be rotated 
without any background pixels. Using 3.20 on Windows. The 
geoereferencer has a checkbox for setting nodata to 0, so uncheck 
that first. Otherwise, if you're still unable to get the 
"triangles" to change, my previous messages should still apply.


On Fri, 1 Oct 2021 at 18:27, L.W. > wrote:


yes, maybe to orange, a color that is not in the original
image, so I can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original
image, eg, the "triangles" resulting from rotation, treated as
no data? Wouldn't this issue be resolved by setting the no
data value to something other than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want
to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting
the points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to automatically
differentiate between black background pixels and black data
pixels. QGIS supports users setting custom pixel values to
render as transparent pixels, but it's left up to users to
ensure that their data and background values are different.

From my view, there are a couple of options when it comes to
fixing this issue in your data. One is to use an image
processing tool like GIMP or Photoshop effectively, but that
requires retaining the geographic information and knowing
how to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow
this workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency
tab of the raster layer properties
  * Digitize a "bounding area" - you can do this with a
memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the processing
toolbox

There are a wide number of variations on that workflow that
are possible of course, but I think that's the easiest to
get started.




___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info:https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe:https://lists.osgeo.org/mailm

Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread Gabriel De Luca
 Hi, I usually do a brief adjustment on pixel values prior to
georeferencing, to make sure that no pixel has the value I need to assign
to nodata.

Depending on the source dataset, I usually try to replace the zeros with
ones, and reserve the zero for nodata.

El vie, 1 de oct. de 2021 a la(s) 15:34, L.W. (eagl...@gmx.de) escribió:

> Hi,
>
> nope this isn't what I want ... it is the same as setting transparent
> color manually.
>
> I am using PDF and TIF for georeferencing.
>
> Regards
>
> Without no-data-0 or transparent-color:
>
> Set transparent-color to 0,0,0 or use no-data-0:
>
>
> Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:
>
> I just loaded an unreferenced png with black content into qgis, then set
> the nodata value to 9, then did a fake georeference with arbitrary
> coordinates, and the result seemed to be rotated without any background
> pixels. Using 3.20 on Windows. The geoereferencer has a checkbox for
> setting nodata to 0, so uncheck that first. Otherwise, if you're still
> unable to get the "triangles" to change, my previous messages should still
> apply.
>
> On Fri, 1 Oct 2021 at 18:27, L.W.  wrote:
>
>> yes, maybe to orange, a color that is not in the original image, so I can
>> do this color transparent.
>>
>>
>> Am 01.10.2021 um 18:25 schrieb David Strip:
>>
>> When georeferencing, aren't the areas outside the original image, eg, the
>> "triangles" resulting from rotation, treated as no data? Wouldn't this
>> issue be resolved by setting the no data value to something other than
>> black?
>> Just guessing here, obviously.
>>
>>
>> On 10/1/2021 2:36 AM, L.W. wrote:
>>
>> Thanks for answering, but I think this is not the way I want to go ...
>>
>> Or, I do not have written detailed.
>>
>> I have a raster image e.g. a white rectangle, after setting the points,
>> QGIS rotats this image, let's say, by 45 degrees.
>>
>> The corners of the imported image are now black triangles.
>>
>> I do want to have e.g. red triangles ...
>>
>> Regards
>>
>>
>> Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:
>>
>> There's not really any way for a GIS system to automatically
>> differentiate between black background pixels and black data pixels. QGIS
>> supports users setting custom pixel values to render as transparent pixels,
>> but it's left up to users to ensure that their data and background values
>> are different.
>>
>> From my view, there are a couple of options when it comes to fixing this
>> issue in your data. One is to use an image processing tool like GIMP or
>> Photoshop effectively, but that requires retaining the geographic
>> information and knowing how to reprocess the raster accordingly.
>>
>> The simplest solution I'm aware of is probably to follow this workflow in
>> QGIS:
>>
>>- Start a new QGIS project
>>- Set all black pixels to transparent in the transparency tab of the
>>raster layer properties
>>- Digitize a "bounding area" - you can do this with a memory layer
>>- Move your vector layer to render underneath the raster
>>- Give the vector a simple black symbology
>>- Use the "Convert map to raster" tool from the processing toolbox
>>
>> There are a wide number of variations on that workflow that are possible
>> of course, but I think that's the easiest to get started.
>>
>>
>> ___
> Qgis-user mailing list
> Qgis-user@lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Geo Raster Background

2021-10-01 Thread L.W.

I use PDF as well, there you can not save a background-color or
something like that.

This should be better an option in QGIS to "set the colors of the black
recangles" ;-)

thanks all.


Am 01.10.2021 um 23:19 schrieb Nicolas Cadieux:


Hi,

It's quite simple, you just need to set the nodata value (what you
call the background-color) in the original file and then save it.  The
complication is that this requires that the datatype for the file
accepts the no data value. This part is harder to figure out for your
not used to dealing with datatypes.   Perhaps, what should be asked
for is a check to see if the nodata in the translate tool check in 
compatibility with the datatype format. Another possibility is to
allow for setting the nodata value (other than zero) in the
Georeferencer tool (for both the input file and the output file).

Nicolas

On 2021-10-01 4:04 p.m., L.W. wrote:


sounds like rocketscience ... for a simple task to set the
background-color ...

may be I am searching the web where I have to place my feature
request for this ...


Am 01.10.2021 um 21:39 schrieb Nicolas Cadieux:


Hi,

Start by setting the nodata value in the input raster.
(raster/conversion/translate/Assign a specific nodata value to
output bands).  Make sure you select a data type that allows your
nodata value.  For example, if you select Byte - Eight bit unsigned
integer, and a no data value of *-999*, -999 does not exist in that
data type so the nodata values will be 0 therefore affecting all
black pixels in the image.  Select something like int16 of
float32... and a no data value of -999 for the test.  Load the new
raster and in the layer properties, make sure you have been
successful changing the nodata values.

Then, when georeferencing, make sure you *DO NOT select "Use 0 for
transparency when needed".*  The nodata from the georefrenced file
will be taken from the original file (-999).  Therefore, pixels with
the value 0 in the image will not be affected.

Nicolas


On 2021-10-01 2:33 p.m., L.W. wrote:


Hi,

nope this isn't what I want ... it is the same as setting
transparent color manually.

I am using PDF and TIF for georeferencing.

Regards

Without no-data-0 or transparent-color:

Set transparent-color to 0,0,0 or use no-data-0:


Am 01.10.2021 um 19:26 schrieb Charles Dixon-Paver:

I just loaded an unreferenced png with black content into qgis,
then set the nodata value to 9, then did a fake georeference
with arbitrary coordinates, and the result seemed to be rotated
without any background pixels. Using 3.20 on Windows. The
geoereferencer has a checkbox for setting nodata to 0, so uncheck
that first. Otherwise, if you're still unable to get the
"triangles" to change, my previous messages should still apply.

On Fri, 1 Oct 2021 at 18:27, L.W. mailto:eagl...@gmx.de>> wrote:

yes, maybe to orange, a color that is not in the original
image, so I can do this color transparent.


Am 01.10.2021 um 18:25 schrieb David Strip:

When georeferencing, aren't the areas outside the original
image, eg, the "triangles" resulting from rotation, treated
as no data? Wouldn't this issue be resolved by setting the no
data value to something other than black?
Just guessing here, obviously.


On 10/1/2021 2:36 AM, L.W. wrote:


Thanks for answering, but I think this is not the way I want
to go ...

Or, I do not have written detailed.

I have a raster image e.g. a white rectangle, after setting
the points, QGIS rotats this image, let's say, by 45 degrees.

The corners of the imported image are now black triangles.

I do want to have e.g. red triangles ...

Regards


Am 01.10.2021 um 09:50 schrieb Charles Dixon-Paver:

There's not really any way for a GIS system to
automatically differentiate between black background pixels
and black data pixels. QGIS supports users setting custom
pixel values to render as transparent pixels, but it's left
up to users to ensure that their data and background values
are different.

From my view, there are a couple of options when it comes
to fixing this issue in your data. One is to use an image
processing tool like GIMP or Photoshop effectively, but
that requires retaining the geographic information and
knowing how to reprocess the raster accordingly.

The simplest solution I'm aware of is probably to follow
this workflow in QGIS:

  * Start a new QGIS project
  * Set all black pixels to transparent in the transparency
tab of the raster layer properties
  * Digitize a "bounding area" - you can do this with a
memory layer
  * Move your vector layer to render underneath the raster
  * Give the vector a simple black symbology
  * Use the "Convert map to raster" tool from the
processing toolbox

There are a wide number of variations on that workflow that
are possible of course, but I think that's the easiest to
get started