Skip to content

Commit e341e3b

Browse files
committed
new projections in cartography demo
1 parent 4648e19 commit e341e3b

3 files changed

Lines changed: 40 additions & 8 deletions

File tree

content/demos/cartography.html

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>cartography - Cartographic projections</h1>
1212
Also you must have <a href="https://metacpan.org/pod/PDL::Graphics::Simple">PDL::Graphics::Simple</a> installed to run it.
1313
<p/>
1414
<a href="https://metacpan.org/pod/PDL::Transform::Cartography">PDL::Transform::Cartography</a> includes a global earth vector coastline map
15-
and night and day world image maps, as well as the infrastructure for
15+
and night and day world image maps, as well as the infrastructure for
1616
transforming them to different coordinate systems.
1717

1818
<hr/>
@@ -44,7 +44,7 @@ <h4>Output</h4>
4444
print "FITS HEADER INFORMATION:\n";
4545
for $_(sort keys %{$map->hdr}){
4646
next if(m/SIMPLE/ || m/HISTORY/ || m/COMMENT/);
47-
printf (" %8s: %10s%s", $_, $map->hdr->{$_}, (++$i%3) ? " " : "\n");
47+
printf (" %8s: %10s%s", $_, $map->hdr->{$_}, (++$i%3) ? " " : "\n");
4848
}
4949
print "\n";
5050
$w = pgswin();
@@ -121,9 +121,9 @@ <h4>Output</h4>
121121
vertical, and true perspective. The true perspective has options for
122122
both downward-looking and aerial-view coordinate systems.
123123
<pre>
124-
draw( t_orthographic( o=>[-90,40] ),
124+
draw( t_orthographic( o=>[-90,40] ),
125125
"Orthographic", [400,300]);
126-
draw( t_vertical( r0=> (2 + 1), o=>[-90,40] ),
126+
draw( t_vertical( r0=> (2 + 1), o=>[-90,40] ),
127127
"Vertical (Altitude = 2 r_e)", [400,300]);
128128
draw( t_perspective( r0=> (2 + 1), o=>[-90,40] ),
129129
"True Perspective (Altitude= 2 r_e)", [400,300]);
@@ -139,17 +139,49 @@ <h4>Output</h4>
139139

140140
<img src="images/demos/cartography/output-5.png"/>
141141

142+
<hr/>
143+
Speaking of stereographic and other projections, here are some.
144+
<pre>
145+
draw( t_sinusoidal(),
146+
"Sinusoidal", [400,300]);
147+
draw( t_sin_lat(),
148+
"Sinusoidal except preserving longitude", [400,300]);
149+
draw( t_stereographic(),
150+
"Stereographic", [400,300]);
151+
draw( t_stereographic(o=>[0,90]),
152+
"Stereographic about North Pole", [400,300]);
153+
</pre>
154+
<h4>Output</h4>
155+
156+
<img src="images/demos/cartography/output-6.png"/>
157+
158+
<hr/>
159+
More projections.
160+
<pre>
161+
draw( t_az_eqa(),
162+
"Azimuthal equal-area", [400,300]);
163+
draw( t_az_eqd(),
164+
"Azimuthal equal-distance", [400,300]);
165+
draw( t_conic(),
166+
"Simple conic", [400,300]);
167+
draw( t_vertical(),
168+
"Vertical perspective", [400,300]);
169+
</pre>
170+
<h4>Output</h4>
171+
172+
<img src="images/demos/cartography/output-7.png"/>
173+
142174
<hr/>
143175
That concludes the basic cartography demo. Numerous other transforms
144-
are available.
176+
are available.
145177
<p/>
146178
Because PDL's cartographic transforms work within the Transform module
147179
and are invertible, it's easy to use them both forwards and backwards.
148-
In particular, the perspective transformation is useful for ingesting
180+
In particular, the perspective transformation is useful for ingesting
149181
scientific image data of the Earth or other planets, and converting to
150182
a map of the imaged body.
151183
<p/>
152-
Similarly, scanned images of map data can easily be converted into
153-
lat/lon coordinates or reprojected to make other projections.
184+
Similarly, scanned images of map data can easily be converted into
185+
lat/lon coordinates or reprojected to make other projections.
154186
</body>
155187
</html>
279 KB
Loading
320 KB
Loading

0 commit comments

Comments
 (0)