# Using Map projections with Astronomical data

**URL:** <https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616>\
**Category:** Questions\
**Tags:** astronomy, curated-data, graphics-and-visualization\
**Created:** [January 24, 2015, 12:37pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616 "2015-01-24T12:37:07Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![decicco10](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/decicco10/32/3054_2.png) [@decicco10](https://community.wolfram.com/u/decicco10)\
**Post date:** [January 24, 2015, 12:37pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/1 "2015-01-24T12:37:07Z")

</div>

I noticed that all important “Geoprojections” are available in projections for spherical reference models: GeoProjectionData function.

1 - How can I use the sinusoidal projection using astronomical data ? I want to use the frames of this projection to plot astronomical points in that map , using right ascension and declination as the coordinates, both in degrees.

2 - And what about the [Hammer-Aitoff Equal-Area Projection](http://mathworld.wolfram.com/Hammer-AitoffEqual-AreaProjection.html)? If that projection is not available, how do I make an astronomical plot using the equations ( also doing ticks, axis, frames, etc..)?

In the link below is data that can be used. The format is { {RA,DEC, Velocity},…}. Just need the RA, DEC parameters.

So  
[DataSample](https://www.dropbox.com/s/n542435m9appl9l/DadosRad2014_RADECVELOC_15124_1024.dat?dl=0)

EDIT 1:

I did some tries, after reading maps and cartographies from Wolfram help:

```
> GeoGraphics[{}, GeoRange -> All, GeoProjection -> "Sinusoidal",  
> GeoGridLines -> Automatic, GeoGridLinesStyle -> Directive[Thin,
> Dashed, Yellow], GeoBackground -> Black, Frame -> True]

```

And the result is:

 ![AnalisedoAnalyser.jpg](https://global.discourse-cdn.com/wolfram/original/3X/9/0/90e63339fd7983905abc392cf9158a8dd83f35c4.jpeg)

But I need to insert the point data and make the coordinates range going -90 to 90 and 0 to 360

And one more challenge, I want to use a color range for every point using the parameter (Velocity). Is that possible?

EDIT 2:

Thanks to bbgodfrey, we did this ([http://mathematica.stackexchange.com/questions/72426/using-map-projections-with-astronomical-data](http://mathematica.stackexchange.com/questions/72426/using-map-projections-with-astronomical-data)):

 ![MapaSinusRad2014_15125_1121.png](https://global.discourse-cdn.com/wolfram/original/3X/6/2/628c3588487627a57f6e7647cc431c14861e6901.png)

Wolfram developers, don t you think it is time to create specific plotting functions for the astronomy area?

---

<div class="post-metadata">

**Author:** ![jose](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jose/32/26765_2.png) [@jose](https://community.wolfram.com/u/jose)\
**Post date:** [January 25, 2015, 5:21pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/2 "2015-01-25T17:21:43Z")

</div>

Starting from your proposed solution I would suggest the following simplification. A single GeoGraphics can produce the desired output and handles everything related to the projection. In version 10.0.2 GeoProjectionData also has the “Hammer” (or Hammer-Aitoff) and “Aitoff” projections.

```
rad = Import["~/Downloads/DadosRad2014_RADECVELOC_15124_1024.dat"];
p = Cases[rad, {a_, b_, c_} -> {b, Mod[a, 360, -180]}];

GeoGraphics[{Red, PointSize[0.01], Point[GeoPosition[p]]}, 
 GeoRange -> All, GeoProjection -> "Sinusoidal", 
 GeoGridLines -> Automatic, GeoGridLinesStyle -> Directive[Dashing[{.01, .005}], Green], 
 GeoBackground -> Black
]

```

 ![ScreenShot2015-01-25at11.33.14.png](https://global.discourse-cdn.com/wolfram/original/3X/b/b/bb6632fc74b7ace51de443966d32283f8bafc1f9.png)

---

<div class="post-metadata">

**Author:** ![decicco10](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/decicco10/32/3054_2.png) [@decicco10](https://community.wolfram.com/u/decicco10)\
**Post date:** [January 25, 2015, 6:30pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/3 "2015-01-25T18:30:33Z")

</div>

Fine! And what about colorizing the points? In geographic functions is allowed to do this?

See these other results from Kuba:

[Kuba `s way](http://mathematica.stackexchange.com/questions/72426/using-map-projections-with-astronomical-data)

---

<div class="post-metadata">

**Author:** ![jeffb](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/jeffb/32/36128_2.png) [@jeffb](https://community.wolfram.com/u/jeffb)\
**Post date:** [January 25, 2015, 6:36pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/4 "2015-01-25T18:36:09Z")

</div>

To add to Jose’s response, if you want to color the points different colors efficiently, you can redefine p as follows (there may be a shorter way, but this works):

```
p = With[{triples = 
    Cases[rad, {a_, b_, c_?NumberQ} :> {b, Mod[a, 360, -180], c}]}, 
  triples /. {a_, b_, c_} :> {a, b, 
     Rescale[c, {Min[triples[[All, 3]]], Max[triples[[All, 3]]]}]}];

```

Then, you can generate colors for each of the triples:

```
colors = ColorData["TemperatureMap"][#] & /@ p[[All, 3]];

```

The colors can be efficiently applied using VertexColors on the Point primitive:

```
GeoGraphics[{PointSize[0.01], 
  Point[GeoPosition[p[[All, 1 ;; 2]]], VertexColors -> colors]}, 
 GeoRange -> All, GeoProjection -> "Sinusoidal", 
 GeoGridLines -> Automatic, 
 GeoGridLinesStyle -> Directive[Dashing[{.01, .005}], Green], 
 GeoBackground -> Black]

```

 ![Sinusoidal.png](https://global.discourse-cdn.com/wolfram/original/3X/7/0/70f97c5cee719c8cbd6531d7b5fdf4e1086e8516.png)

---

<div class="post-metadata">

**Author:** ![decicco10](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/decicco10/32/3054_2.png) [@decicco10](https://community.wolfram.com/u/decicco10)\
**Post date:** [January 25, 2015, 8:00pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/5 "2015-01-25T20:00:02Z")

</div>

Thanks Jeff.

---

<div class="post-metadata">

**Author:** ![kubapod](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/kubapod/32/18662_2.png) [@kubapod](https://community.wolfram.com/u/kubapod)\
**Post date:** [January 25, 2015, 8:47pm UTC](https://community.wolfram.com/t/using-map-projections-with-astronomical-data/4616/6 "2015-01-25T20:47:12Z")

</div>

Just a note:

```
triplets[[;;, 3]] = Rescale @ triplets[[;;, 3]]

```

will be faster.
