Original Matlab code, gdalread (above) is nearest equivalent:
The code requires that input Longitude and Latitude are converted to the projected units (metres) of the defined projection (Mercator):
% create longitude and latitude grid GLong = [minLongitude:(2/60):maxLongitude]; GLat = [minLatitude:(2/60):maxLatitude]; %[GridLong,GridLat] = meshgrid(GLong,GLat); [GridLong,GridLat] = meshgrid(GLong,GLat); %[GridLong,GridLat] = projfwd(proj,GridLat,GridLong); - convert X,Y to projected units [GridLong,GridLat] = projfwd(GridLong,GridLat,proj);
My query is what the Octave equivalent would be for projfwd (mapping package?) and what proj in this case should be represented as, since I do not have access to Matlab. Should proj be the proj4 structure?
I'd love to have projection functions in the mapping package but I haven't
been able to find the time to investigate thoroughly; nor has any volunteer
emerged yet. So it's a slowly evolving project.
There is an OF package octproj that actually has all required building
blocks. The future mapping pkg projfwd and projinv functions would be just
wrapper functions for the functions op_fwd and op_inv in octproj.
Against that background I'm also looking for a suitable WKT string parser
with a suitable license or write it myself (I have some skeleton lying
around), but op_fwd and op_inv (and op_transform) seem to be able to process