<div dir="ltr"><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello List,<div><br clear="all"><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"></div>I have a CSV-file with sensor data and GPS coordinates in WGS84.</div><div>I convert these GPS coordinates to a projected projection. Mostly a UTM zone, depending on the location.</div><div>These X and Y values are added to the CSV-file and saved with a different name.</div><div>Then I create a VRT-file to get the proper Z-column:</div><div><font face="monospace"><OGRVRTDataSource><br>    <OGRVRTLayer name="01 field data-EPSG32634"><br>        <SrcDataSource>01 field data-EPSG32634.csv</SrcDataSource><br>        <GeometryType>wkbPoint</GeometryType><br>        <GeometryField encoding="PointFromColumns" x="X" y="Y" z="Countrate"/><br>    </OGRVRTLayer><br></OGRVRTDataSource></font><br></div><div><br></div><div>This VRT file is sent to Gdal_grid to create a tiff-file using these arguments:</div><div><font face="monospace">-a invdist:power=2:</font></div><div><font face="monospace">   smoothing=20:</font></div><div><font face="monospace">   min_points=16:</font></div><div><font face="monospace">   max_points=56:</font></div><div><font face="monospace">   radius1=40:</font></div><div><font face="monospace">   radius2=40:</font></div><div><font face="monospace">   nodata=1.701410000000000071e+38 </font></div><div><font face="monospace">-txe 273360 274940 </font></div><div><font face="monospace">-tye 5559440 5561020 </font></div><div><font face="monospace">-tr 12.5 12.5 </font></div><div><font face="monospace">-a_srs EPSG:32634 </font></div><div><font face="monospace">"01 field data-EPSG32634-TC.vrt" "tmpmrmq4d.tiff"</font><br></div><div><br></div><div>This tiff-file looks like this: <a href="https://pasteboard.co/tKP1ZJ1cAY2r.png">https://pasteboard.co/tKP1ZJ1cAY2r.png</a></div><div><br></div><div><div>This process works fine and we've been using this for several years now.</div><div><br></div><div>Recently we added a process step to export one of the sensor data to a PostGIS database and with the help of Geoserver and OpenLayers we've created a very simple webpage.</div><div>In this step, things are getting weird. The WebMap is in EPSG:3857 (Pseudo/Web-Mercator).</div><div>I start with the original CSV-file with the sensor data and add the X and Y columns again, now in EPSG:3857. Then I create a similar vrt-file:<br><font face="monospace"><OGRVRTDataSource><br>    <OGRVRTLayer name="01 field data-EPSG3857"><br>        <SrcDataSource>01 field data-EPSG3857.csv</SrcDataSource><br>        <GeometryType>wkbPoint</GeometryType><br>        <GeometryField encoding="PointFromColumns" x="X" y="Y" z="Countrate"/><br>    </OGRVRTLayer><br></OGRVRTDataSource></font><br></div><div><br></div><div>And call gdal_grid with similar arguments:<br><font face="monospace">-a invdist:power=2:</font></div><div><font face="monospace">   smoothing=20:</font></div><div><font face="monospace">   min_points=16:</font></div><div><font face="monospace">   max_points=56:</font></div><div><font face="monospace">   radius1=40:</font></div><div><font face="monospace">   radius2=40:</font></div><div><font face="monospace">   nodata=1.701410000000000071e+38 </font></div><div><font face="monospace">-txe 1984580 1987000 </font></div><div><font face="monospace">-tye 6471320 6473740 </font></div><div><font face="monospace">-tr 12.5 12.5 </font></div><div><font face="monospace">-a_srs EPSG:3857 </font></div><div><font face="monospace">"01 field data-EPSG3857-TC.vrt" "tmpun25fo.tiff"</font></div><div><br></div><div>But now the result is: <a href="https://pasteboard.co/bcMp7rP5eyff.png">https://pasteboard.co/bcMp7rP5eyff.png</a></div></div><div><br></div><div><div>A huge amount of empty cells. I don't understand this. </div><div>Both EPSG:32634 (WGS 84 / UTM zone 34N) and EPSG:3857 are in meters so I thought the same settings should work.</div><div>But in fact only with very different settings I can get a proper grid:<br> <font face="monospace">-a invdist:power=2:</font></div><div><font face="monospace">   smoothing=60:</font></div><div><font face="monospace">   min_points=4:</font></div><div><font face="monospace">   max_points=56:</font></div><div><font face="monospace">   radius1=80:</font></div><div><font face="monospace">   radius2=80:</font></div><div><font face="monospace">   nodata=1.701410000000000071e+38 </font></div><div><font face="monospace">-txe 1984580 1987000 </font></div><div><font face="monospace">-tye 6471320 6473740</font></div><div><font face="monospace">-tr 20 20 </font></div><div><font face="monospace">-a_srs EPSG:3857 </font></div><div><font face="monospace">"01 field data-EPSG3857-TC.vrt" "tmpsvlhgy.tiff"</font><br></div><div><br></div><div>I got these values through trial and error.<br><a href="https://pasteboard.co/7pypGsynS09K.png">https://pasteboard.co/7pypGsynS09K.png</a><br></div></div><div><br></div><div><div>But now we loose a lot of variation because the search radius and grid cell size are much higher.</div><div><br></div><div>To make it even more weird. Other fields nearby don't have this problem and I also have this problem with other projections like:</div><div><br></div><div>Belgium (EPSG:3857): <a href="https://pasteboard.co/ZXLTsEuvpZ3s.png">https://pasteboard.co/ZXLTsEuvpZ3s.png</a></div></div><div>Belgium (EPSG:31370): <a href="https://pasteboard.co/yNpF6yujF3tV.png">https://pasteboard.co/yNpF6yujF3tV.png</a><br></div><div><br></div><div>The Netherlands (EPSG:3857): <a href="https://pasteboard.co/8PpDJrDi1Wxq.png">https://pasteboard.co/8PpDJrDi1Wxq.png</a><br></div><div>The Netherlands (EPSG:28992): <a href="https://pasteboard.co/38SlnHVCog4m.png">https://pasteboard.co/38SlnHVCog4m.png</a></div><div><br></div><div>Norway (EPSG:3857): <a href="https://pasteboard.co/q69jQHRK40c6.png">https://pasteboard.co/q69jQHRK40c6.png</a></div><div>Norway (EPSG:

25833): <a href="https://pasteboard.co/gs9HNAmnaxSJ.png">https://pasteboard.co/gs9HNAmnaxSJ.png</a><br></div><div><br></div><div>We do have enough data points: <a href="https://pasteboard.co/4CmBs7kgQGVO.png">https://pasteboard.co/4CmBs7kgQGVO.png</a><br></div><div><a href="https://pasteboard.co/J8ZbMHKeErZu.png">https://pasteboard.co/J8ZbMHKeErZu.png</a><br></div><div><br></div><div>Thanks if you made it all the way here ;)<br></div><div><br></div><div><div>My questions are:<br></div><div><ul><li>Am I using Gdal_Grid in the proper way or do I need to change one or more arguments?</li><li>What might be an explanation for the empty cells when using EPSG:3857?</li></ul></div><div><br></div><div>Thanks,</div><div><br></div><div>Paul Meems</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div> <br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><br></div></div></div></div></div></div></div></div></div></div></div></div></div>