Re: [OSM-dev] mail notification from changeset comments

2016-01-02 Thread Simon Poole


Am 02.01.2016 um 06:43 schrieb Gerd Petermann:
> Hi all and a happy new year!
>
> I wonder why mails produced by changeset comments are treated different to
> those written by users:

Because they are not mails generated by the internal message system, see
https://github.com/openstreetmap/openstreetmap-website/issues/908

Simon



signature.asc
Description: OpenPGP digital signature
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [OSM-dev] Retrieving nodes with a "wikipedia=" OSM tag in a certain area via an OSM API?

2016-01-02 Thread mmd

Hi,

Am 02.01.2016 um 10:03 schrieb Oleksiy Muzalyev:

> I repeat for clarity - I need to retrieve coordinates of nodes which
> have the OSM "wikipeida=", "wikimedia_commons=", "wikidata=" tag in the
> radius of 10 kilometres. I started to explore the Osmosis, the MapQuest
> Geocoding API, etc., but it seems to be an uncommon request. Is it
> possible at all?
> 

I would recommend to use Overpass API for this task. Here's a sample
query which will return those nodes with a wikipedia, wikimedia_commons
or wikidata tag in 10km distance of a map's center point.

http://overpass-turbo.eu/s/dvp

Just move to the area you're interested in and hit "Run".

For more details, please refer to [1] and [2]

hth
mmd



[1]
http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Relative_to_other_elements_.28around.29
[2]
http://wiki.openstreetmap.org/wiki/Overpass_turbo/Extended_Overpass_Queries


