Bílý vrch
icon TrekBuddy
www.trekbuddy.net
Outdoor companion.
  • internal / bluetooth / simulator GPS
  • offline raster maps
  • smart GPX / raw NMEA logs
  • waypoints and simple navigation
  • custom views
  • MIDP and Symbian phones
  • Blackberry
  • Android
Visit wiki to see all features, guides and howtos. Project tracker.
Trekbuddy is on Github now

Partners:    (Polish/Polski)(Polski) Compass mapy      (Polish/Polski)(Polski) Galileos mapy      (Polish/Polski)(Polski) CartoMedia      (Czech/Èesky)(Èesky) Eaglesoft trasy      (Polish/Polski)(Polski) ExpressMap     

 FAQFAQ   SearchSearch   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
MOBAC - suradnicovy system

 
Post new topic   Reply to topic    TrekBuddy Forum Index -> Česky-Slovensky
View previous topic :: View next topic  
Author Message
dusanga



Joined: 21 Aug 2012
Posts: 15

PostPosted: Fri Nov 01, 2013 7:29 am    Post subject: MOBAC - suradnicovy system Reply with quote

Prosim o pomoc.
Pri vytvarani mapy pomocou Mobacu sa v hlavnom adresari ulozi XML
subor, ktory nesie informacie o vytvorenej mape.
Suradnice mapy su zapisane v nasledovnom formate:

<Layer name="14">
<Map maxTileCoordinate="2318079/1438463"
minTileCoordinate="2317824/1438208"
mapSource="mtbmap.cz"
zoom="14"
name="14 14">
<parameters format="JPEG50" height="256" width="256"/>
</Map>
</Layer>

Akym sposobom sa konvertuju suradnice do formatu stupen/minuta/sekunda?

Dakujem.
Back to top
View user's profile Send private message Visit poster's website
Šumil



Joined: 01 Oct 2008
Posts: 226
Location: Trencin, SK

PostPosted: Fri Nov 01, 2013 10:36 am    Post subject: Reply with quote

V MOBAC máš vľavo hore kontextovú ponuku "Selection coordinates" a v nej rozbaľovaciu ponuku "Fmt". V nej zvolíš ponuku Deg Min Sec (local) alebo (eng) podľa toho či chceš mať sekundy oddelené čiarkou alebo bodkou.
_________________
Nokia 6300, LD-3W, 1.2.5
Back to top
View user's profile Send private message
dusanga



Joined: 21 Aug 2012
Posts: 15

PostPosted: Fri Nov 01, 2013 10:16 pm    Post subject: Reply with quote

Šumil wrote:
V MOBAC máš vľavo hore kontextovú ponuku "Selection coordinates" a v nej rozbaľovaciu ponuku "Fmt". V nej zvolíš ponuku Deg Min Sec (local) alebo (eng) podľa toho či chceš mať sekundy oddelené čiarkou alebo bodkou.


Tu sa da prepinat format suradnic pri zadavani oblasti pre vytvorenie mapy,
ale XML subor vytvoreny volbou "Saved profiles" ma stale suradnice vo
forme minTileCoordinate="2317824/1438208"

Tento subor chcem pouzit na vypisanie informacii o vytvorenej mape a jej zobrazenie na Google mape.
Back to top
View user's profile Send private message Visit poster's website
Šumil



Joined: 01 Oct 2008
Posts: 226
Location: Trencin, SK

PostPosted: Sat Nov 02, 2013 9:48 pm    Post subject: Reply with quote

Tam je nejaký matematický algoritmus na prevod do lat /lon. Ale nie som tak matematicky zdatný na odvodenie súradníc. Takže neposlúžim. Ak si na tom matematicky lepšie prečítaj si :
http://sourceforge.net/apps/phpbb/mobac/viewtopic.php?f=1&t=58&p=237&hilit=maxTileCoordinate#p237
http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
možno budeš múdrejší. Very Happy

_________________
Nokia 6300, LD-3W, 1.2.5
Back to top
View user's profile Send private message
dusanga



Joined: 21 Aug 2012
Posts: 15

PostPosted: Sun Nov 03, 2013 10:42 pm    Post subject: Reply with quote

Dakujem za pomoc.
Ta stranka "Slippy_map_tilenames" je presne to co som potreboval.
MOBAC 1.9.13 pouziva pre vyrobu map projekciu Mercator.
Jednotlive "tile" su udavane v pixeloch a preto je potrebne $xtile ($ytile)
vynasobit (vydelit) s 256. Takto dostaneme hodnoty ako udava MOBAC.

Tu je z horeuvedenej stranky vzorec pre prevod v PHP

Lon./lat. to tile numbers

$xtile = floor((($lon + 180) / 360) * pow(2, $zoom));
$ytile = floor((1 - log(tan(deg2rad($lat)) + 1 / cos(deg2rad($lat))) / pi()) /2 * pow(2, $zoom));

Tile numbers to lon./lat.

$n = pow(2, $zoom);
$lon_deg = $xtile / $n * 360.0 - 180.0;
$lat_deg = rad2deg(atan(sinh(pi() * (1 - 2 * $ytile / $n))));
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    TrekBuddy Forum Index -> Česky-Slovensky All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group