"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Demos/Cartography_demo.pm" between
PDL-2.077.tar.gz and PDL-2.078.tar.gz

About: PDL (Perl Data Language) aims to turn perl into an efficient numerical language for scientific computing (similar to IDL and MatLab).

Cartography_demo.pm  (PDL-2.077):Cartography_demo.pm  (PDL-2.078)
skipping to change at line 66 skipping to change at line 66
### coastline map is a set of (X,Y,Pen) vectors. ### coastline map is a set of (X,Y,Pen) vectors.
$coast = earth_coast() -> glue( 1, scalar graticule(15,1) ); $coast = earth_coast() -> glue( 1, scalar graticule(15,1) );
print "Coastline data are a collection of vectors: ", print "Coastline data are a collection of vectors: ",
join("x",$coast->dims),"\n"; join("x",$coast->dims),"\n";
$map = earth_image('day'); $map = earth_image('day');
print "Map data are RGB: ",join("x",$map->dims),"\n\n"; print "Map data are RGB: ",join("x",$map->dims),"\n\n";
|], |],
[act => q& [act => q&
### Map data are stored natively in Plate Caree format. ### Map data are stored natively in Plate Carree format.
### The image contains a FITS header that contains coordinate system info. ### The image contains a FITS header that contains coordinate system info.
print "FITS HEADER INFORMATION:\n"; print "FITS HEADER INFORMATION:\n";
for $_(sort keys %{$map->hdr}){ for $_(sort keys %{$map->hdr}){
next if(m/SIMPLE/ || m/HISTORY/ || m/COMMENT/); next if(m/SIMPLE/ || m/HISTORY/ || m/COMMENT/);
printf (" %8s: %10s%s", $_, $map->hdr->{$_}, (++$i%3) ? " " : "\n"); printf (" %8s: %10s%s", $_, $map->hdr->{$_}, (++$i%3) ? " " : "\n");
} }
print "\n"; print "\n";
$dev = $^O =~ /MSWin32/ ? '/GW' : $dev = $^O =~ /MSWin32/ ? '/GW' :
defined($ENV{PGPLOT_DEV}) ? $ENV{PGPLOT_DEV} : "/XW"; defined($ENV{PGPLOT_DEV}) ? $ENV{PGPLOT_DEV} : "/XW";
# $dev = $^O =~ /MSWin/i ? '/GW' : '/xw'; # $dev = $^O =~ /MSWin/i ? '/GW' : '/xw';
$w = pgwin(Dev=> $dev, size=>[8,6]); $w = pgwin(Dev=> $dev, size=>[8,6]);
$w->fits_imag($map, {Title=>"NASA/MODIS Earth Map (Plate Caree)",J=>0}); $w->fits_imag($map, {Title=>"NASA/MODIS Earth Map (Plate Carree)",J=>0});
&], &],
[act => q& [act => q&
### The map data are co-aligned with the vector data, which can be drawn ### The map data are co-aligned with the vector data, which can be drawn
### on top of the window with the "->lines" PGPLOT method. The ### on top of the window with the "->lines" PGPLOT method. The
### clean_lines method breaks lines that pass over the map's singularity ### clean_lines method breaks lines that pass over the map's singularity
### at the 180th parallel. ### at the 180th parallel.
$w->hold; $w->hold;
$w->lines( $coast -> clean_lines ); $w->lines( $coast -> clean_lines );
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)