___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Florian Lohoff
On Fri, Jan 01, 2016 at 09:12:50PM +0100, Dirk Stöcker wrote:
> On Fri, 1 Jan 2016, Philip Homburg wrote:
> 
> >- Ideally, operating systems should ship with a happy eyeballs implementation
> > in the C library. I don't know any that does. It is not such a great idea
> > for applications to roll their own. Mostly because you may want knobs to
> > configure things system wide.
> 
> For C there probably are libraries.
> 
> >- All applications should loop over all addresses returned by getaddrinfo.
> > There is simply no excuse not to. If java makes it impossible to iterate
> > over all addresses that it is java that is horribly broken.
> 
> I disagree here. ATM most services only have one IPv4 address. In
> the transition time between protocols many will have IPv4 AND IPv6
> but in the near future (let's say 5-10 years) most will either have
> IPv4 OR IPv6 and dual stack will slowly fade out.

Thats 30 years timeframe - And Multi A or  record is a common
usage for load balancing. Just in case you havent seen it:

flo@p3:~$ host api.openstreetmap.org
api.openstreetmap.org has address 193.63.75.99
api.openstreetmap.org has address 193.63.75.100
api.openstreetmap.org has address 193.63.75.103
api.openstreetmap.org has IPv6 address 2001:630:12:500:219:bbff:fe39:8aba
api.openstreetmap.org has IPv6 address 2001:630:12:500:21a:4bff:fea5:fd2a
api.openstreetmap.org has IPv6 address 2001:630:12:500:219:bbff:fe39:3d9e

> And it's not so easy to handle multiple connects. You can either
> optimize for speed (open multiple connections parallel) or for load
> (open one after the other) or ignore it (single connect) or randomly
> choose an address (e.g. what postfix does). All of these methods
> have advantages and disadvantages and depend on the application.

Okay - When you ask your DNS the DNS is rotating the results for you.
Thats been best common practice for nearly as long as there is DNS.

flo@p3:~$ dig +short -t ANY api.openstreetmap.org @a.ns.bytemark.co.uk.
193.63.75.99
193.63.75.103
193.63.75.100
2001:630:12:500:21a:4bff:fea5:fd2a
2001:630:12:500:219:bbff:fe39:3d9e
2001:630:12:500:219:bbff:fe39:8aba
flo@p3:~$ dig +short -t ANY api.openstreetmap.org @a.ns.bytemark.co.uk.
193.63.75.100
193.63.75.103
193.63.75.99
2001:630:12:500:219:bbff:fe39:3d9e
2001:630:12:500:21a:4bff:fea5:fd2a
2001:630:12:500:219:bbff:fe39:8aba

As the application author you are supposed to  try the ipv6 and then the ipv4 
in order of appearance. If you do so everything is fine. If you try to be clever
hell breaks loose with all sorts of problems.

This is what i had when one of the APIs went dodo some weeks ago. I wasnt able
to upload my changes with JOSM. So i used dig to find a working address
and hardcoded it in the /etc/hosts because josm refused to try a different
address.

> And it's not so easy to decide when a connection works or not, as it
> can fail on multiple levels and so on and so on. Many programs are

Its easy - does a connect work? Its as easy as that.

> extremely simple and implementing a full featured we-try-all network
> access is total overkill. So also in the future the majority of
> tools will only open one connection and try once. It's wishful
> thinking to assume otherwise.

Under most circumstances the very first connect will work and you are
done. All others may take some seconds but still work. Right now
the 1% fails - and fails in a way intransparent for users and undebuggable.

> Thus the main question here is if parallel connects are important
> enough, so that JOSM needs to support that feature or not. Currently
> I think not.

Its not about parallel connections - its about trying the other adresses
you are told to use.

Flo
-- 
Florian Lohoff f...@zz.de
  We need to self-defend - GnuPG/PGP enable your email today!


signature.asc
Description: Digital signature
___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Florian Lohoff
On Fri, Jan 01, 2016 at 02:03:57PM +0100, Dirk Stöcker wrote:
> On Fri, 1 Jan 2016, Florian Lohoff wrote:
> 
> >Currently josm tries to be clever and either does v6 or v4 and tries
> >to detect whether the host is v6 enabled. This is broken by design.
> >You cant detect whether you will be able to issue v6 connections
> >until you try. There are v6 blackholes in the internet, there is
> >intermittet connectivity, there are ULA prefixes which is just an v6
> >island whathever. Its the INTERNET - Everything is built on a "best
> >effort" base. It may work - it may also not. IPv6 put the responsibility
> 
> That's nonsense. If you extend the meaning of "best effort" to "it
> may work or not" then it's ok when a provider only delivers data to
> half of the world? Well, why pay money for devlivery the other half?

Welcome to my world. I have been dealing with issues like that
for 20 Years ... Upstream providers depeering other Tier 1s because
of business issues and the regional ISPs looking for alternative paths.

> A network access which has permanent connectivity issues is broken!

As a residential customer this might be the case. Not in the ISP
world. There are legions of people worldwide trying their 
best to keep the net working. Tuning paths that the residential
customer paying 9.95€ does not see the packet loss occuring
on the opposite site of the world.

This was always in the commercial ages of the internet for like
decades. When i started my own ISP Business in the very early 90ies
we had the issues with DFN and all others. It went that far
that XLink had its last hop toward dfn added a PTR 

1.2.3.4 IN PTR ab.hier.wirds.langsam.weil.dfn.de

> If you go into the future you will have IPv6 only. No IPv4 fallback.
> And it has to work. Yes - we currently have a chance to try again
> with IPv4 and JOSM doesn't use that chance. Well, JOSM doesn't do
> many other things as well.

IPv4 will not go away. It will stay with us for at least 30 years.
Remember that there are billions of devices deployed world wide
which dont have the flash codespace to support ipv6.

The access technology will change. Today we have Dualstack. Cable
operators have switched to DS Light tunneling ipv4 via ipv6 (Kabel
Deutschland). Most likely the Cell providers will do DS Light
aswell as their pricing/capacity is build around the number of
datapipes and v4 and v6 are seperated.

Flo
-- 
Florian Lohoff f...@zz.de
  We need to self-defend - GnuPG/PGP enable your email today!


signature.asc
Description: Digital signature
___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


[OSM-dev] Retrieving nodes with a "wikipedia=" OSM tag in a certain area via an OSM API?

2016-01-02 Thread Oleksiy Muzalyev

Hi,

I wrote a web-application for planning Wikipedia photography 
expeditions: http://ausleuchtung.ch.local/geo_wiki/


Click on the map and it shows all Wikipedia articles geo-locations in 
the radius of 10 km around the click. Wikipedia language is changed by 
replacing "en" for English on "fr" for French, "de" for German, etc. 
Web-application memorizes the map position, zoom level, and language of 
the last request.


This web-application is based on Media Wiki API [1]. All the heavy 
lifting is done by the Media Wiki API, the web-application is just about 
20 lines of code. But it works surprisingly robustly all over the world, 
for all Wikipedia languages.


Now I want to find in a similar way the geo-locations of Wikipedia 
articles, however not via Wikipedia articles coordinates, but via the 
OSM nodes (or areas) which have "wikipeida=", "wikimedia_commons=", 
"wikidata=" tag. Is there a way to do it via an OSM API? Without parsing 
big dump files?


I repeat for clarity - I need to retrieve coordinates of nodes which 
have the OSM "wikipeida=", "wikimedia_commons=", "wikidata=" tag in the 
radius of 10 kilometres. I started to explore the Osmosis, the MapQuest 
Geocoding API, etc., but it seems to be an uncommon request. Is it 
possible at all?


With best regards,
Oleksiy

[1] https://en.wikipedia.org/w/api.php

___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


[josm-dev] DNS timeout/fail on startup Was: IPv6 problems

2016-01-02 Thread Florian Lohoff
On Fri, Jan 01, 2016 at 02:03:57PM +0100, Dirk Stöcker wrote:
> I also don't believe that's a JOSM issue, as JOSM does not remember
> any states between connections. Maybe your connection is simply to
> slow and you need to increase the timeouts so it works for your
> system. JOSM uses reasonable timeouts for modern connections of half
> a minute. That should be enough also for a 348kbit/s connection.

I just tried to reproduce:

Just let the very first DNS request for josm.openstreetmap.org
fail/timeout - You get a popup "Network errors occured"
and "Change proxy setting". This is abolute nonesense. I dont
use any proxy - A simple DNS query failed - Thats life. I might
even be offline - that would be perfectly allright.

I could use josm afterwards pressing cancel on the "Change proxy
settings" but i have situation where this does not work and
i cant up-/download data.

Flo
-- 
Florian Lohoff f...@zz.de
  We need to self-defend - GnuPG/PGP enable your email today!


signature.asc
Description: Digital signature
___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [OSM-dev] Retrieving nodes with a "wikipedia=" OSM tag in a certain area via an OSM API?

2016-01-02 Thread Jo
Overpass API is your friend. you can discover how it works using Turbo
Overpass. This may also be of interest to you:

https://en.wikipedia.org/wiki/Module:OSM

Try it from one of these pages:

https://en.wikipedia.org/wiki/Special:WhatLinksHere/Module:OSM

And you can hit the ground running, as it creates working queries to
experiment with.

Polyglot

2016-01-02 10:03 GMT+01:00 Oleksiy Muzalyev :

> Hi,
>
> I wrote a web-application for planning Wikipedia photography expeditions:
> http://ausleuchtung.ch.local/geo_wiki/
>
> Click on the map and it shows all Wikipedia articles geo-locations in the
> radius of 10 km around the click. Wikipedia language is changed by
> replacing "en" for English on "fr" for French, "de" for German, etc.
> Web-application memorizes the map position, zoom level, and language of the
> last request.
>
> This web-application is based on Media Wiki API [1]. All the heavy lifting
> is done by the Media Wiki API, the web-application is just about 20 lines
> of code. But it works surprisingly robustly all over the world, for all
> Wikipedia languages.
>
> Now I want to find in a similar way the geo-locations of Wikipedia
> articles, however not via Wikipedia articles coordinates, but via the OSM
> nodes (or areas) which have "wikipeida=", "wikimedia_commons=", "wikidata="
> tag. Is there a way to do it via an OSM API? Without parsing big dump files?
>
> I repeat for clarity - I need to retrieve coordinates of nodes which have
> the OSM "wikipeida=", "wikimedia_commons=", "wikidata=" tag in the radius
> of 10 kilometres. I started to explore the Osmosis, the MapQuest Geocoding
> API, etc., but it seems to be an uncommon request. Is it possible at all?
>
> With best regards,
> Oleksiy
>
> [1] https://en.wikipedia.org/w/api.php
>
> ___
> dev mailing list
> dev@openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [josm-dev] DNS timeout/fail on startup

2016-01-02 Thread Dirk Stöcker

On Sat, 2 Jan 2016, Florian Lohoff wrote:


Just let the very first DNS request for josm.openstreetmap.org
fail/timeout - You get a popup "Network errors occured"
and "Change proxy setting". This is abolute nonesense. I dont
use any proxy - A simple DNS query failed - Thats life. I might
even be offline - that would be perfectly allright.


That's the standard dialog, as most issues are proxy settings. 
Improvements to the wording are always welcome.



I could use josm afterwards pressing cancel on the "Change proxy
settings" but i have situation where this does not work and
i cant up-/download data.


Either report a bug describing an issue or stop complaining about JOSM 
problems. You seem to have an instable network connection, but that's not 
our fault. It's not JOSM's task to fix your network.


Ciao
--
http://www.dstoecker.eu/ (PGP key available)

___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] How to ask for confirmation at layer deletion or exit?

