I have a problem: I need to create a raster with all pixels values = 0, but one of these pixels must have the value = 1. This pixel has especific XY coordinates related to an in situ station.

I need this raster to use as input in a hydrological model. I'm using ArcGis to do this task.

  • Please decide which of QGIS and ArcGIS Desktop you wish to ask about in this particular question. – PolyGeo Mar 4 '19 at 22:19

In either QGIS or ArcGIS, create a point vector layer with your single point at the specific xy location and give it an attribute with the value of 1. Then convert vector to raster, setting the extent and resolution to match your other rasters (important to avoid complication later!). In QGIS and (if my memory servers me) you can specifically set a value to preinitialize the raster to (in your case 0 - but make sure you change NoData to something other than 0!).

| improve this answer | |
  • Thank you. I did this procedure, but as result I had a raster with all pixels values = 1 (same color for all pixels). – Diêgo Araújo Mar 4 '19 at 18:14
  • You must have done something wrong as you should end up with a raster with all values zero and a single point with a value of 1. – MappaGnosis Mar 5 '19 at 15:14

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