[Qgis-user] vector point grid to raster grid -- pixel size does not work
chris hermansen
clhermansen at gmail.com
Wed May 13 08:25:46 PDT 2020
Maria and list,
On Tue, May 12, 2020 at 7:00 PM Priv.-Doz. Dr. Maria Shinoto <
maria.shinoto at zaw.uni-heidelberg.de> wrote:
> Hi,
>
> Thanks for helping. -- Thanks to you and Chris Hermansen I got a result,
> but it could be better.
>
> For the records, a short explanation:
>
> *****
> Well, I checked the properties, jgd2011 is in Meters, the raster is said
> to be 5m. In the official Japanese viewer, which creates a beautiful raster
> image without white pixels, the pixels are exactly 5m*5m.
>
> Today I tried the export to .xyz since the shapefile looked ugly, and
> after realising that the Japanese xyz is indeed yxz, everything looked
> fine, and I could store it in a Geopackage. But the grid is now 5,276m *
> 6,146m. But it fits well on top of the basemap. The basemap is of the same
> special Japanese GML format, but QGIS could read it all without problem. I
> do not understand why QGIS does not read the point data from the GML
> fille, but that is an aside, I am amazed by what QGIS actually can do.
>
> From the Geopackage I could rasterize. It is as Chris Hermansen said,
> thanks. Unfortunately, I did not get it done from the shapefiles, they
> always looked weird or like nothing, even with identical settings. But the
> geopackages from xyz tiles are fine.
>
> For resolution, I chose georeferenced units as Chris suggested, and since
> the measurement tool got some different length, I put it to 5,276m by
> 6,146m. A 5m by 5m resolution created a weird layer with horizontally
> expanding white pixels.
>
> It seems that tweaking with the resolution might lead to an even better
> result, but for the time being, it is OK as it is.
> *****
>
>
> Upon reflection I think the basic problem here is that the point data
should be interpolated to create a raster if you want a precise 5x5m
resolution.
For this, rather than use the Raster > Rasterize tool, the approach should
be:
1. open the processing toolbox Processing > Toolbox
2. in the toolbox open Interpolation > TIN interpolation
3. in the TIN Interpolation screen:
1. select the Vector layer
2. select the Interpolation attribute
3. click the + to add to the vector layer panel
4. choose the interpolation method - probably best to use cubic
5. click on the ... next to extent and set it to the layer extent
6. set the pixel size to 5.0 and 5.0
7. click Run
This way you won't have the odd sizes you mentioned. This may give you a
smoother surface in the end as well.
--
Chris Hermansen · clhermansen "at" gmail "dot" com
C'est ma façon de parler.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200513/6ac18b3d/attachment.html>
More information about the Qgis-user
mailing list