[GRASS-user] Reprojecting to x,y grid

Ken Mankoff mankoff at gmail.com
Tue Nov 17 14:54:45 PST 2020


Hi Markus,

On 2020-11-17 at 14:40 -08, Markus Neteler <neteler at osgeo.org> wrote...
> On Tue, Nov 17, 2020 at 7:06 PM Ken Mankoff <mankoff at gmail.com> wrote:
>> I have a data set provided on an (x,y) grid, where each coordinate
>> does have a paired (lon,lat). I'd like to work on the native (x,y)
>> grid, and bring some other geo-referenced data there. How do I do
>> this?
>
> Here 2.5 wild guesses:
>
> If it is about "pushing around" a raster map (no squeezing):
> - https://grass.osgeo.org/grass78/manuals/r.region.html
>
> If a rotation is needed:
> - https://grass.osgeo.org/grass7/manuals/addons/i.rotate.html
>
> If it is about a real transform:
> - convert the raster matrix to its vector center point representation; then
> - https://grass.osgeo.org/grass78/manuals/v.transform.html
> - rasterize again

Thanks for getting me thinking down this path.

This isn't about the raster. I want to work in the raster XY location. I want to reproject a vector there. I know the (lon,lat) of every (x,y). 

I think maybe I need to solve this outside of GRASS - I can take the (lon,lat) of each point of the geo-referenced vector, and look up the nearest (lon,lat) in the XY location, and set those as the new coordinates for the vector.

I'm not yet sure what the difference is between that method and using v.rectify. I would build the control points using the same method: Take the (lon,lat) of each point of the geo-referenced vector, look up the nearest (lon,lat) in the XY location, from there jump to the (x,y) coord in the XY location, and use those as my control points. I then rectify (un-project?) the vector to the XY coords.

Is the only difference that the second method would "fill in" points that I don't map between (lon,lat) and (x,y), while the first method requires that I update every point?

Thanks,

  -k.


More information about the grass-user mailing list