creare-com / podpac

Pipeline for Observational Data Processing Analysis and Collaboration
https://podpac.org
Apache License 2.0
43 stars 6 forks source link

ENH: Enabling NN interpolation for nD stacked coordinates. #488

Closed mpu-creare closed 2 years ago

mpu-creare commented 2 years ago

This PR allows us to interpolate from the MODIS coordinates to EPSG:4326. This is a non-linear transform so the MODIS coordinates end up being 2D stacked coordinates (formerly dependent coordinates) that we need to interpolate.

This fixes the selector so that it can handle this case. It also fixes the nearest neighbor interpolator.

In the code I'm marking the 2D stacked coordinates by putting the indexes in a tuple, so that's what I'm checking for in the code. This is a bit of a hack.

mpu-creare commented 2 years ago

@jmilloy I'm merging this because I need it soon. I marked you on this one because I was really surprised that this wasn't working. I'm not sure when this broke because it used to work with dependent coordinates. I think it broke sometime between the dependent coordinates refactor and then interpolation refactor.

jmilloy commented 2 years ago

Are you still wanting me to look through it, or are you happy with it?

mpu-creare commented 2 years ago

You don't have to, I just want to talk to you about it at some point.