Suche senden
Hochladen
python-geohex
•
Als KEY, PDF herunterladen
•
0 gefällt mir
•
469 views
遼
遼 会田
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 29
Jetzt herunterladen
Empfohlen
Ugd9 c 7644
Ugd9 c 7644
Yohanes G
Virapix-ClassDiagram
Virapix-ClassDiagram
Mandar Kashelikar
Dsa 1
Dsa 1
Harisrasheed48
python-geohex
python-geohex
Ryo Aita
Info clasa
Info clasa
Ilinca Ostroschi
Practica 4 errores
Practica 4 errores
UVM
Los fantastico
Los fantastico
Brenda Jazmin
[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template
Seok-joon Yun
Empfohlen
Ugd9 c 7644
Ugd9 c 7644
Yohanes G
Virapix-ClassDiagram
Virapix-ClassDiagram
Mandar Kashelikar
Dsa 1
Dsa 1
Harisrasheed48
python-geohex
python-geohex
Ryo Aita
Info clasa
Info clasa
Ilinca Ostroschi
Practica 4 errores
Practica 4 errores
UVM
Los fantastico
Los fantastico
Brenda Jazmin
[KOSSA] C++ Programming - 14th Study - template
[KOSSA] C++ Programming - 14th Study - template
Seok-joon Yun
Img 0004
Img 0004
saep_mulyadi
Programación funcional en Haskell
Programación funcional en Haskell
Roberto Bonvallet
Gauss jordan
Gauss jordan
Diego Zevallos
Pruebabfs
Pruebabfs
Jorge
Clear all
Clear all
SeptiNia Choirun Nisa
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
Atsushi Tadokoro
Vcs12
Vcs12
Malikireddy Bramhananda Reddy
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
Atsushi Tadokoro
1
1
Aeew Autaporn
Programs
Programs
Murali Kummitha
Python codigo graficas
Python codigo graficas
Brayan Kalaka
Assignment
Assignment
Mitch Sagabaen
Vcs21
Vcs21
Malikireddy Bramhananda Reddy
Cg lab cse-vii
Cg lab cse-vii
sajjan93
Scanfill polygon
Scanfill polygon
Sonia Pahuja
Play fair cipher
Play fair cipher
Khawar Abbas
Absolute Loader
Absolute Loader
ksanthosh
Daniel snake
Daniel snake
Tefaa Salazar
Inserimento valuta
Inserimento valuta
Giuliana Zucchi
DefCamp 2012 @Bucharest
DefCamp 2012 @Bucharest
Avădănei Andrei
python-geohex
python-geohex
遼 会田
How you can become a hacker with no security experience
How you can become a hacker with no security experience
Avădănei Andrei
Weitere ähnliche Inhalte
Was ist angesagt?
Img 0004
Img 0004
saep_mulyadi
Programación funcional en Haskell
Programación funcional en Haskell
Roberto Bonvallet
Gauss jordan
Gauss jordan
Diego Zevallos
Pruebabfs
Pruebabfs
Jorge
Clear all
Clear all
SeptiNia Choirun Nisa
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
Atsushi Tadokoro
Vcs12
Vcs12
Malikireddy Bramhananda Reddy
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
Atsushi Tadokoro
1
1
Aeew Autaporn
Programs
Programs
Murali Kummitha
Python codigo graficas
Python codigo graficas
Brayan Kalaka
Assignment
Assignment
Mitch Sagabaen
Vcs21
Vcs21
Malikireddy Bramhananda Reddy
Cg lab cse-vii
Cg lab cse-vii
sajjan93
Scanfill polygon
Scanfill polygon
Sonia Pahuja
Play fair cipher
Play fair cipher
Khawar Abbas
Absolute Loader
Absolute Loader
ksanthosh
Daniel snake
Daniel snake
Tefaa Salazar
Was ist angesagt?
(18)
Img 0004
Img 0004
Programación funcional en Haskell
Programación funcional en Haskell
Gauss jordan
Gauss jordan
Pruebabfs
Pruebabfs
Clear all
Clear all
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
openFrameworks 動きを生みだす様々なアルゴリズム - 多摩美メディアアートII
Vcs12
Vcs12
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
openFrameworks基礎 動きを生みだす、アニメーション入門 - 芸大グラフィックスプログラミング演習B
1
1
Programs
Programs
Python codigo graficas
Python codigo graficas
Assignment
Assignment
Vcs21
Vcs21
Cg lab cse-vii
Cg lab cse-vii
Scanfill polygon
Scanfill polygon
Play fair cipher
Play fair cipher
Absolute Loader
Absolute Loader
Daniel snake
Daniel snake
Andere mochten auch
Inserimento valuta
Inserimento valuta
Giuliana Zucchi
DefCamp 2012 @Bucharest
DefCamp 2012 @Bucharest
Avădănei Andrei
python-geohex
python-geohex
遼 会田
How you can become a hacker with no security experience
How you can become a hacker with no security experience
Avădănei Andrei
Wordpress Plugins Scanner
Wordpress Plugins Scanner
Avădănei Andrei
SmartFender
SmartFender
Avădănei Andrei
2010 Amco Clear Catalog
2010 Amco Clear Catalog
jcrow14
Virtual Anonimity – What? Why? When? How?
Virtual Anonimity – What? Why? When? How?
Avădănei Andrei
Andere mochten auch
(8)
Inserimento valuta
Inserimento valuta
DefCamp 2012 @Bucharest
DefCamp 2012 @Bucharest
python-geohex
python-geohex
How you can become a hacker with no security experience
How you can become a hacker with no security experience
Wordpress Plugins Scanner
Wordpress Plugins Scanner
SmartFender
SmartFender
2010 Amco Clear Catalog
2010 Amco Clear Catalog
Virtual Anonimity – What? Why? When? How?
Virtual Anonimity – What? Why? When? How?
python-geohex
1.
python-geohex aita (twitter
id: @ryoaita)
2.
• aita (twitter
id: @ryoaita)
3.
python-geohex • GeoHex v2
Python • aita • https://bitbucket.org/__aita__/python- geohex • PyPI ......
4.
Geohex
5.
GeoHex • twitter id:
@sa2da • JavaScript • aita v2 JavaScript • •
6.
7.
8.
GeoHex •
Hex • • Hex • Hex
9.
http://geohex.net/
10.
v2 •
v1 • Level:0 1m 60cm Level:24 25 • 1:4 • 3 1311
11.
GeoHex •
v1, v2, v3 • • python-geohex v2 • v1 • v3 JavaScript • ( v2 85 • v1, v2 v3
12.
http://geogames.net/
13.
JS • • • • namespace
14.
(function (win) {
// // namspace GeoHex; if (!win.GeoHex) win.GeoHex = function(){}; // version: 2.03 GeoHex.version = "2.03"; // *** Share with all instances *** var h_key = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWX YZ"; var h_base = 20037508.34; var h_deg = Math.PI*(30/180); var h_k = Math.tan(h_deg); // private static var _zoneCache = {};
15.
var h_l =
xy2loc(h_x - 2 * h_size, h_y).lon; var h_r = xy2loc(h_x + 2 * h_size, h_y).lon; var h_cl = xy2loc(h_x - 1 * h_size, h_y).lon; var h_cr = xy2loc(h_x + 1 * h_size, h_y).lon; return [ {lat: h_lat, lon: h_l}, {lat: h_top, lon: h_cl}, {lat: h_top, lon: h_cr}, {lat: h_lat, lon: h_r}, {lat: h_btm, lon: h_cr}, {lat: h_btm, lon: h_cl} ]; };
16.
// var h_x_100000
= Math.floor(h_x_abs/777600000); var h_x_10000 = Math.floor((h_x_abs%777600000)/12960000); var h_x_1000 = Math.floor((h_x_abs%12960000)/216000); var h_x_100 = Math.floor((h_x_abs%216000)/3600); var h_x_10 = Math.floor((h_x_abs%3600)/60); var h_x_1 = Math.floor((h_x_abs%3600)%60); // var h_y_100000 = Math.floor(h_y_abs/777600000); var h_y_10000 = Math.floor((h_y_abs%777600000)/12960000); var h_y_1000 = Math.floor((h_y_abs%12960000)/216000); var h_y_100 = Math.floor((h_y_abs%216000)/3600); var h_y_10 = Math.floor((h_y_abs%3600)/60); var h_y_1 = Math.floor((h_y_abs%3600)%60); if(h_max >=60/2) h_code += h_key.charAt(h_x_10) + h_key.charAt(h_y_10); h_code += h_key.charAt(h_x_1) + h_key.charAt(h_y_1); if (!!_zoneCache[h_code]) return _zoneCache[h_code]; return (_zoneCache[h_code] = new Zone(z_loc_y, z_loc_x, h_x, h_y, h_code));
17.
if (h_max >=
12960000 / 2) { h_x = h_key.indexOf(code.charAt(1)) * 12960000 + h_key.indexOf(code.charAt(3)) * 216000 + h_key.indexOf(code.charAt(5)) * 3600 + h_key.indexOf(code.charAt(7)) * 60 + h_key.indexOf(code.charAt(9)); h_y = h_key.indexOf(code.charAt(2)) * 12960000 + h_key.indexOf(code.charAt(4)) * 216000 + h_key.indexOf(code.charAt(6)) * 3600 + h_key.indexOf(code.charAt(8)) * 60 + h_key.indexOf(code.charAt(10)); } else if (h_max >= 216000 / 2) { h_x = h_key.indexOf(code.charAt(1)) * 216000 + h_key.indexOf(code.charAt(3)) * 3600 + h_key.indexOf(code.charAt(5)) * 60 + h_key.indexOf(code.charAt(7)); h_y = h_key.indexOf(code.charAt(2)) * 216000 + h_key.indexOf(code.charAt(4)) * 3600 + h_key.indexOf(code.charAt(6)) * 60 + h_key.indexOf(code.charAt(8));
18.
JSer
desune
19.
aita
20.
#flagboy
21.
><
22.
python-geohex
23.
python-geohex • Python • Apache
License • JavaScript • GeoHex
24.
• •
geodjango • •
25.
python-geohex • aita
GeoHex • • __eq__ •
26.
#flagboy
27.
><
28.
de class RandomZoneTest(unittest.TestCase):
def testLocationToCode(self): for i in range(10000): lat = 85 * random.random() lon = 85 * random.random() level = random.randint(0,24) zone = geohex2.get_zone_by_location(lat, lon, level) code_zone = geohex2.get_zone_by_code(zone.code) self.assertEqual(zone, code_zone) def testLocationToXY(self): for i in range(10000): lat = 90 * random.random() lon = 90 * random.random() level = random.randint(0,24) zone = geohex2.get_zone_by_location(lat, lon, level) xy_zone = geohex2.get_zone_by_xy(zone.x, zone.y, zone.level) self.assertEqual(zone, xy_zone)
Hinweis der Redaktion
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Jetzt herunterladen