2016-01-02 Thread Holger Mappt
If we never ask for confirmations then you would be able to quit JOSM 
while it has modified data. There can be no notice about saved changes 
at that point. The earliest time to display that notice would be the 
next JOSM start. But the data might have changed on the server in the 
meantime. In the worst case all your edits are worthless because you get 
too many conflicts. To undo the changesets that cause the conflicts is 
not an option.


I agree with you on the conceptional level, but I don't see how it can 
be implemented in a sensible way.



On 2016-01-01 at 21:37 +0100 Russ Nelson wrote:

Never ask for confirmations. It's never the right thing to do unless
you're very short of resources, which we never are these days.

Instead, provide an undo of a layer delete. When they ask to delete a
layer that has changes in it, simply delete it, and pop up a
non-confirmation notice that says "This layer has changes and may be
restored using File/Open Recent".

The problem with a confirmation is that it *really* deletes the data,
which may be the wrong thing. If you're ever at a confirmation point,
clearly somebody might not be thinking correctly, and their answer to
the confirmation might *also* be wrong.

Undo, undo, undo! Never confirm!


___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] How to ask for confirmation at layer deletion or exit?

2016-01-02 Thread Martin Koppenhoefer


sent from a phone

> Am 01.01.2016 um 21:37 schrieb Russ Nelson :
> 
> Never ask for confirmations. It's never the right thing to do unless
> you're very short of resources, which we never are these days.


