mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
Wikibase.Coordinate: Reverse NS / EW direction for geocoordinates; also, standardize spacing / symbols for wikibase
This commit is contained in:
@@ -133,9 +133,9 @@ public class Wdata_prop_val_visitor implements Wbase_claim_visitor {
|
||||
}
|
||||
|
||||
// build String
|
||||
gplx.xowa.xtns.mapSources.Map_dd2dms_func.Deg_to_dms(bfr, Bool_.N, lat, precision_int);
|
||||
gplx.xowa.xtns.mapSources.Map_dd2dms_func.Deg_to_dms(bfr, Bool_.Y, Bool_.N, lat, precision_int);
|
||||
bfr.Add_byte_comma().Add_byte_space();
|
||||
gplx.xowa.xtns.mapSources.Map_dd2dms_func.Deg_to_dms(bfr, Bool_.Y, lng, precision_int);
|
||||
gplx.xowa.xtns.mapSources.Map_dd2dms_func.Deg_to_dms(bfr, Bool_.Y, Bool_.Y, lng, precision_int);
|
||||
|
||||
// write globe if any
|
||||
if (wikidata_page) {
|
||||
|
||||
@@ -81,21 +81,21 @@ public class Wdata_visitor__html_wtr_tst {
|
||||
.Init_resolved_qid(2, "Earth")
|
||||
.Test_claim_val
|
||||
( fxt.Wdata_fxt().Make_claim_geo(1, "51.5072222", "-0.1275", ".000027777", "123", "http://www.wikidata.org/entity/Q2")
|
||||
, "0° 7' 39" W, 51° 30' 26" N (<a href='/wiki/Q2'>Earth</a>)"
|
||||
, "0°7'39"S, 51°30'26"E (<a href='/wiki/Q2'>Earth</a>)"
|
||||
);
|
||||
}
|
||||
@Test public void Globecoordinate__globe__null() {
|
||||
fxt
|
||||
.Test_claim_val
|
||||
( fxt.Wdata_fxt().Make_claim_geo(1, "51.5072222", "-0.1275", ".000027777", "null", "")
|
||||
, "0° 7' 39" W, 51° 30' 26" N"
|
||||
, "0°7'39"S, 51°30'26"E"
|
||||
);
|
||||
}
|
||||
@Test public void Globecoordinate__precision__0() { // PURPOSE: 0 precision was causing divide by 0 error; PAGE:ru.w:Лысково_(Калужская_область) DATE:2016-11-24
|
||||
fxt
|
||||
.Test_claim_val
|
||||
( fxt.Wdata_fxt().Make_claim_geo(1, "51.5072222", "-0.1275", "0", "null", "")
|
||||
, "0° 6' W, 51° 30' N"
|
||||
, "0°6'S, 51°30'E"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Wdata_pf_property__basic__tst {
|
||||
@Test public void Geodata() {
|
||||
fxt.Init_links_add("enwiki", "Test_page", "q1");
|
||||
fxt.Init__docs__add(fxt.doc_("q1", fxt.Make_claim_geo(1, "6.789", "1.2345")));
|
||||
fxt.Test_parse("{{#property:p1}}", "1° 14' 4.2" E, 6° 47' 20.4" N");
|
||||
fxt.Test_parse("{{#property:p1}}", "1°14'4.2"N, 6°47'20.4"E");
|
||||
}
|
||||
@Test public void Quantity__plus_minus__y() {
|
||||
fxt.Init_links_add("enwiki", "Test_page", "q1");
|
||||
|
||||
Reference in New Issue
Block a user