# Raster from a set of Points keeping the resolution

I have a database with some points covering the earth surface and I want to build a raster (GeoTIFF using gdal_rasterize) which mantains the same spatial resolution of the input points (so without losing any information).

I know that the input points should have a spatial resolution of 7km more or less. with resolution of points I mean that there is a point every 7km, or in other words that given a point the closest ones are at a distance of 7km (up/down - right/left). the points represents measurements of a concentration of a certain gas , so I would like to build the image without losing information about the concentration in that point

How can I determine the correct resolution of the image generated by gdal_rasterize (-ts option of the command)?

• By definition, points have infinite resolution. Pixels on the Earth's surface in WGS84 are of variable area, largest at the Equator, and approaching infinitely small at the poles. You'll need to decide how much storage you're willing to expend on this raster, then choose a resolution which is appropriate to your requirements. In vector form, a global grid with each rectangle at 25 sq km, is over 20M cells, with the tallest cells 50x taller than at the equator. – Vince Dec 24 '18 at 13:33
• Let me explain a little better, with resolution of points I mean that there is a point every 7km, or in other words that given a point the closest ones are at a distance of 7km (up/down - right/left). the points represents measurements of a concentration of a certain gas , so I would like to build the image without losing information about the concentration in that point. – Davide Dec 24 '18 at 13:37
• Please Edit the question to contain this information. 7km spacing is still a problem in raster format. – Vince Dec 24 '18 at 14:50

Short answer: Reproject them to World Sinusoidal (EPSG:54008), and use `-ts 7000 7000`.

Disclaimer: By the statement of the question I am going to consider that your points are distributed in quadrangular form on the terrestrial globe. The same, I consider that a point every 7km covering the earth suface, is a huge amount of points. But this is how the question is written and I am going to stick to only the discussion on how to maintain the spatial relationship.

You know that if two runners, distanced 7km from each other and located on the equator, begin to run North, their trajectories cross. The distance between them will not be more or less 7km during the journey, it will decrease to 0. Therefore, the first thing that we must set aside if we want equidistant and orthogonal trajectories with each other, on a curved surface, is the idea of the meridians.

Meridians are useful because they all point to the north. But if we want to obtain a quadrangular distribution of points on the earth's surface, we must work with parallels in both directions. Parallel to the equator, and parallel to a central meridian.

I present an orthographic projection of points distributed quadrangularly on the Earth's surface, at a distance of 1500km from each other.

And that's how they look in the Geographic Coordinate System WGS 84:

But a raster file needs a quadrangular equidistant reference to represent the values of the pixels. Therefore it is necessary to project the points with a Sinusoidal (Sanson-Flamsteed) projection.

The trajectories parallel to the central meridian are seen as vertical lines in this system.

This is how the same points are seen, projected in the World Sinusoidal (EPSG: 54008) CRS.

Therefore the proposed solution is: Reproject them to World Sinusoidal (EPSG:54008), and use `-ts 7000 7000`.