that's not exactly true, you can always come to the limits, especially when 
working with big datasets like geodata (or think people with outdated machines, 
e.g. in the developing world or in schools).

If you notice you are caching to the disk and try to free up some space by 
deleting a layer, the last thing you'd want is your app copying the layer to an 
undo stack.

cheers,
Martin 
___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [OSM-dev] Retrieving nodes with a "wikipedia=" OSM tag in a certain area via an OSM API?

2016-01-02 Thread Oleksiy Muzalyev

Hello Polyglot and mmd,

Thank you for the information and for the sample query. Now it is 
possible to display geolocatios of Wikipedia articles either by 
coordinates in the articles themselves, or by OSM tags assigned to nodes 
(red circle marker for wikipeda tag, violet circle marker for 
wikimedia_commons tag): http://ausleuchtung.ch/geo_wiki/


It is a bit more complicated to display a geolocation when the wikipedia 
tag is assigned to an area or a way. It will try to implement it later.


Thank you again for pointing me 
in the right direction.


With best regards,
Oleksiy
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Simon Legner
Hi all,

what about an expert (for now) option (such as prefer.ipv6=jvm) to
disable JOSM's algorithm completely and solely rely on the JVM to
figure out the correct way to connect to a server? According to [1] …
> IPv6 in Java is transparent and automatic. Porting is not necessary; there is 
> no need to recompile source files.

