[Proj] Using libproj with array data
AnthonyD at rocketmail.com
Wed Jul 5 23:24:45 EDT 2006
What you're trying to do sounds like re-projecting a grid. (A grid just
being a two dimensional array of values). I have written code to do
To project a grid you basically have to perform a forward projection of
some points around the edge of the input grid and use these to compute
the bounding rectangle in the new coordinate system. (Remember some
projections will distort the shape of the grid).
You then create an output grid in the new coordinate system with the
Finally you have to go through each cell in the output grid and use
reverse projection to find the corresponding cell in the unprojected
grid. Use grid interpolation to pick up the value you need to put in
the output grid cell.
There's probably already code in the public domain which uses PROJ to
--- James Gallagher <jhrg at mac.com> wrote:
> Hi, I hope this is not a FAQ or covered in the existing docs; I've
> checked and apologize if I missed something obvious.
> I have a data server which is used to access a number of files of
> georeferenced data stored in two dimentional arrays. For each array,
> I know the longitude and latitude values at the corners as well as
> the projection and datum. Is there a way I can use libproj to map
> long/lat locations to indices within the arrays?
> James Gallagher jgallagher at opendap.org
> OPeNDAP, Inc 406.723.8663
> Proj mailing list
> Proj at lists.maptools.org
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
More information about the Proj