Skip to content

Commit

Permalink
add win64 (vs2010) build binray
Browse files Browse the repository at this point in the history
use simple test
add win makefile
  • Loading branch information
miaoneng committed Mar 27, 2017
1 parent 2f8139c commit b4f2867
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
1 change: 1 addition & 0 deletions mexgdal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.git/
8 changes: 8 additions & 0 deletions mexgdal/makefile.win32
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mexgdal.mexw64: mexgdal.c

mex -v -lgdal_i -I"C:\Program Files\GDAL\include" -L"C:\Program Files\GDAL\lib" mexgdal.c


clean:

rm -f mexgdal.mex*
Binary file added mexgdal/mexgdal.mexw64
Binary file not shown.
2 changes: 1 addition & 1 deletion mexgdal/readgdalsimple.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@



if length(metadata.GeoTransform) ~= 0
if ~isempty(metadata.GeoTransform)
% Construct x and y
x0 = metadata.GeoTransform(1);
xinc = metadata.GeoTransform(2);
Expand Down
22 changes: 4 additions & 18 deletions mexgdal/test_gdal.m
Original file line number Diff line number Diff line change
@@ -1,23 +1,9 @@
%%
%% Simple test
f = 'data/20030918-093102.img';
m = gdaldump(f);
[x, y, z] = readgdalsimple (f);

%%
z(z < 0) = 0;
z(isnan(z)) = 0;

projection = prjparse(m.ProjectionRef);

%%
X = linspace(x(1), x(2), m.RasterXSize);
Y = linspace(y(1), y(2), m.RasterYSize);
[x1, y1] = meshgrid(X,Y);
[lat,lon] = minvtran(projection, x1, y1);

%%
axesm(projection);
h = pcolorm(lat, lon, z);

figure;
image(x, y, z);
set(gca, 'YDir', 'Normal')


0 comments on commit b4f2867

Please sign in to comment.