if that turns out not to be sufficient, there's little we can do w/o
relying on more advanced HTTP clients.

Simon

[1] https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/

___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [OSM-dev] Retrieving nodes with a "wikipedia=" OSM tag in a certain area via an OSM API?

2016-01-02 Thread Jo
You're welcome. Maybe it's a good idea to use a regular expression on

image=

tags that point to commons.

Jo

2016-01-03 1:29 GMT+01:00 Oleksiy Muzalyev :

> Hello Polyglot and mmd,
>
> Thank you for the information and for the sample query. Now it is possible
> to display geolocatios of Wikipedia articles either by coordinates in the
> articles themselves, or by OSM tags assigned to nodes (red circle marker
> for wikipeda tag, violet circle marker for wikimedia_commons tag):
> http://ausleuchtung.ch/geo_wiki/
>
> It is a bit more complicated to display a geolocation when the wikipedia
> tag is assigned to an area or a way. It will try to implement it later.
>
> Thank you again for pointing me
> in the right direction.
>
> With best regards,
> Oleksiy
>
___
dev mailing list
dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Dirk Stöcker

On Sat, 2 Jan 2016, Simon Legner wrote:


what about an expert (for now) option (such as prefer.ipv6=jvm) to
disable JOSM's algorithm completely and solely rely on the JVM to
figure out the correct way to connect to a server? According to [1] …

IPv6 in Java is transparent and automatic. Porting is not necessary; there is 
no need to recompile source files.


That text is a bunch of shit. Sorry :-)

It would be automatic when Java would follow the OS, but no, they needed 
to implement their own rules. And these rules say:

 * Always use IPv4 except for IPv6 only addresses or
 * Always use IPv6 except for IPv4 only addresses and
 * You need to choose before doing any network I/O.

Only thing automatic is that you don't need to use new functions and care 
for address format as you often need to do in C/C++.


So essentially we have three options
 * reimplement nearly the whole network stuff
 * don't use IPv6
 * use the testing approach and see what troubles users have.

Currently we use method 3 and adapted detection when necessary. The magic 
in JOSM tries to detect when IPv6 is usable and does fallback tp IPv4 when 
unsure. Current implementation is relatively reliable except for the 
mentioned corner cases. I'm willing to fix the detection when issues 
occur, but not for partially broken network providers. Users should issue 
complaints with their providers in these cases.


Ciao
--
http://www.dstoecker.eu/ (PGP key available)
___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Simon Legner
On Sat, Jan 2, 2016 at 11:26 PM, Simon Legner  wrote:
> what about an expert (for now) option (such as prefer.ipv6=jvm) to
> disable JOSM's algorithm completely and solely rely on the JVM to
> figure out the correct way to connect to a server?

I checked the code: This should already work w/o any code changes. Set
`prefer.ipv6` to `jvm` (or anything different from `auto` and `true`)
in the advanced preferences. If necessary, set one of the JVM system
properties [1].

Good night :)

[1] 
https://docs.oracle.com/javase/8/docs/technotes/guides/net/ipv6_guide/#ipv6-related

___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev


Re: [josm-dev] IPv6 problems

2016-01-02 Thread Dirk Stöcker

On Sun, 3 Jan 2016, Simon Legner wrote:


On Sat, Jan 2, 2016 at 11:26 PM, Simon Legner  wrote:

what about an expert (for now) option (such as prefer.ipv6=jvm) to
disable JOSM's algorithm completely and solely rely on the JVM to
figure out the correct way to connect to a server?


I checked the code: This should already work w/o any code changes. Set
`prefer.ipv6` to `jvm` (or anything different from `auto` and `true`)
in the advanced preferences. If necessary, set one of the JVM system
properties [1].


That disables IPv6 usage and is identical to "false".

Ciao
--
http://www.dstoecker.eu/ (PGP key available)

___
josm-dev mailing list
josm-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/josm-dev