<commit_before>>>recipeinfo<<
Summary: Create links to various map sites from provided gps coordinates.
Version: 2011-08-24
Prerequisites: 
Status: 
Maintainer: [[~Anomen]]
Users: {{$FullName}-Users$Rating2} ([[{$FullName}-Users|View]] / [[{$FullName}-Users|Edit]])
Categories: [[Links]]
(:if exists {$Name}-Talk:)Discussion: [[{$Name}-Talk]](:ifend:)
>><<
!! Questions answered by this recipe
How to automatically create links for given gps coordinates to various map sites.

[[#desc]]
!! Description
Recipe creates links to various map sites from provided gps coordinates.

[[#install]]
!!Installation
Download [[(Attach:)geobox.php]].

In config.php, add the following line:

[@
 include_once("$FarmD/cookbook/geobox.php");
@]

[[#usage]]
!!Usage
Use geobox markup 
[@ (:geo 49°43.996 14°27.665 :) @]

to create link list:
 ''49°43.996' 014°27.665'' [[http://www.mapy.cz/?query=Loc:49.73327%2014.46108 | mapy.cz]] [[http://maps.google.com/?q=49.73327%2014.46108|gmaps]] [[http://www.geocaching.com/map/default.aspx?lat=49.73327&lng=14.46108|geocaching.com/maps]] [[http://www.geocaching.com/seek/nearest.aspx?lat=49.73327&lng=14.46108&f=1|geocaching.com/near]]

!!!Coordinate format
You can change format of displayed coordinates by using ''format'' paremater.

Possible values and meanings are:
: D : deg°
: M : deg°min'
: S : deg°min'sec"

For example, following line will produce coordinates displayed as degrees:
[@ (:geo format=d 49°43.996 14°27.665 :) @]

!!!Point projection
You can perform point projection using parameters ''azimuth'' (value in degrees) and ''distance'' (value in meters).
Result of projection will be displayed (together with proper links) instead of original given coordinates.

For example, following line will produce coordinates @@ 50.00949 15.18703 @@:

[@ (:geo format=d azimuth=45 distance=2703 49.99232 15.16031 :) @]


[[#config]]
!!Configuration<commit_msg>www-apps/pmwiki - geobox - readme<commit_after>>>recipeinfo<<
Summary: Create links to various map sites from provided gps coordinates.
Version: 2011-08-24
Prerequisites: 
Status: 
Maintainer: [[~Anomen]]
Users: {{$FullName}-Users$Rating2} ([[{$FullName}-Users|View]] / [[{$FullName}-Users|Edit]])
Categories: [[Links]]
(:if exists {$Name}-Talk:)Discussion: [[{$Name}-Talk]](:ifend:)
>><<
!! Questions answered by this recipe
How to automatically create links for given gps coordinates to various map sites.

[[#desc]]
!! Description
Recipe creates links to various map sites from provided gps coordinates.

[[#install]]
!!Installation
Download [[(Attach:)geobox.php]].

In config.php, add the following line:

[@
 include_once("$FarmD/cookbook/geobox.php");
@]

[[#usage]]
!!Usage
Use geobox markup 
[@ (:geo 49°43.996 14°27.665 :) @]

to create link list:
 ''49°43.996' 014°27.665'' [[http://www.mapy.cz/?query=Loc:49.73327%2014.46108 | mapy.cz]] [[http://maps.google.com/?q=49.73327%2014.46108|gmaps]] [[http://www.geocaching.com/map/default.aspx?lat=49.73327&lng=14.46108|geocaching.com/maps]] [[http://www.geocaching.com/seek/nearest.aspx?lat=49.73327&lng=14.46108&f=1|geocaching.com/near]]

!!! Coordinate input format
*Coordinates consists of latitude and logitude values separated by space character(s).
* Values can pre prefixed or postfixed with N or S for lat. and E or W for lon.
* Decimal dot or coma can be used.
* several characters can be used as degree sign (''U+002A ASTERISK'', ''U+00B0 DEGREE SIGN'', ''U+00BA MASCULINE ORDINAL INDICATOR', ''U+02DA RING ABOVE'').
* all three formats are recognised (degrees only and mixed formats with arcmin or arcmin+arcsec)
* degree sign is mandatory only for mixed formats (to separate degrees and arcminutess)

!!!Coordinate display format
You can change format of displayed coordinates by using ''format'' paremater.

Possible values and meanings are:
: D : deg°
: M : deg°min'
: S : deg°min'sec"

For example, following line will produce coordinates displayed as degrees:
[@ (:geo format=d 49°43.996 14°27.665 :) @]

!!!Point projection
You can perform point projection using parameters ''azimuth'' (value in degrees) and ''distance'' (value in meters).
Result of projection will be displayed (together with proper links) instead of original given coordinates.

For example, following line will produce coordinates @@ 50.00949 15.18703 @@:

[@ (:geo format=d azimuth=45 distance=2703 49.99232 15.16031 :) @]


[[#config]]
!!Configuration
{'fraction_non_alphanumeric': 0.15312855517633675, 'fraction_numerical': 0.06916951080773606, 'mean_word_length': 5.464705882352941, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 7, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3989683', 'n_tokens_mistral': 1667, 'n_tokens_neox': 1409, 'n_words': 442}