From a04b94bcc69f2db85b11a0b81b7bc0cbf8576968 Mon Sep 17 00:00:00 2001 From: John Taylor Date: Mon, 7 Mar 2016 09:59:33 -0500 Subject: [PATCH 1/2] Remove the constellation kml file and use the proto file as the canonical version. The kml file isn't any easier to work with than the proto when we come to convert to some future format. --- tools/README.md | 2 +- tools/data/constellation_names_and_lines.kml | 2725 ----------------- tools/data/constellations.ascii | 5 + tools/data/constellations_R.ascii | 5 + tools/generate.sh | 2 +- .../data/ConstellationProtoWriter.java | 307 -- .../google/android/stardroid/data/Main.java | 7 +- 7 files changed, 14 insertions(+), 3039 deletions(-) delete mode 100644 tools/data/constellation_names_and_lines.kml delete mode 100644 tools/src/main/java/com/google/android/stardroid/data/ConstellationProtoWriter.java diff --git a/tools/README.md b/tools/README.md index b1753dea0..939c8d72f 100644 --- a/tools/README.md +++ b/tools/README.md @@ -8,7 +8,7 @@ The following procedure will regenerate the binary star data: 1. Gradle's application plugin generates the wrong classpath for the utilities. Fix it by going into `tools/build/install/datagen/bin/datagen` and removing the apk from the classpath. Leave the root installation directory `$APP_HOME/lib`. - 1. Convert the data files to text protocol buffers with `./generate.sh` from the tools directory. + 1. Convert the star and messier data files to text protocol buffers with `./generate.sh` from the tools directory. 1. Recompile the App to ensure that string IDs are up to date. You can do this just by running `./gradlew assemble`. 1. Replace the text protocol buffers with versions that include the string resource ids from the `R.java` file with `./rewrite.sh` from the tools directory 1. Finally run `./binary.sh` from the tools directory to convert the ascii proto bufs to binary ones (and put them in the right directory). diff --git a/tools/data/constellation_names_and_lines.kml b/tools/data/constellation_names_and_lines.kml deleted file mode 100644 index 980e6fe7e..000000000 --- a/tools/data/constellation_names_and_lines.kml +++ /dev/null @@ -1,2725 +0,0 @@ - - - - Constellation Names - - - - Andromeda - #con_names - - -171.516815,39.25,0 - - - - Antlia - #con_names - - -27.814026,-33.650002,0 - - - - Apus - #con_names - - 62.673306,-76.410004,0 - - - - Aquarius - #con_names - - 161.388123,-10.53,0 - - - - Aquila - #con_names - - 116.1595,3.37,0 - - - - Ara - #con_names - - 79.17340900000001,-51.889999,0 - - - - Aries - #con_names - - -139.749985,22.57,0 - - - - Auriga - #con_names - - -90.55050700000001,42.810001,0 - - - - Bootes - #con_names - - 40.908817,32.330002,0 - - - - Caelum - #con_names - - -108.990906,-38.830002,0 - - - - Camelopardalis - #con_names - - -87.482117,71.959999,0 - - - - Cancer - #con_names - - -52.19566700000001,23.559999,0 - - - - Canes Venatici - #con_names - - 15.835283,42.349998,0 - - - - Canis Major - #con_names - - -77.269203,-22.690001,0 - - - - Canis Minor - #con_names - - -65.326561,6.760000000000001,0 - - - - Capricornus|Capricorn - #con_names - - 136.585327,-19.65,0 - - - - Carina - #con_names - - -63.265926,-57.16999800000001,0 - - - - Cassiopeia - #con_names - - -166.91423,60.299999,0 - - - - Centaurus - #con_names - - 14.782405,-44,0 - - - - Cepheus - #con_names - - 157.17662,72.55999799999999,0 - - - - Cetus - #con_names - - -154.294739,-6.64,0 - - - - Chamaeleon - #con_names - - -10.5,-80.5,0 - - - - Circinus - #con_names - - 38.502239,-67.699997,0 - - - - Columba - #con_names - - -94.19045300000001,-37.080002,0 - - - - Coma Berenices - #con_names - - 11.744101,22.65,0 - - - - Corona Australis - #con_names - - 100.591949,-41.25,0 - - - - Corona Borealis - #con_names - - 58.852863,32.630001,0 - - - - Corvus - #con_names - - 6.314259000000001,-18.360001,0 - - - - Crater - #con_names - - -9.313457,-13.25,0 - - - - Crux|Southern Cross - #con_names - - 7.728124,-59.700001,0 - - - - Cygnus - #con_names - - 129.816833,49.58000200000001,0 - - - - Delphinus - #con_names - - 130.79451,12.1,0 - - - - Dorado - #con_names - - -99.785751,-63.990002,0 - - - - Draco - #con_names - - 89.912758,66.05999799999999,0 - - - - Equuleus - #con_names - - 138.638672,7.94,0 - - - - Eridanus - #con_names - - -121.700645,-17.01,0 - - - - Fornax - #con_names - - -138.396286,-30.940001,0 - - - - Gemini - #con_names - - -76.998459,24.82,0 - - - - Grus - #con_names - - 157.778259,-42.860001,0 - - - - Hercules - #con_names - - 82.091385,31.23,0 - - - - Horologium - #con_names - - -131.687943,-52.00000000000001,0 - - - - Hydra - #con_names - - -42.584396,-11.32,0 - - - - Hydrus - #con_names - - -141.058563,-72.08000199999999,0 - - - - Indus - #con_names - - 137.939026,-52.68000000000001,0 - - - - Lacerta - #con_names - - 158.635605,46.66999800000001,0 - - - - Leo - #con_names - - -20.588877,13,0 - - - - Leo Minor - #con_names - - -24.835884,33.240002,0 - - - - Lepus - #con_names - - -98.23651099999999,-19.35,0 - - - - Libra - #con_names - - 48.42937500000001,-15.45,0 - - - - Lupus - #con_names - - 51.272144,-42.279999,0 - - - - Lynx - #con_names - - -63.672035,47.830002,0 - - - - Lyra - #con_names - - 104.397354,40.650002,0 - - - - Mensa - #con_names - - -97.27388000000002,-79.989998,0 - - - - Microscopium - #con_names - - 134.990982,-36.200001,0 - - - - Monoceros - #con_names - - -75.28377500000001,-3.740000000000001,0 - - - - Musca - #con_names - - 7.41226,-69.870003,0 - - - - Norma - #con_names - - 61.289524,-52.290001,0 - - - - Octans - #con_names - - 153.506592,-84.730003,0 - - - - Ophiuchus - #con_names - - 76.255432,-2.65,0 - - - - Orion - #con_names - - -96.28116600000001,3.59,0 - - - - Pavo - #con_names - - 108.187714,-65.139999,0 - - - - Pegasus - #con_names - - 160.184845,19.65,0 - - - - Perseus - #con_names - - -127.145531,44.889999,0 - - - - Phoenix - #con_names - - -168.989899,-48.23,0 - - - - Pictor - #con_names - - -99.063774,-51.630001,0 - - - - Pisces - #con_names - - -166.598373,15.48,0 - - - - Piscis Austrinus - #con_names - - 157.071335,-31.43,0 - - - - Puppis - #con_names - - -61.58132200000001,-32.389999,0 - - - - Pyxis - #con_names - - -46.26947,-29.209999,0 - - - - Reticulum - #con_names - - -121.354706,-60.490002,0 - - - - Sagitta - #con_names - - 115.81356,18,0 - - - - Sagittarius - #con_names - - 111.57196,-29.110001,0 - - - - Scorpius|Scorpio - #con_names - - 73.66835800000001,-35.669998,0 - - - - Sculptor - #con_names - - -169.958893,-35.490002,0 - - - - Scutum - #con_names - - 100.531784,-10.11,0 - - - - Serpens Caput - #con_names - - 56.61174,10.85,0 - - - - Serpens Cauda - #con_names - - 90.108299,-13.52,0 - - - - Sextans - #con_names - - -28.05468400000001,-1.87,0 - - - - Taurus - #con_names - - -118.406647,17.34,0 - - - - Telescopium - #con_names - - 109.451164,-51.540001,0 - - - - Triangulum - #con_names - - -149.271011,32.34,0 - - - - Triangulum Australe - #con_names - - 62.52289600000001,-65.900002,0 - - - - Tucana - #con_names - - 178.399628,-64.05999800000001,0 - - - - Ursa Major|Plough|Big Dipper|Great Bear - #con_names - - -25.633064,57.48,0 - - - - Ursa Minor|Little Bear|Little Dipper - #con_names - - 45.225616,82.040001,0 - - - - Vela - #con_names - - -39.561134,-48.50999800000001,0 - - - - Virgo - #con_names - - 20.693562,-3.49,0 - - - - Volans - #con_names - - -64.800117,-69.389999,0 - - - - Vulpecula - #con_names - - 126.342339,25.030001,0 - - - - #con_lines - - - 1 - clampToGround - - -107.345835,8.9,0 - -107.537505,6.95,0 - -107.195835,5.6,0 - -106.437495,2.45,0 - -105.362505,1.7167,0 - -98.716665,6.35,0 - -96.995835,-0.3,0 - -98.87916,-2.3833,0 - -100.600005,-6.85,0 - -101.36667,-8.2,0 - -93.058335,-9.6667,0 - -94.80834,-1.95,0 - -91.20834,7.4,0 - -96.21666,9.9333,0 - -98.716665,6.35,0 - - - - 1 - clampToGround - - -94.80834,-1.95,0 - -95.950005,-1.2,0 - -96.995835,-0.3,0 - - - - 1 - clampToGround - - -91.20834,7.4,0 - -89.40417,9.65,0 - -88.104165,14.7667,0 - -91.404165,20.2667,0 - - - - 1 - clampToGround - - -89.40417,9.65,0 - -87.016665,14.2167,0 - -89.02083,20.1333,0 - - - - 1 - clampToGround - - -66.349995,31.8833,0 - -67.72083,31.7833,0 - -72.212505,30.25,0 - -79.01667,25.1333,0 - -84.25833,22.5167,0 - -86.28333,22.5,0 - - - - 1 - clampToGround - - -79.01667,25.1333,0 - -82.75833,20.2167,0 - - - - 1 - clampToGround - - -63.887505,24.4,0 - -66.016665,26.9,0 - -68.566665,27.8,0 - -72.212505,30.25,0 - -76.80417,33.9667,0 - - - - 1 - clampToGround - - -63.67083,28.0167,0 - -66.016665,26.9,0 - -69.97083,21.9833,0 - -73.970835,20.5667,0 - -80.570835,16.4,0 - - - - 1 - clampToGround - - -69.97083,21.9833,0 - -70.474995,16.5333,0 - -78.675,12.9,0 - - - - 1 - clampToGround - - -48.325005,28.7667,0 - -49.179165,21.4667,0 - -48.82917,18.15,0 - -55.87083,9.2,0 - -58.73334,13.1167,0 - -49.179165,21.4667,0 - - - - 1 - clampToGround - - -48.82917,18.15,0 - -45.37917,11.8667,0 - - - - 1 - clampToGround - - -65.175,5.2333,0 - -68.2125,8.2833,0 - - - - 1 - clampToGround - - -75.962505,-17.05,0 - -76.450005,-12.05,0 - -74.0625,-15.6333,0 - -75.962505,-17.05,0 - -78.7125,-16.7167,0 - -80.524995,-18.2333,0 - -80.829165,-19.25,0 - -84.325005,-17.95,0 - - - - 1 - clampToGround - - -78.7125,-16.7167,0 - -74.24166,-23.8333,0 - -72.9,-26.4,0 - -75.34167,-28.9667,0 - -76.46667,-24.2,0 - -80.829165,-19.25,0 - -82.037505,-23.4167,0 - - - - 1 - clampToGround - - -72.9,-26.4,0 - -71.299995,-26.7667,0 - -68.979165,-29.3,0 - - - - 1 - clampToGround - - -75.34167,-28.9667,0 - -84.925005,-30.0667,0 - - - - 1 - clampToGround - - -75.34167,-28.9667,0 - -77.54166,-32.5167,0 - - - - 1 - clampToGround - - -79.75833,9.8833,0 - -81.775005,7.3333,0 - -84.058335,4.6,0 - -78.03333,2.4,0 - -72.0375,-0.5,0 - -59.69583,-1.4,0 - -57.850005,-2.9833,0 - - - - 1 - clampToGround - - -81.775005,7.3333,0 - -78.03333,2.4,0 - - - - 1 - clampToGround - - -59.69583,-1.4,0 - -64.6875,-9.55,0 - - - - 1 - clampToGround - - -72.0375,-0.5,0 - -82.79583,-7.0333,0 - -86.28333,-6.2833,0 - - - - 1 - clampToGround - - -101.76666,-16.2,0 - -96.81666,-17.8333,0 - -93.2625,-14.8333,0 - -90.9,-14.1667,0 - -88.45833,-14.95,0 - -92.17083,-20.8667,0 - -93.883335,-22.45,0 - -97.937505,-20.75,0 - -96.81666,-17.8333,0 - - - - 1 - clampToGround - - -97.937505,-20.75,0 - -103.633335,-22.3667,0 - -101.76666,-16.2,0 - - - - 1 - clampToGround - - -101.76666,-16.2,0 - -100.108335,-13.1833,0 - - - - 1 - clampToGround - - -101.76666,-16.2,0 - -101.69166,-12.95,0 - - - - 1 - clampToGround - - -28.01667,-0.37,0 - -22.425,-0.63,0 - -31.875,-8.1,0 - -28.01667,-0.37,0 - - - - 1 - clampToGround - - -49.975005,-35.3,0 - -49.104165,-33.2,0 - -47.36667,-27.7,0 - - - - 1 - clampToGround - - -151.72917,29.5833,0 - -147.616665,34.9833,0 - -145.670835,33.85,0 - -151.72917,29.5833,0 - - - - 1 - clampToGround - - -151.62084,19.2833,0 - -151.337505,20.8,0 - -148.20834,23.45,0 - -137.50416,27.2667,0 - - - - 1 - clampToGround - - -2.73333,14.5667,0 - -11.475,20.5167,0 - -14.416665,20.1833,0 - -25.00416,19.85,0 - -25.825005,23.4167,0 - -31.80834,26.0167,0 - -38.837505,26.1833,0 - -37.070835,22.9833,0 - -33.537495,23.7667,0 - -28.16667,16.7667,0 - -11.4375,15.4333,0 - -11.475,20.5167,0 - - - - 1 - clampToGround - - -33.537495,23.7667,0 - -31.80834,26.0167,0 - - - - 1 - clampToGround - - -34.712505,9.9,0 - -28.16667,16.7667,0 - -27.90834,11.9667,0 - -28.024995,10.0,0 - - - - 1 - clampToGround - - -21.79584,9.3,0 - -11.4375,15.4333,0 - -9.016665,10.5333,0 - -9.71667,6.0333,0 - - - - 1 - clampToGround - - -23.02917,36.7,0 - -16.675005,34.2167,0 - -28.141665,35.25,0 - -23.02917,36.7,0 - - - - 1 - clampToGround - - -39.737505,34.4,0 - -40.291665,36.8167,0 - -54.29166,43.2,0 - -68.32083,49.2167,0 - -75.68334,58.4167,0 - -85.09584,59.0167,0 - - - - 1 - clampToGround - - -3.537495,6.5167,0 - -2.325,1.7667,0 - 4.975005,-0.6667,0 - 10.41666,-1.45,0 - 13.900005,3.3833,0 - 15.545835,10.9667,0 - - - - 1 - clampToGround - - 10.41666,-1.45,0 - 17.487495,-5.5333,0 - 21.29583,-11.15,0 - 34.00416,-6.0,0 - 40.7625,-5.65,0 - - - - 1 - clampToGround - - 17.487495,-5.5333,0 - 23.674995,-0.6,0 - 30.40833,1.55,0 - 41.562495,1.9,0 - - - - 1 - clampToGround - - -18.30834,-49.4333,0 - -37.324995,-40.4667,0 - -43.000005,-43.4333,0 - -57.616665,-47.35,0 - -48.82083,-54.7167,0 - -39.470835,-55.0167,0 - -30.78333,-54.5833,0 - -18.30834,-49.4333,0 - - - - 1 - clampToGround - - 39.9,-60.8333,0 - 30.958335,-60.3667,0 - 24.97083,-53.4667,0 - 28.88334,-47.3,0 - 29.67084,-44.8,0 - 27.40416,-42.4833,0 - 27.375,-41.6833,0 - 31.670835,-36.3833,0 - - - - 1 - clampToGround - - 44.787495,-42.1,0 - 38.875005,-42.15,0 - 27.40416,-42.4833,0 - 20.14584,-36.7167,0 - - - - 1 - clampToGround - - 28.88334,-47.3,0 - 10.37916,-48.9667,0 - 7.0125,-50.2333,0 - 2.087505,-50.7167,0 - -9.74583,-54.5,0 - -6.054165,-63.0167,0 - - - - 1 - clampToGround - - -5.829165,-9.8,0 - -8.84583,-10.8667,0 - -10.16667,-14.7667,0 - -15.058335,-18.3,0 - -12.087495,-22.8333,0 - -8.77917,-17.6833,0 - -3.808335,-18.35,0 - -0.995835,-17.15,0 - - - - 1 - clampToGround - - -8.77917,-17.6833,0 - -10.16667,-14.7667,0 - - - - 1 - clampToGround - - -15.82083,-37.1333,0 - -23.20833,-31.0833,0 - -33.949995,-27.7667,0 - -37.6875,-35.95,0 - -23.20833,-31.0833,0 - - - - 1 - clampToGround - - 31.595835,-26.6833,0 - 19.72917,-23.1833,0 - 10.2159517172,-28.6209129026,0 - -1.774995,-33.9,0 - -6.75,-31.85,0 - -17.59584,-16.1833,0 - -23.47917,-16.85,0 - -27.354165,-12.3667,0 - -32.12916,-14.85,0 - -38.10417,-8.6667,0 - -35.037495,-1.1333,0 - -41.40834,2.3167,0 - -46.150005,5.95,0 - -48.30417,6.4167,0 - -50.58333,5.7,0 - -50.308335,3.35,0 - -49.19166,3.3833,0 - -46.150005,5.95,0 - - - - 1 - clampToGround - - -58.112505,-24.3,0 - -62.679165,-24.8667,0 - -59.10417,-40.0,0 - -70.712505,-37.1,0 - -67.69167,-43.3,0 - -59.10417,-40.0,0 - - - - 1 - clampToGround - - -67.69167,-43.3,0 - -71.59983,-44.65,0 - -80.55834,-43.1833,0 - -77.51667,-50.6167,0 - -71.59983,-44.65,0 - - - - 1 - clampToGround - - -84.470835,-33.4333,0 - -90.612495,-35.2833,0 - -92.25834,-35.7667,0 - -95.087505,-34.0833,0 - -97.19583,-35.4833,0 - - - - 1 - clampToGround - - -92.25834,-35.7667,0 - -90.212505,-42.8167,0 - - - - 1 - clampToGround - - -84.012495,-52.6833,0 - -60.804165,-52.9833,0 - -54.37083,-59.5,0 - -40.725,-59.2667,0 - -25.72926,-61.3167,0 - -21.9939,-61.6833,0 - -19.262505,-64.3833,0 - -26.562495,-70.0333,0 - -41.7,-69.7167,0 - -33.225,-65.0667,0 - -33.687495,-62.5167,0 - -40.725,-59.2667,0 - - - - 1 - clampToGround - - -151.399995,63.6833,0 - -158.54583,60.2333,0 - -165.825,60.7167,0 - -169.87083,56.5333,0 - - - - 1 - clampToGround - - -165.825,60.7167,0 - -171.75,62.9333,0 - -177.70833,59.15,0 - - - - 1 - clampToGround - - -77.950005,-61.9333,0 - -92.54166,-56.15,0 - -93.17916,-51.0667,0 - -87.424995,-54.9667,0 - -77.950005,-61.9333,0 - - - - 1 - clampToGround - - -115.99584,-51.4833,0 - -111.499995,-55.05,0 - -103.62084,-57.4833,0 - -96.59583,-62.4833,0 - -93.804165,-65.7333,0 - - - - 1 - clampToGround - - -177.90417,29.0833,0 - -170.16666,30.8667,0 - -162.56667,35.6167,0 - -165.812505,38.5,0 - -167.54583,41.0833,0 - -162.625005,47.25,0 - -155.50416,48.6167,0 - - - - 1 - clampToGround - - -170.77917,33.7167,0 - -162.56667,35.6167,0 - -155.800005,41.4,0 - -149.02917,42.3333,0 - - - - 1 - clampToGround - - -165.695835,23.4167,0 - -168.166665,24.2667,0 - -170.3625,29.3167,0 - -170.16666,30.8667,0 - -170.77917,33.7167,0 - -175.41666,36.7833,0 - -175.725,38.6833,0 - -179.999999,40.870879,0 - - - - 1 - clampToGround - - 179.999999,40.870879,0 - 174.53334,43.2667,0 - - - - 1 - clampToGround - - 165.47916,42.3167,0 - 174.53334,43.2667,0 - 175.104165,44.3333,0 - 174.391665,46.4667,0 - - - - 1 - clampToGround - - -128.795835,9.0333,0 - -128.20833,9.7333,0 - -119.833335,12.4833,0 - -115.05,15.6167,0 - -112.83333,15.8667,0 - -111.020835,16.5,0 - -95.5875,21.15,0 - - - - 1 - clampToGround - - -98.42916,28.6,0 - -112.84584,19.1833,0 - -114.26667,17.5333,0 - -115.05,15.6167,0 - - - - 1 - clampToGround - - -112.84584,19.1833,0 - -123.129165,24.1167,0 - - - - 1 - clampToGround - - -90.11667,54.2833,0 - -90.11667,44.95,0 - -100.82916,46.0,0 - -90.11667,54.2833,0 - - - - 1 - clampToGround - - -100.82916,46.0,0 - -104.50833,43.8333,0 - -104.379165,41.0833,0 - -105.75,33.15,0 - -98.42916,28.6,0 - -90.07083,37.2,0 - -90.11667,44.95,0 - - - - 1 - clampToGround - - -116.500005,-42.2833,0 - -139.362495,-50.8,0 - -140.650005,-52.55,0 - -139.83333,-54.55,0 - - - - 1 - clampToGround - - -103.895835,-35.4833,0 - -109.487505,-37.1333,0 - -109.862505,-41.8667,0 - -112.291665,-44.95,0 - - - - 1 - clampToGround - - 179.999999,-28.483068,0 - 177.22917,-28.1333,0 - 169.708335,-32.5333,0 - 173.24583,-37.8167,0 - 179.999999,-35.7211558,0 - - - - 1 - clampToGround - - -179.999999,-28.483068,0 - -165.349995,-29.3667,0 - -179.999999,-35.7211558,0 - - - - 1 - clampToGround - - -140.12916,0.3333,0 - -145.1625,-2.9833,0 - -152.1375,-10.3333,0 - -158.99583,-8.1833,0 - -175.141665,-8.8333,0 - -169.104165,-17.9833,0 - -149.99583,-21.0833,0 - -146.54965413,-14.0121078638,0 - -140.12916,0.3333,0 - -139.174995,3.2333,0 - -134.42916,4.1,0 - -135.07083,8.9167,0 - -138.766665,10.1167,0 - -142.962495,8.4667,0 - -139.174995,3.2333,0 - - - - 1 - clampToGround - - -169.104165,-17.9833,0 - -153.98334,-15.9333,0 - - - - 1 - clampToGround - - -131.983335,-28.9833,0 - -137.72916,-32.4167,0 - -148.875,-29.3,0 - - - - 1 - clampToGround - - -173.42916,-42.3,0 - -173.449995,-43.6833,0 - -163.479165,-46.7167,0 - -157.9125,-43.3167,0 - -157.187505,-49.0833,0 - -163.479165,-46.7167,0 - - - - 1 - clampToGround - - -173.449995,-43.6833,0 - -162.90417,-55.25,0 - -169.1625,-57.4667,0 - - - - 1 - clampToGround - - -173.449995,-43.6833,0 - -177.649995,-45.75,0 - -179.999999,-45.0003923,0 - - - - 1 - clampToGround - - -179.999999,-47.776869,0 - -177.649995,-45.75,0 - - - - 1 - clampToGround - - 179.999999,-45.0003923,0 - 173.77083,-42.6167,0 - 176.81667,-50.2333,0 - 179.999999,-47.776869,0 - - - - 1 - clampToGround - - -105.67917,53.7667,0 - -104.14584,60.45,0 - -106.487505,66.3333,0 - -122.40834,71.3167,0 - - - - 1 - clampToGround - - -106.487505,66.3333,0 - -85.288455,69.3167,0 - -74.983185,76.9667,0 - - - - 1 - clampToGround - - -155.575005,-57.25,0 - -151.0125,-51.6,0 - -145.875,-51.5167,0 - -143.25417,-47.7,0 - -139.83333,-39.85,0 - -135.437505,-40.3,0 - -115.525005,-33.8,0 - -113.99166,-34.0167,0 - -111.1125,-30.5667,0 - -111.625005,-29.7667,0 - -120.016665,-24.0167,0 - -121.575,-24.6,0 - -123.287505,-23.25,0 - -126.55416,-21.6333,0 - -130.12083,-21.75,0 - -134.4,-23.6167,0 - -137.24166,-21.0,0 - -138.724995,-18.5833,0 - -135.89583,-8.9,0 - -131.041665,-8.8167,0 - -126.766665,-9.4667,0 - -124.19166,-9.7667,0 - -123.462495,-12.1,0 - -120.49167,-13.5167,0 - -117.03333,-6.8333,0 - -110.92083,-3.35,0 - -108.625005,-3.25,0 - -103.037505,-5.0833,0 - - - - 1 - clampToGround - - -177.90417,29.0833,0 - -179.999999,29.065693,0 - - - - 1 - clampToGround - - 179.999999,29.065693,0 - 165.94584,28.0833,0 - 160.750005,30.2167,0 - 152.500005,33.1667,0 - - - - 1 - clampToGround - - -177.90417,29.0833,0 - -176.69166,15.1833,0 - -179.999999,15.289721,0 - - - - 1 - clampToGround - - 179.999999,15.289721,0 - 166.19166,15.2,0 - 165.94584,28.0833,0 - 162.504165,24.6,0 - 161.63334,23.5667,0 - 151.750005,25.3333,0 - 146.162505,25.65,0 - - - - 1 - clampToGround - - 166.19166,15.2,0 - 160.362495,10.8333,0 - 152.55,6.2,0 - 146.045835,9.8833,0 - - - - 1 - clampToGround - - -137.325,55.9,0 - -136.43334,52.7667,0 - -133.8,53.5,0 - - - - 1 - clampToGround - - -136.43334,52.7667,0 - -132.733335,49.6167,0 - -128.91666,49.85,0 - - - - 1 - clampToGround - - -137.325,55.9,0 - -133.8,53.5,0 - -128.91666,49.85,0 - -127.35834,48.0,0 - -123.700005,42.5833,0 - -120.537495,40.0,0 - -120.2625,35.7833,0 - -121.46667,31.8833,0 - -123.920835,32.2833,0 - - - - 1 - clampToGround - - -128.91666,49.85,0 - -125.875005,48.2,0 - -124.27083,47.7833,0 - -117.83334,47.7167,0 - -116.275005,48.4,0 - -118.35417,50.35,0 - - - - 1 - clampToGround - - -132.733335,49.6167,0 - -132.625005,44.8667,0 - -132.954165,40.95,0 - -120.537495,40.0,0 - - - - 1 - clampToGround - - -132.954165,40.95,0 - -133.704165,38.8333,0 - -137.35416,38.3167,0 - - - - 1 - clampToGround - - -132.733335,49.6167,0 - -138.949995,49.2167,0 - -154.0875,50.6833,0 - - - - 1 - clampToGround - - -161.562495,24.5833,0 - -162.08334,30.1,0 - -160.13334,27.2667,0 - -161.562495,24.5833,0 - -157.12917,15.35,0 - -153.649995,9.15,0 - -149.491665,2.7667,0 - -151.60833,3.2,0 - -154.64166,5.4833,0 - -164.266665,7.8833,0 - -167.829165,7.5833,0 - -179.999999,6.883096,0 - - - - 1 - clampToGround - - 179.999999,6.883096,0 - 179.829165,6.8667,0 - 174.987495,5.6333,0 - 171.991665,6.3833,0 - 169.291665,3.2833,0 - 171.733335,1.25,0 - 175.512495,1.7833,0 - 174.987495,5.6333,0 - - - - 1 - clampToGround - - 169.291665,3.2833,0 - 165.96666,3.8167,0 - - - - 1 - clampToGround - - 26.88333,49.3167,0 - 20.983335,54.9333,0 - 13.50834,55.95,0 - 3.85833,57.0333,0 - -14.06667,61.75,0 - -37.11666,63.0667,0 - -52.43334,60.7167,0 - -45.19584,48.0333,0 - -44.09583,47.15,0 - -24.42084,41.5,0 - -10.45416,31.5333,0 - -10.37916,33.0833,0 - -12.583335,44.4833,0 - -3.4875,47.7833,0 - 11.628570635,49.5660797343,0 - 26.88333,49.3167,0 - - - - 1 - clampToGround - - 3.85833,57.0333,0 - -1.54584,53.7,0 - -14.537505,56.3833,0 - -14.06667,61.75,0 - - - - 1 - clampToGround - - -37.11666,63.0667,0 - -32.25417,59.05,0 - -31.975005,54.0667,0 - -36.7875,51.6833,0 - -25.725,42.9167,0 - -24.42084,41.5,0 - - - - 1 - clampToGround - - -142.19583,89.25,0 - -179.99999,89.525554,0 - - - - 1 - clampToGround - - 179.99999,89.525554,0 - 83.045835,86.5833,0 - 71.491665,82.0333,0 - 56.012505,77.8,0 - 64.375005,75.75,0 - 50.18334,71.8333,0 - 42.67917,74.15,0 - 56.012505,77.8,0 - - - - 1 - clampToGround - - 174.83334,77.6167,0 - 162.42084,66.2,0 - 152.712495,58.2,0 - 139.64583,62.5833,0 - 142.1625,70.55,0 - 174.83334,77.6167,0 - - - - 1 - clampToGround - - 142.1625,70.55,0 - 162.42084,66.2,0 - - - - 1 - clampToGround - - -55.366665,-76.9167,0 - -21.133335,-78.6,0 - 4.58334,-79.3,0 - -18.55416,-80.55,0 - -54.837495,-77.4833,0 - -55.366665,-76.9167,0 - - - - 1 - clampToGround - - 50.84583,-59.3333,0 - 40.624995,-64.9667,0 - 49.37916,-58.8,0 - - - - 1 - clampToGround - - 17.495835,17.5167,0 - 17.96667,27.8833,0 - 6.733335,28.2667,0 - - - - 1 - clampToGround - - 98.345835,-38.7333,0 - 100.94166,-38.3167,0 - 104.683335,-37.1,0 - 106.60416,-37.05,0 - 107.36667,-37.9167,0 - 107.50833,-39.3333,0 - 107.083335,-40.5,0 - 105.77916,-42.1,0 - 102.212505,-43.6667,0 - 98.374995,-42.3167,0 - - - - 1 - clampToGround - - 53.233335,31.3667,0 - 51.954165,29.1,0 - 53.67084,26.7167,0 - 55.6875,26.3,0 - 57.400005,26.0667,0 - 59.39583,26.8833,0 - 60.358335,29.85,0 - - - - 1 - clampToGround - - 11.93334,-59.7,0 - 3.7875,-58.75,0 - - - - 1 - clampToGround - - 7.79166,-57.1167,0 - 6.649995,-63.1,0 - - - - 1 - clampToGround - - 2.1,-24.7167,0 - 2.533335,-22.6167,0 - 3.954165,-17.5333,0 - 7.4625,-16.5167,0 - 8.59584,-23.4,0 - 2.533335,-22.6167,0 - - - - 1 - clampToGround - - 14.008335,38.3167,0 - 8.4375,41.35,0 - - - - 1 - clampToGround - - 112.6875,27.9667,0 - 117.6375,32.9167,0 - 119.754165,35.0833,0 - 125.55417,40.25,0 - 130.35834,45.2667,0 - - - - 1 - clampToGround - - 138.23334,30.2333,0 - 131.55417,33.9667,0 - 125.55417,40.25,0 - 116.24166,45.1333,0 - 112.425,51.7333,0 - - - - 1 - clampToGround - - 128.304165,11.3,0 - 129.387495,14.6,0 - 129.912495,15.9167,0 - 131.6625,16.1333,0 - 130.862505,15.0833,0 - 129.387495,14.6,0 - - - - 1 - clampToGround - - -7.150005,69.3333,0 - 8.37084,69.7833,0 - 31.099995,64.3667,0 - 51.23334,58.9667,0 - 60.475005,58.5667,0 - 65.99583,61.5,0 - 77.200005,65.7167,0 - 95.266665,72.7333,0 - 108.887505,73.35,0 - 117.04167,70.2667,0 - 108.137505,67.6667,0 - 88.38333,56.8667,0 - 83.041665,55.1833,0 - 82.60833,52.3167,0 - 89.149995,51.4833,0 - 88.38333,56.8667,0 - - - - 1 - clampToGround - - 138.958335,5.25,0 - 138.620835,10.0,0 - 137.5875,10.1333,0 - - - - 1 - clampToGround - - 152.05833,-46.9667,0 - 160.666665,-46.8833,0 - 167.5875,-45.25,0 - - - - 1 - clampToGround - - 165.22083,-52.75,0 - 162.137505,-51.3167,0 - 160.666665,-46.8833,0 - 157.31667,-43.4833,0 - 153.90417,-41.35,0 - 151.525005,-39.55,0 - 148.483335,-37.3667,0 - - - - 1 - clampToGround - - 78.762495,36.8,0 - 70.725,38.9333,0 - 70.32084,31.6,0 - 75.075,30.9167,0 - 78.762495,36.8,0 - 80.92083,37.1333,0 - 89.0625,37.25,0 - 84.8625,46.0167,0 - 64.933335,46.3167,0 - 62.191665,44.9333,0 - 68.524995,42.45,0 - 84.8625,46.0167,0 - - - - 1 - clampToGround - - 75.075,30.9167,0 - 67.554165,21.4833,0 - 65.48334,19.15,0 - - - - 1 - clampToGround - - 75.075,30.9167,0 - 86.61666,27.7333,0 - 82.68333,26.1,0 - 78.75834,24.8333,0 - 78.662505,14.3833,0 - - - - 1 - clampToGround - - 86.61666,27.7333,0 - 89.44167,29.25,0 - 78.762495,36.8,0 - - - - 1 - clampToGround - - 89.44167,29.25,0 - 91.88334,28.7667,0 - 92.191665,20.8167,0 - 95.925,21.7667,0 - 101.412495,20.55,0 - 101.754165,18.1833,0 - - - - 1 - clampToGround - - -173.562495,-77.25,0 - -123.19167,-74.25,0 - -140.10417,-68.2667,0 - -144.5625,-68.6667,0 - -150.30834,-61.5667,0 - - - - 1 - clampToGround - - 129.391665,-47.2833,0 - 139.962495,-53.45,0 - 149.47917,-54.9833,0 - - - - 1 - clampToGround - - 139.962495,-53.45,0 - 133.704165,-58.45,0 - - - - 1 - clampToGround - - 157.38333,47.7167,0 - 157.820835,50.2833,0 - 155.89167,52.2333,0 - 156.129165,49.4667,0 - 157.38333,47.7167,0 - 160.12917,44.2667,0 - 157.62084,43.1333,0 - 155.25834,46.5333,0 - 157.38333,47.7167,0 - - - - 1 - clampToGround - - 157.62084,43.1333,0 - 153.995835,37.75,0 - - - - 1 - clampToGround - - 46.01667,-25.2833,0 - 42.72084,-16.05,0 - 49.249995,-9.3833,0 - 53.88333,-14.7833,0 - 54.25416,-28.1333,0 - 54.66666,-29.7833,0 - - - - 1 - clampToGround - - 53.88333,-14.7833,0 - 42.72084,-16.05,0 - - - - 1 - clampToGround - - 40.483335,-47.4,0 - 48.07083,-52.1,0 - 50.66667,-44.7,0 - 53.787495,-41.1667,0 - 60.03333,-38.4,0 - 61.64583,-36.8,0 - 57.737505,-33.6167,0 - 50.454165,-36.2667,0 - 50.341665,-40.65,0 - 44.63334,-43.1333,0 - 40.483335,-47.4,0 - 34.849995,-46.0667,0 - - - - 1 - clampToGround - - 99.23334,38.7833,0 - 101.195835,37.6,0 - 103.624995,36.9,0 - 104.73333,32.6833,0 - 102.51666,33.3667,0 - 101.195835,37.6,0 - - - - 1 - clampToGround - - -87.437505,-74.75,0 - -97.029165,-76.35,0 - -106.20417,-74.9333,0 - -104.32083,-71.3167,0 - - - - 1 - clampToGround - - 132.49167,-33.7833,0 - 135.325005,-32.2667,0 - 139.487505,-32.1667,0 - 140.191665,-40.8167,0 - 132.12084,-43.9833,0 - 132.49167,-33.7833,0 - - - - 1 - clampToGround - - -3.6,-66.7167,0 - 4.39167,-67.95,0 - 9.29583,-69.1333,0 - 11.570835,-68.1167,0 - 15.56667,-71.55,0 - 8.116665,-72.1333,0 - 9.29583,-69.1333,0 - - - - 1 - clampToGround - - 61.62084,-45.1667,0 - 60.804165,-49.2333,0 - 64.95834,-50.1667,0 - 66.79584,-47.5667,0 - 61.62084,-45.1667,0 - - - - 1 - clampToGround - - 161.5125,-81.3833,0 - 36.733335,-83.6667,0 - 145.370835,-77.3833,0 - 161.5125,-81.3833,0 - - - - 1 - clampToGround - - 83.73333,12.5667,0 - 74.43333,9.3833,0 - 71.8232019466,-0.756420817757,0 - 69.287505,-10.5667,0 - 77.59584,-15.7167,0 - 81.3533729562,-6.70408744989,0 - 85.86666,4.5667,0 - 83.73333,12.5667,0 - - - - 1 - clampToGround - - 74.43333,9.3833,0 - 67.72917,1.9833,0 - 63.583335,-3.6833,0 - 64.57917,-4.7,0 - - - - 1 - clampToGround - - 85.86666,4.5667,0 - 86.974995,2.7167,0 - 90.437505,1.3,0 - 91.362495,2.5,0 - 90.15834,2.9333,0 - - - - 1 - clampToGround - - 69.287505,-10.5667,0 - 67.783335,-16.6167,0 - 66.75834,-18.4667,0 - 66.025005,-20.0333,0 - 68.03334,-21.4667,0 - - - - 1 - clampToGround - - 77.59584,-15.7167,0 - 80.25417,-21.1,0 - 80.500005,-25.0,0 - 81.59166,-24.1833,0 - - - - 1 - clampToGround - - 126.40833,-56.7333,0 - 122.17917,-66.1833,0 - 131.237505,-66.2,0 - 141.612495,-65.3667,0 - 126.40833,-56.7333,0 - - - - 1 - clampToGround - - 122.17917,-66.1833,0 - 104.237505,-67.25,0 - 100.75833,-71.4333,0 - 120.14583,-72.9,0 - 122.17917,-66.1833,0 - - - - 1 - clampToGround - - 104.237505,-67.25,0 - 103.05417,-62.1833,0 - 97.84167,-62.2667,0 - 95.80833,-61.4833,0 - 92.14167,-63.6667,0 - 97.84167,-62.2667,0 - - - - 1 - clampToGround - - 92.14167,-63.6667,0 - 86.43333,-64.7333,0 - - - - 1 - clampToGround - - 152.533335,-32.55,0 - 157.875,-32.35,0 - 163.12917,-32.8667,0 - 163.9875,-32.5333,0 - 164.412495,-29.6167,0 - 160.16667,-27.05,0 - 152.533335,-32.55,0 - 146.93334,-30.9,0 - 146.237505,-33.0333,0 - 152.09583,-33.0,0 - 152.533335,-32.55,0 - - - - 1 - clampToGround - - -116.39583,-62.4667,0 - -123.949995,-64.8,0 - -120.312495,-61.4,0 - -115.88334,-59.3167,0 - -116.39583,-62.4667,0 - - - - 1 - clampToGround - - 82.69167,-37.3,0 - 83.4,-37.1,0 - 85.62084,-39.0333,0 - 86.89584,-40.1167,0 - 84.32916,-43.0,0 - 78.0375,-43.2333,0 - 73.64583,-42.35,0 - 73.08333,-38.0167,0 - 72.541665,-34.3,0 - 68.97084,-28.2167,0 - 67.35417,-26.4333,0 - 65.299995,-25.5833,0 - 63.0,-19.4667,0 - 61.35834,-19.8,0 - 60.08334,-22.6167,0 - - - - 1 - clampToGround - - 65.299995,-25.5833,0 - 59.224995,-29.2167,0 - 59.712495,-26.1167,0 - - - - 1 - clampToGround - - 101.791665,-4.75,0 - 98.800005,-8.25,0 - 97.300005,-14.5667,0 - - - - 1 - clampToGround - - 56.54583,15.4167,0 - 59.112495,15.65,0 - 57.18333,18.1333,0 - 56.54583,15.4167,0 - 53.70417,10.5333,0 - 56.07084,6.4167,0 - 57.70416,4.4833,0 - 57.40416,-3.4167,0 - 64.57917,-4.7,0 - 66.954165,-8.3667,0 - 80.20416,-12.85,0 - 84.400005,-15.4,0 - 85.35417,-12.8667,0 - 89.754165,-9.7833,0 - 95.325,-2.8833,0 - 91.362495,2.5,0 - 90.15834,2.9333,0 - 91.8375,9.5667,0 - - - - 1 - clampToGround - - 119.69166,19.4833,0 - 116.84583,18.5333,0 - 115.024995,18.0167,0 - - - - 1 - clampToGround - - 116.84583,18.5333,0 - 115.258335,17.4833,0 - - - - 1 - clampToGround - - 105.654165,-29.8667,0 - 106.73334,-27.6667,0 - 103.816665,-26.3,0 - 101.416665,-27.0,0 - 105.654165,-29.8667,0 - - - - 1 - clampToGround - - 101.416665,-27.0,0 - 96.991665,-25.4333,0 - 95.25,-29.8167,0 - 91.450005,-30.4333,0 - 96.04167,-34.3833,0 - 95.25,-29.8167,0 - - - - 1 - clampToGround - - 96.04167,-34.3833,0 - 105.654165,-29.8667,0 - 110.974995,-40.6167,0 - 110.65833,-44.4667,0 - - - - 1 - clampToGround - - 41.9625,-79.0333,0 - 65.087505,-78.7,0 - 68.3625,-78.8833,0 - 70.76667,-77.5167,0 - 65.087505,-78.7,0 - - - - 1 - clampToGround - - 116.562495,10.6167,0 - 111.37083,3.1167,0 - 106.562505,-4.8833,0 - 114.17916,-1.3,0 - 118.12083,1.0,0 - 122.824995,-0.8167,0 - 118.82916,6.4,0 - 117.695835,8.8667,0 - 116.562495,10.6167,0 - 106.35417,13.8667,0 - 104.904165,15.0667,0 - - - - 1 - clampToGround - - 151.445835,-0.3167,0 - 155.412495,-1.3833,0 - 158.837505,-0.1167,0 - 156.316665,1.3667,0 - 151.445835,-0.3167,0 - 142.891665,-5.5833,0 - 137.4,-11.3833,0 - 133.16667,-8.9833,0 - 131.92083,-9.5,0 - - - - 1 - clampToGround - - 142.891665,-5.5833,0 - 151.60833,-13.8667,0 - - - - 1 - clampToGround - - 151.445835,-0.3167,0 - 150.82917,-2.15,0 - 154.20417,-7.7833,0 - 163.15416,-7.5833,0 - 168.583335,-6.05,0 - 168.97083,-9.0833,0 - 163.662495,-15.8167,0 - 162.400005,-13.5833,0 - 163.15416,-7.5833,0 - - - - 1 - clampToGround - - 169.474995,-9.1833,0 - 170.74167,-20.1,0 - 171.512505,-20.6333,0 - 173.32083,-20.9167,0 - - - - 1 - clampToGround - - 168.97083,-9.0833,0 - 167.3625,-21.1667,0 - 167.475,-22.45,0 - 166.670835,-23.75,0 - - - - 1 - clampToGround - - 82.962495,-49.8833,0 - 81.325005,-55.5333,0 - 81.349995,-56.3833,0 - 82.774995,-60.6833,0 - - - - 1 - clampToGround - - 81.325005,-55.5333,0 - 74.65833,-55.9833,0 - - - - 1 - clampToGround - - 74.89584,-53.15,0 - 74.65833,-55.9833,0 - 72.44583,-59.05,0 - - - - 1 - clampToGround - - -53.566665,-66.1333,0 - -58.0125,-68.6167,0 - -64.54584,-72.6,0 - -72.812505,-70.5,0 - -58.0125,-68.6167,0 - -44.387505,-66.4,0 - -53.566665,-66.1333,0 - - - - 1 - clampToGround - - -70.79166,-67.95,0 - -58.0125,-68.6167,0 - -50.229165,-70.3833,0 - - - - 1 - clampToGround - - 118.366665,24.0833,0 - 112.179165,24.6667,0 - 109.05417,21.4,0 - - - - 1 - clampToGround - - 36.3,51.85,0 - 34.09584,46.0833,0 - 31.1947287566,33.4972474155,0 - 28.670835,18.4,0 - 27.36666,15.8,0 - - - - 1 - clampToGround - - 38.02083,38.3167,0 - 37.95834,30.3833,0 - 33.916665,19.1833,0 - 40.287495,13.7167,0 - 41.24583,27.0833,0 - 48.874995,33.3167,0 - 45.4875,40.3833,0 - 38.02083,38.3167,0 - 34.09584,46.0833,0 - - - - 1 - clampToGround - - 48.874995,33.3167,0 - 51.124995,37.3833,0 - - - - 1 - clampToGround - - 37.95834,30.3833,0 - 38.67084,29.75,0 - 41.24583,27.0833,0 - - - - 1 - clampToGround - - 146.758335,-16.1333,0 - 145.02084,-16.6667,0 - 140.562495,-16.8333,0 - 136.487505,-17.2333,0 - 125.25417,-14.7833,0 - 124.512495,-12.5333,0 - - - - 1 - clampToGround - - 140.562495,-16.8333,0 - 142.179165,-21.8167,0 - 141.66666,-22.4167,0 - 136.487505,-17.2333,0 - - - - 1 - clampToGround - - 136.487505,-17.2333,0 - 136.099995,-19.85,0 - 127.212495,-17.8167,0 - 125.25417,-14.7833,0 - - - - 1 - clampToGround - - 136.099995,-19.85,0 - 136.783335,-25.0,0 - - - - 1 - clampToGround - - 127.212495,-17.8167,0 - 131.524995,-25.2667,0 - 132.954165,-26.9333,0 - - - - 1 - clampToGround - - 169.35834,-58.2333,0 - 179.979165,-65.5833,0 - 179.999999,-65.585254,0 - - - - 1 - clampToGround - - -179.999999,-65.585254,0 - -174.98334,-64.8833,0 - -172.112505,-62.9667,0 - -179.999999,-61.427337,0 - - - - 1 - clampToGround - - 179.999999,-61.427337,0 - 169.35834,-58.2333,0 - 154.624995,-60.25,0 - - - - 1 - clampToGround - - 156.82917,-64.95,0 - 169.35834,-58.2333,0 - - - - 1 - clampToGround - - 72.166665,-69.0333,0 - 58.787505,-63.4333,0 - 54.17916,-66.3167,0 - 49.72917,-68.6833,0 - 72.166665,-69.0333,0 - - - - 1 - clampToGround - - 92.80416,-45.95,0 - 96.74583,-45.9667,0 - 97.937505,-45.9167,0 - 113.80416,-48.1,0 - 110.712495,-54.4333,0 - 104.61666,-52.9333,0 - 97.20834,-49.0667,0 - 92.80416,-45.95,0 - - - - - - diff --git a/tools/data/constellations.ascii b/tools/data/constellations.ascii index 6de9c47ed..6fbeec716 100644 --- a/tools/data/constellations.ascii +++ b/tools/data/constellations.ascii @@ -1,3 +1,8 @@ +# The canonical source of constellation data (unlike the stars and messier proto files +# which are derived from CSV). +# TODO(jontayler): some of the labels will be attached to incorrect constellations. Since +# at present we show all the constellations or none this does not matter, but we should fix +# it. source { search_location { right_ascension: 83.718834 diff --git a/tools/data/constellations_R.ascii b/tools/data/constellations_R.ascii index fa4d152c6..8e248a91f 100644 --- a/tools/data/constellations_R.ascii +++ b/tools/data/constellations_R.ascii @@ -1,3 +1,8 @@ +# The canonical source of constellation data (unlike the stars and messier proto files +# which are derived from CSV). +# TODO(jontayler): some of the labels will be attached to incorrect constellations. Since +# at present we show all the constellations or none this does not matter, but we should fix +# it. source { search_location { right_ascension: 83.718834 diff --git a/tools/generate.sh b/tools/generate.sh index 38fc9fc34..d5f5c5515 100755 --- a/tools/generate.sh +++ b/tools/generate.sh @@ -1,7 +1,7 @@ DATA_DIR=data TOOL=build/install/datagen/bin/datagen -$TOOL GenConstellations $DATA_DIR/constellation_names_and_lines.kml $DATA_DIR/constellations +# Note, constellation data is already in proto form. $TOOL GenMessier $DATA_DIR/messier.csv $DATA_DIR/messier $TOOL GenStars $DATA_DIR/stardata_names.txt $DATA_DIR/stars diff --git a/tools/src/main/java/com/google/android/stardroid/data/ConstellationProtoWriter.java b/tools/src/main/java/com/google/android/stardroid/data/ConstellationProtoWriter.java deleted file mode 100644 index 21e04a696..000000000 --- a/tools/src/main/java/com/google/android/stardroid/data/ConstellationProtoWriter.java +++ /dev/null @@ -1,307 +0,0 @@ -// Copyright 2010 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package com.google.android.stardroid.data; - -import com.google.android.stardroid.base.Lists; -import com.google.android.stardroid.source.proto.SourceFullProto.AstronomicalSourceProto; -import com.google.android.stardroid.source.proto.SourceFullProto.AstronomicalSourcesProto; -import com.google.android.stardroid.source.proto.SourceFullProto.GeocentricCoordinatesProto; -import com.google.android.stardroid.source.proto.SourceFullProto.LabelElementProto; -import com.google.android.stardroid.source.proto.SourceFullProto.LineElementProto; -import com.google.common.io.Closeables; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -/** - * Class for reading the constellation KML file and writing the contents to a - * protocol buffer - * - * @author Brent Bryan - */ -public class ConstellationProtoWriter { - private static final double ANGULAR_TOLERANCE_FOR_COINCIDENCE = 0.001; - - private static int LABEL_COLOR = 0x80c97cb2; - - private static final String NAME_DELIMITER = "[|]+"; - /** - * Get the string id form of the object name (that is, of the form R.string.foo). - * @param name object name - */ - private static String rKeyFromName(String name) { - return "R.string." + name.replaceAll(" ", "_").toLowerCase(); - } - - /** - * Gets the list of constellation names. First will be used for label, rest - * as search terms. - * - * @param nameList pipe-separated object names - */ - private static List namesFromList(String nameList) { - return Lists.asList(nameList.split(NAME_DELIMITER)); - } - - public static List readLabels(String filename) { - List result = new ArrayList<>(); - try { - BufferedReader in = new BufferedReader(new FileReader(new File(filename))); - - String s; - int num = 0; - while ((s = in.readLine()) != null) { - s = s.trim(); - if (!s.equals("")) continue; - - s = in.readLine().trim(); - if (s.indexOf("") < 0) continue; - - String namesList = s.substring(6, s.length() - 7); - List names = namesFromList(namesList); - if (names.isEmpty()) { - throw new RuntimeException("Bad constellation name line " + s); - } - String labelName = names.get(0); - - in.readLine(); // style url line. - in.readLine(); // Point - s = in.readLine().trim(); - if (s.indexOf("") < 0 && s.indexOf("") < 0) { - throw new RuntimeException("Unexpected coordinate line: " + s); - } - s = s.substring(13, s.length() - 14); - String[] tokens = s.split(","); - float ra = getRa(Float.parseFloat(tokens[0])); - float dec = Float.parseFloat(tokens[1]); - - - System.out.println("Adding label for " + labelName); - LabelElementProto.Builder labelBuilder = LabelElementProto.newBuilder(); - labelBuilder.setColor(LABEL_COLOR); - labelBuilder.setREMOVEStringIndex(rKeyFromName(labelName)); - labelBuilder.setLocation(getCoords(ra, dec)); - LabelWithSynonyms labelWithSynonyms = new LabelWithSynonyms(labelBuilder.build(), names); - result.add(labelWithSynonyms); - num++; - - } - in.close(); - - System.out.println("Number of constellation names added: " + num); - - return result; - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - return null; - } - - private static float getRa(float ra) { - float result = ra + 180; - return result; - } - - private static GeocentricCoordinatesProto getCoords(float ra, float dec) { - return GeocentricCoordinatesProto.newBuilder() - .setDeclination(dec) - .setRightAscension(ra) - .build(); - } - - private static AstronomicalSourcesProto.Builder readLines(String filename) { - List sourceList = new ArrayList<>(); - try { - BufferedReader in = new BufferedReader(new FileReader(new File(filename))); - - String s; - int num = 0; - while ((s = in.readLine()) != null) { - s = s.trim(); - if (!s.equals("")) continue; - in.readLine(); // tessellate - in.readLine(); // altitude - s = in.readLine().trim(); - if (!s.equals("")) { - throw new RuntimeException("Unexpected coordinate line: " + s); - } - - LineElementProto.Builder lineElementBuilder = LineElementProto.newBuilder(); - lineElementBuilder.setColor(LABEL_COLOR); - while (!(s = in.readLine().trim()).equals("")) { - String[] tokens = s.split(","); - float ra = getRa(Float.parseFloat(tokens[0])); - float dec = Float.parseFloat(tokens[1]); - lineElementBuilder.addVertex(getCoords(ra, dec)); - } - addToList(sourceList, lineElementBuilder); - } - - System.out.println(num + " " + sourceList.size()); - AstronomicalSourcesProto.Builder result = AstronomicalSourcesProto.newBuilder(); - for (AstronomicalSourceProto.Builder sourceBuilder : sourceList) { - result.addSource(sourceBuilder); - } - return result; - } catch (IOException e) { - e.printStackTrace(); - System.exit(1); - } - return null; - } - - private static void addToList(List list, - LineElementProto.Builder newLine) { - - for (AstronomicalSourceProto.Builder constellation : list) { - for (LineElementProto line : constellation.getLineList()) { - if (sharePoint(line, newLine)) { - constellation.addLine(newLine); - return; - } - } - } - - list.add(AstronomicalSourceProto.newBuilder().addLine(newLine)); - } - - private static boolean sharePoint(LineElementProto p1, LineElementProto.Builder p2) { - for (GeocentricCoordinatesProto v1 : p1.getVertexList()) { - for (GeocentricCoordinatesProto v2 : p2.getVertexList()) { - if (naiveAngularDistanceBetweenPoints(v1, v2) < ANGULAR_TOLERANCE_FOR_COINCIDENCE) { - return true; - } - } - } - return false; - } - - /** - * Calculates the supposed angular distance between two points. - * It's not going to work near the poles - two identical points could have 90 deg dec and - * different RAs and this would calculate them as distant. - */ - private static double naiveAngularDistanceBetweenPoints( - GeocentricCoordinatesProto p1, GeocentricCoordinatesProto p2) { - double t = 0.0; - t += (p1.getRightAscension() - p2.getRightAscension()) * - (p1.getRightAscension() - p2.getRightAscension()); - t += (p1.getDeclination() - p2.getDeclination()) * (p1.getDeclination() - p2.getDeclination()); - return Math.sqrt(t); - } - - private static AstronomicalSourcesProto combineLabelsConstellations( - Set labels, AstronomicalSourcesProto.Builder constellations) { - AstronomicalSourcesProto.Builder result = AstronomicalSourcesProto.newBuilder(); - System.out.println("Combining " + labels.size() + " labels with " - + constellations.getSourceList().size() + " constellations"); - for (AstronomicalSourceProto constellation : constellations.getSourceList()) { - GeocentricCoordinatesProto centroid = getNaiveCentroid(constellation); - double closestDistanceSoFar = Double.MAX_VALUE; - LabelWithSynonyms closestLabelSoFar = null; - for (LabelWithSynonyms label : labels) { - double labelConstellationDistance = naiveAngularDistanceBetweenPoints( - label.label.getLocation(), centroid); - if (labelConstellationDistance < closestDistanceSoFar) { - closestDistanceSoFar = labelConstellationDistance; - closestLabelSoFar = label; - } - } - AstronomicalSourceProto.Builder sourceBuilder = AstronomicalSourceProto.newBuilder(); - sourceBuilder.mergeFrom(constellation); - if (closestLabelSoFar != null) { - labels.remove(closestLabelSoFar); - sourceBuilder.addLabel(closestLabelSoFar.label); - sourceBuilder.setSearchLocation(closestLabelSoFar.label.getLocation()); - for (String name : closestLabelSoFar.synonyms) { - sourceBuilder.addREMOVENameIds(rKeyFromName(name)); - } - } - result.addSource(sourceBuilder); - } - return result.build(); - } - - private static GeocentricCoordinatesProto getNaiveCentroid( - AstronomicalSourceProto constellation) { - double ra = 0; - double dec = 0; - int count = 0; - for (LineElementProto line : constellation.getLineList()) { - for (GeocentricCoordinatesProto vertex : line.getVertexList()) { - ra += vertex.getRightAscension(); - dec += vertex.getDeclination(); - count++; - } - } - GeocentricCoordinatesProto result = GeocentricCoordinatesProto.newBuilder() - .setDeclination((float) (dec / count)).setRightAscension((float) ra / count).build(); - return result; - } - - /** - * Processes the constellation kml and turns it into a proto buffer. Does a naive - * job of matching constellation labels to the constellations. For each constellation we - * find the nearest label that hasn't yet been assigned. This just guarantees that all - * the labels will be used - some are certainly going to be applied to the wrong - * constellation. - * TODO(johntaylor): correct the constellation name assignment before we allow individual - * constellations to be selected in the app. - */ - public static void main(String[] args) throws IOException { - if (args.length != 2) { - System.out.println("Usage: ConstellationWriter "); - System.exit(0); - } - - args[0] = args[0].trim(); - args[1] = args[1].trim(); - - List labels = readLabels(args[0]); - System.out.println("number of labels: " + labels.size()); - AstronomicalSourcesProto.Builder constellations = readLines(args[0]); - System.out.println("number of constellations: " + constellations.getSourceList().size()); - AstronomicalSourcesProto sources = combineLabelsConstellations( - new HashSet(labels), constellations); - - PrintWriter writer = null; - try { - writer = new PrintWriter(new FileWriter(args[1] + "_R.ascii")); - writer.append(sources.toString()); - } finally { - Closeables.close(writer, false); - } - - System.out.println("Successfully wrote " + sources.getSourceCount() + " sources."); - } - - private static class LabelWithSynonyms { - LabelWithSynonyms(LabelElementProto label, List synonyms) { - this.label = label; - this.synonyms = synonyms; - } - LabelElementProto label; - List synonyms; - } -} diff --git a/tools/src/main/java/com/google/android/stardroid/data/Main.java b/tools/src/main/java/com/google/android/stardroid/data/Main.java index 9d1f9198f..1c94428b3 100644 --- a/tools/src/main/java/com/google/android/stardroid/data/Main.java +++ b/tools/src/main/java/com/google/android/stardroid/data/Main.java @@ -8,12 +8,12 @@ * Usage: * java com.google.android.stardroid.data.Main * - * where command is one of GenStars, GenConstellations, GenMessier, Rewrite, Binary + * where command is one of GenStars, GenMessier, Rewrite, Binary * See the various writer classes for the args. */ public class Main { private enum Command { - GenStars, GenConstellations, GenMessier, Rewrite, Binary + GenStars, GenMessier, Rewrite, Binary } public static void main(String[] in) throws IOException { @@ -30,9 +30,6 @@ public static void main(String[] in) throws IOException { case GenStars: StellarProtoWriter.main(args); break; - case GenConstellations: - ConstellationProtoWriter.main(args); - break; case GenMessier: MessierProtoWriter.main(args); break; From ecb6c13a8eee4bd30814370086fbe52c6e806a34 Mon Sep 17 00:00:00 2001 From: John David Taylor Date: Tue, 8 Mar 2016 10:29:57 -0500 Subject: [PATCH 2/2] Remove incorrect comment. --- app/build.gradle | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 0515c9ce4..21087a44a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -12,8 +12,6 @@ android { versionName "1.8.1 - beta2" buildConfigField 'String', 'GOOGLE_ANALYTICS_CODE', '""' } - // Set the environment variables KSTOREPWD and KEYPWD to the keystore - // and key passwords to generate a signed release.. signingConfigs { release { Properties properties = new Properties()