4

I am using QGIS 2.4 (Chugiak) via the kyngchaos build for OS-X. My question is--when using the Rasterize tool to convert a point vector layer to a raster and using the "Raster resolution in map units per pixel" option, how are "map units" defined?

So far as I can tell thus far, "map units" are decimal degrees regardless of other settings. The "Canvas units" setting under Project Properties --> General does not change this. Changing the coordinate system under Project Properties --> CRS does not change this. "Map units" are not dependent on the CRS of the input layer, nor on the CRS of the first layer added to the project. Is decimal degrees the only option and not modifiable in any way, or is there some other setting I have yet to find that defines "map units" in this context?

The reason I am curious is that if you have a point shapefile you wish to rasterize, and that shapefile uses a regular grid that defined in a projected coordinate system (e.g., a grid with points at 1000 m in NAD83 Z13) rather than a geographic coordinate system, there is no "Raster resolution in map units per pixel" that will be appropriate except over rather small areas if decimal degrees are the only map units that can be used. What you want to tell QGIS in this context is "rasterize this vector layer with a pixel size of 1000 m by 1000 m in NAD83 Z13" not "rasterize this vector layer with some pixel size of X by Y degrees". It seems there must be a way to get QGIS to do this, but I have yet to find it.

  • I guess that you can't warp the data with this tool so the units are the ones used in the native data. Reproject the source data physically into your target projection first. – user30184 Aug 6 '14 at 4:57
5

Map units are defined by the source layer's projection. You should check your original source file, confirm that it is actually in UTM (and showing projected coordinates in metres, as in the example below) and not simply set as UTM (which can be done falsely).

Add a point layer: enter image description here

Confirm it's in UTM (also note the displayed coordinates in the above screenshot, '703656,9798666', which are clearly not degrees): enter image description here

Rasterize it - in this case, looking for a 2500x2500m pixel: enter image description here

Output grid is 2500m pixels: enter image description here

  • Well, I'm pretty sure it is giving me "map units" that are not the units of the source layer, but perhaps I screwed up. I'll take another stab. Thanks! – aspidoscelis Aug 7 '14 at 5:11
  • OK, poked at it more, and I'm apparently just being stupid. It's a set of points on a meter-based grid, but the file is not in a meter-based projection. So... that would be the problem. – aspidoscelis Aug 8 '14 at 0:52
  • When you add the layer in QGIS, do you get the option to set the CRS? If not, the *.prj file may be incorrectly set and you can delete it (or edit it manually). – Simbamangu Aug 24 '14 at 7:07

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.