about : coordinate projection #88
-
Hi, I have a quetion about projection I projected the lon/lat coordinate to mercator projection = pyproj.Proj(proj = 'merc', lat_ts = data.Lat.mean())
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @prince-Ha! As you can see in the screenshot you posted not every point in the UTM projected grid is nan. Having nans in projected grid is expected: the
Since projections "deform" the geometry, when projecting a regular grid in longitude and latitude we don't get a regular grid in the projected coordinates. That's why we apply the second step. During this interpolation, some points of the projected grid will be set to nans, particularly the ones located on the boundaries of the grid that are outside the convex-hull region of the grid points. This is ok. Try to plot the two grids and see how each projection make the projected grid looks like. Depending on which projection you use, it might generate more or less nans. This is related to how the chosen projection "deforms" the original grid. Nevertheless, the choice of the projection should not be based on the values of nans you get while projecting the grid, but on which is the projection you need to use for the ultimate purposes of your study. |
Beta Was this translation helpful? Give feedback.
Hi @prince-Ha!
As you can see in the screenshot you posted not every point in the UTM projected grid is nan. Having nans in projected grid is expected: the
vd.project_grid
is basically doing two things:easting
andnorthing
coordinates and interpolates the projected values of the grid into this new regular grid.Since projections "deform" the geometry, when projecting a regular grid in longitude and latitude we don't get a regular grid in the projected coordinates. That's why we apply the second step. During this interpolation, some points of the projected grid will be set to nans, parti…