osmcz / api

issue tracker for guidepost api
0 stars 1 forks source link

Volání table/all?output=geojson neobsahuje tagy #15

Closed mkyral closed 8 years ago

mkyral commented 8 years ago

Bylo by fajn to tam doplnit aby se mohly přidat do popupu.

walley commented 8 years ago

musim trosku prekombinovat kod, ale urcite to udelam.

mkyral commented 8 years ago

Co třeba takhle?

select g.*, (select GROUP_CONCAT(k||':'||v) from tags t where t.gp_id = g.id) from guidepost g limit 10;
10|49.77881|13.12138|img/guidepost/DSC00342.JPG|DSC00342.JPG|Petr Dlouhy|PS015|foto|k:v,bazmek:,:value,ref:PS015,x:,xx:
11|49.6313222222222|12.5956722222222|img/guidepost/DSC00357.JPG|DSC00357.JPG|Petr Dlouhy|xxx||ref:xxx,mapa:
12|49.747725|13.3855527777778|img/guidepost/DSC00339.JPG|DSC00339.JPG|Petr Dlouhy|||cyklo:,rozcestnik:
13|49.7522583333333|13.0087194444444|img/guidepost/DSC00346.JPG|DSC00346.JPG|Petr Dlouhy|TC002||ref:TC002
14|49.8522888888889|14.0352888888889|img/guidepost/DSC00326.JPG|DSC00326.JPG|Petr Dlouhy|||znaceni:
15|49.6245333333333|12.5715416666667|img/guidepost/DSC00362.JPG|DSC00362.JPG|Petr Dlouhy|TC072||ref:TC072
16|49.7767472222222|13.1684638888889|img/guidepost/DSC00341.JPG|DSC00341.JPG|Petr Dlouhy|||
17|49.8522916666667|14.0353|img/guidepost/DSC00325.JPG|DSC00325.JPG|Petr Dlouhy|||
18|49.7634027777778|13.4173555555556|img/guidepost/DSC00337.JPG|DSC00337.JPG|Petr Dlouhy|||
19|49.6521444444444|12.5520583333333|img/guidepost/DSC00366.JPG|DSC00366.JPG|Petr Dlouhy|0248/46,5||ref:0248/46,5
walley commented 8 years ago

jo akorat chceme jinej separator nez carku, asi strednik?

mkyral commented 8 years ago

No problem:

sqlite> select g.*, (select GROUP_CONCAT(k||':'||v, ';') from tags t where t.gp_id = g.id) from guidepost g limit 10;
10|49.77881|13.12138|img/guidepost/DSC00342.JPG|DSC00342.JPG|Petr Dlouhy|PS015|foto|k:v;bazmek:;:value;ref:PS015;x:;xx:
11|49.6313222222222|12.5956722222222|img/guidepost/DSC00357.JPG|DSC00357.JPG|Petr Dlouhy|xxx||ref:xxx;mapa:
12|49.747725|13.3855527777778|img/guidepost/DSC00339.JPG|DSC00339.JPG|Petr Dlouhy|||cyklo:;rozcestnik:
13|49.7522583333333|13.0087194444444|img/guidepost/DSC00346.JPG|DSC00346.JPG|Petr Dlouhy|TC002||ref:TC002
14|49.8522888888889|14.0352888888889|img/guidepost/DSC00326.JPG|DSC00326.JPG|Petr Dlouhy|||znaceni:
15|49.6245333333333|12.5715416666667|img/guidepost/DSC00362.JPG|DSC00362.JPG|Petr Dlouhy|TC072||ref:TC072
16|49.7767472222222|13.1684638888889|img/guidepost/DSC00341.JPG|DSC00341.JPG|Petr Dlouhy|||
17|49.8522916666667|14.0353|img/guidepost/DSC00325.JPG|DSC00325.JPG|Petr Dlouhy|||
18|49.7634027777778|13.4173555555556|img/guidepost/DSC00337.JPG|DSC00337.JPG|Petr Dlouhy|||
19|49.6521444444444|12.5520583333333|img/guidepost/DSC00366.JPG|DSC00366.JPG|Petr Dlouhy|0248/46,5||ref:0248/46,5
mkyral commented 8 years ago

Jako ještě by to chtělo nějakou změnu v output_geojson(). Ten select sice tagy vrátí, ale do toho geojsonu se už nedostanou ;-)

walley commented 8 years ago

uz by to melo fungovat

walley commented 8 years ago

jeste je potreba upravit dalsi veci volajici output_geojson