Hi,

See below

On 2020-05-14 3:53 a.m., Priv.-Doz. Dr. Maria Shinoto wrote:
Hi,

it seems that my points are too many. I am waiting for the TIN process to 
finish (needs a few hours it seems), then I will select a part of the point I 
am interested in and go on working on that selection. Then I will try your 
suggestions, thank you.
This will crash if you have too many points. Trust me!
Some other remarks:

You can also correct this 5x5 problem by using gdal grid with Nearest neighbour 
interpolation. You could use the point data to do this.
So the GDAL tools in the processing toolbox?
Yes, use Grid(Nearest neighbor) in the processing toolbox.

I also post a small presentation that can help go from vector to raster with 
point data. Sometimes, keeping it simple is better.

https://smex-ctp.trendmicro.com:443/wis/clicktime/v1/query?url=https%3a%2f%2fwww.slideshare.net%2fshencoop%2fqgis%2draster%2dto%2dpoint&umid=81eb74bc-6e72-4f88-9170-4c7619c9c983&auth=4ff16eacbc1d620fae2da429677ec7b85b28c904-585e8c6c01c6d3b66ea068001e65de5403305b6f
This is the other way round, but I could check that everything went right with 
my .xyz-Data and the creation of the point cloud.
Yes but you could do this with the original raster and it works both ways.
If you do decide to make a shapefile with the csv, make sure to store the 
coordinates in a text field.  Placing the coordinates in a $x and $y object 
fields will lead to rounding.  Any rounding would corrupt the raster therefore 
you need to original coordinates for this to work. This may explain your 
problems also.

If you use the above method of going from raster to vector (or the other way), you cannot change any coordinates (lets call these the CSV xyz).  If you create a shp file with the CSV xyz, you will have some points created from the x an y imported from the csv and the CSV xy become shp xy. Those shp xy coordinates will be rounded or very slightly modified from the original data (we are talking sub milometer). You can recreate the raster if the CSV xyz data stored in a field but you cannot use the shp xy as this data has been modified.  You can however use the Gdal Grid to recreate the grid.

I do not really understand, but I think when I try, I will see what you mean.

I used this method to change the geoids of a thousands of rasters because the 
program I was using was designed to change the z value for texte files only and 
not rasters (NRCAN GPS-H).
Sounds good :-)

I will report tomorrow again, and thanks for taking care,
Maria

In any case, I would try to figure out what errors you have made to have this coordinate shift.  I expect the original data was in Long-Lat.  Having data in longitude and Latitude _will result in rectangular pixels_ when reprojected in meters.  I imagine that the data has been reprojected.

Nicolas

Nicolas Cadieux
Ça va bien aller!

Le 13 mai 2020 à 11:25, chris hermansen <[email protected]> a écrit :


Maria and list,

On Tue, May 12, 2020 at 7:00 PM Priv.-Doz. Dr. Maria Shinoto 
<[email protected]> 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:
        • open the processing toolbox Processing > Toolbox
        • in the toolbox open Interpolation > TIN interpolation
        • in the TIN Interpolation screen:
                • select the Vector layer
                • select the Interpolation attribute
                • click the + to add to the vector layer panel
                • choose the interpolation method - probably best to use cubic
                • click on the ... next to extent and set it to the layer extent
                • set the pixel size to 5.0 and 5.0
                • 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.
_______________________________________________
Qgis-user mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to