Re: warnings after importing PT_Assistant plugin project

2020-03-03 Thread Jiri Vlasak
Hi,

On Tue, Mar 03, 2020 at 08:16:20AM +0530, Vaibhav Bisht wrote:
> Hello,
> I have recently moved on from eclipse to IntelliJ ide now the problem is
> that when I imported the project in the IDE I got three following warnings
> WARNING: Could not detect the project version, you are probably not
> building inside a git repository!
> WARNING: The project version is currently the default value `unspecified`.
> WARNING: To change the version number, either build in a git-repository or
> set the version manually by adding the line `project.version = "1.2.3"` to
> the Gradle build script.
> 
> I think that there could be some build issues here. Please let me know what
> it is

so it looks like you don't use git for development. Maybe you use svn and need
to configure IntelliJ to use Subversion?

jiri



josm on flash -- asking for review

2020-02-26 Thread Jiri Vlasak
Dear JOSM devs,

I would like to ask for review of *josm-on-flash* miniproject [1] with source
code available at [2].

Based on JOSM on USB stick [3] I set up auto build for .zip archive and publish
it as GitLab page. The .zip archive contains OpenJDK with josm-tested.jar and
.bat script to run JOSM from flash. Also, there are install files of OpenJDK.

The use case is on mapathons -- run JOSM directly from flash or share OpenJDK
install files to save bandwidth.

I will send the link to talk mailing list but I will be happy for a feedback
before doing so.

Thanks,
jiri

[1]: https://mapathon-cz.gitlab.io/josm-on-flash/
[2]: https://gitlab.com/mapathon-cz/josm-on-flash
[3]: https://josm.openstreetmap.de/wiki/USB_Stick



Re: Getting tiles for plugin usage

2019-11-01 Thread Jiri Vlasak
On Sun, Oct 20, 2019 at 12:54:40PM +0200, Dirk Stöcker wrote:
> On Thu, 17 Oct 2019, Jiri Vlasak wrote:
> 
> > there was Missing Maps hackathon this weekend in Pilsen, Czech Republic. 
> > One of
> > the tasks we were working on was click building feature [1] -- building plot
> > based on mouse click to the middle of the building.
> > 
> > I am interested in getting background imagery in effective way. Currently, 
> > the
> > following steps are used:
> > 1. Mouse listener knows the coordinates.
> > 2. Coordinates are recomputed to TileXY.
> > 3. New tiles around the mouse click are created in array (9 of them).
> > 4. Based on Tile URL, Images are downloaded and used for algorithm.
> > 
> > I feel like downloading Tiles multiple times is not effective.
> 
> I'd recommend the meachnism already included in JOSM, e.g. the Tile loader
> classes which also do caching.

That's good point. I would like to use that, but I am lost in how does it work.
Can you point me to the right direction, please?

I feel like I miss something basic. I am able to get the current ImageryLayer
but not the image. And the methods I think could work for me (like
`getVisibleTileSet()`) are usually private.

Thanks,
jiri



Getting tiles for plugin usage

2019-10-16 Thread Jiri Vlasak
Dear JOSM devs,

there was Missing Maps hackathon this weekend in Pilsen, Czech Republic. One of
the tasks we were working on was click building feature [1] -- building plot
based on mouse click to the middle of the building.

I am interested in getting background imagery in effective way. Currently, the
following steps are used:
1. Mouse listener knows the coordinates.
2. Coordinates are recomputed to TileXY.
3. New tiles around the mouse click are created in array (9 of them).
4. Based on Tile URL, Images are downloaded and used for algorithm.

I feel like downloading Tiles multiple times is not effective.

Also, I think that we found a bug in Tile.getUrl() -- for Esri imagery, it
returns:

https://{switch:services,server}.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}/17/79468/63554.png

Instead of proper URL. And I have the same issues with Maxar.

[1]: https://gitlab.com/qeef/mapathoner/commits/feature/click-building

Thanks,
jiri



Re: GSoC PT-Assistant project

2019-07-23 Thread Jiri Vlasak
On Mon, Jul 22, 2019 at 02:20:28PM +0530, ashish singh wrote:
> Hi,
> 
> Is there any way to get all route relations from the currently downloaded
> map?

Maybe you may use MapCSS for that:

https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Linkselector

jiri



Re: GSoC 2019 PT-assistant Plugin

2019-07-15 Thread Jiri Vlasak
On Sat, Jul 13, 2019 at 05:00:40PM +0530, ashish singh wrote:
> I need to make rectangle given a segment as a base and check whether
> something (stop, another home)is inside this rectangle or not. Is there
> some code already written regarding this? If it is already there where I
> can find it in the core?

I think that you are asking about `⊆` and `⊇` operators of MapCSS.

Please, check out this wiki page:

https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation

jiri



Re: [OSM-dev] osm.org groups

2019-05-21 Thread Jiri Vlasak
I understand. My concerns are about scalability and sustainability. Also, I
don't like merging services like maps with social network.

Therefore I think that if you run local Diaspora* with OAuth over osm.org it
less work and better scalability/sustainability.

Ofcourse it's just idea.

Have a nice day,
jiri

On Tue, May 21, 2019 at 01:53:38AM -0300, Дмитрий Киселев wrote:
> I suppose there are not so many of us who wants a social network. Just a
> couple of more convenient instruments for communication which are built in.
> 
> Пн, 20 мая 2019, 14:32 Jiri Vlasak :
> 
> > On Mon, May 20, 2019 at 10:18:46AM -0300, Дмитрий Киселев wrote:
> > > We already have hacked mail lists.
> > >
> > > I'm working on getting original pull request back to work, but its going
> > > quite slow.
> >
> > The question was more philosophic. The problem I see with OSM is that it's
> > map,
> > not a social network. But I may be wrong.
> >
> > > Пн, 20 мая 2019, 5:55 Jiri Hubacek :
> > >
> > > > út 30. 4. 2019 v 17:19 odesílatel Дмитрий Киселев <
> > > > dmitry.v.kise...@gmail.com> napsal:
> > > >
> > > >> Hi everyone,
> > > >> I know that making a good working groups is hard and only facebook
> > > >> succeed in that, and that's why we don't have any way to group users
> > or
> > > >> friends at osm.org
> > > >>
> > > >
> > > > What about this idea: Hack already existing social network like
> > Diaspora*
> > > > to enable authentication over osm.org?
> > > >
> >

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


Re: [OSM-dev] GSoC Doubts

2019-05-12 Thread Jiri Vlasak
Hi Vishal,

> On Wed, May 08, 2019 at 11:49:43AM +0200, Michael Zangl wrote:
>> On 08.05.19 10:12, Vishal R wrote:
>> Hi,
>>      First, thank you OSM for selecting my proposal for Google Summer of
>> Code. I have some doubts and I was hoping the community could help me
>> with them.

congratz, I am looking forward your contributions!

>>      I am bit active in OSM's IRC channels and mailing list. Are there
>> any other communities I should be active in?
>
> This mailing list and the OSM IRC channel are mostly for general
> development. You can have a look at JOSM, since your UI will be integrating
> there. Most communication for JOSM is done in the issue tracker [1]. You can
> have a look in there, but most of it is unrelated to your GSoC.

If you need something regarding JOSM, mailing list is pretty responsive.

> During your GSoC, your main communication with the community will be the
> progress report that you do in regular intervals. You may get some feedback
> on those reports from community members.

@Michael these will be sent to mailing list? Or some blogposts? I don't want to
miss them.

Thanks,
jiri

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


Re: [OSM-dev] oauth token lifetime

2019-05-02 Thread Jiri Vlasak
On Sat, Apr 27, 2019 at 02:40:13PM +0100, Tom Hughes wrote:
> On 27/04/2019 14:37, Jiri Vlasak wrote:
> > On Fri, Apr 26, 2019 at 07:28:39PM +0100, Tom Hughes wrote:
> > > On 26/04/2019 19:06, Jiri Vlasak wrote:
> > > > This approach is similar to one used by HOT Tasking Manager [1]. In my 
> > > > "oauth
> > > > settings" section I have many many "Tasking Manager 3 - Prod" tokens. 
> > > > And I
> > > > feel this approach is not right.
> > > 
> > > That's usually because the client is broken and is not storing the
> > > token but is instead requesting a new one every time you use it.
> > 
> > That's my guess too. So, I would like to write it better. My problem is 
> > that I
> > am quite confused by OAuth.
> > 
> > If I understand it correctly, OAuth is here for authorization. But, in my 
> > case
> > (and in the case of HOT Tasking Manager), the use case is authentication.
> 
> Yes it is really abuse of OAuth in general but is common.
> 
> Note that OAuth 2 (in the form of OpenID Connect) has basically
> merged the two use cases anyway.
> 
> > So maybe I should ask - is it possible to authenticate to osm.org?
> 
> Well yes, that is what OAuth does.

Ofcourse. I am sorry, still learning the OAuth thing.

> What is happening here is using your osm.org account to
> authenticate to a third party site.

That should be my question.

> That works if the third party is prepared to accept you
> allowing it to access osm.org as valid authentication.

Anyway, I did a little bit more research in OAuth and I think that I resolved
the most issues I needed. Thanks, Tom, for pointing me out!

Have a nice day,
jiri

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


Re: [OSM-dev] oauth token lifetime

2019-04-27 Thread Jiri Vlasak
On Fri, Apr 26, 2019 at 07:28:39PM +0100, Tom Hughes wrote:
> On 26/04/2019 19:06, Jiri Vlasak wrote:
> > This approach is similar to one used by HOT Tasking Manager [1]. In my 
> > "oauth
> > settings" section I have many many "Tasking Manager 3 - Prod" tokens. And I
> > feel this approach is not right.
> 
> That's usually because the client is broken and is not storing the
> token but is instead requesting a new one every time you use it.

That's my guess too. So, I would like to write it better. My problem is that I
am quite confused by OAuth.

If I understand it correctly, OAuth is here for authorization. But, in my case
(and in the case of HOT Tasking Manager), the use case is authentication.

So maybe I should ask - is it possible to authenticate to osm.org?

Thanks a lot,
jiri

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


Re: Develop for JOSM core or plugin?

2019-04-27 Thread Jiri Vlasak
On Fri, Apr 26, 2019 at 02:53:49PM -0700, Tom H. wrote:
> Hi All,
> 
> I'm using JOSM constantly in my day to day job, and I'm having a few ideas
> for using hotkeys to toggle some of the layer settings that can now only be
> activated by point and click. I'm new to contributing in JOSM but am
> currently looking through the dev docs, and I was just wondering if it's
> better to realize my hotkey ideas via a plugin, or trying to incorporating
> them into the JOSM core?

tl;dr (generic) ? upstream : plugin ;

There was already discussion when I started developing the plugin. Feel free to
see the "JOSM enhancements vs. separate plugin" thread [1].

Have a nice day,
jiri

[1]: https://lists.openstreetmap.org/pipermail/josm-dev/2018-May/thread.html



[OSM-dev] oauth token lifetime

2019-04-26 Thread Jiri Vlasak
Dear devs,

I would like to ask about the lifetime of OAuth token. I use OSM OAuth to log
into my web application. However, there is new token each time I log into the
web page.

This approach is similar to one used by HOT Tasking Manager [1]. In my "oauth
settings" section I have many many "Tasking Manager 3 - Prod" tokens. And I
feel this approach is not right.

So I thought that time limit for the token would solve this problem. But maybe
I am complete wrong and didn't get the OAuth system?

Thanks!
jiri

[1]: https://tasks.hotosm.org/

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


Re: Plugin installation without restart

2019-02-27 Thread Jiri Vlasak
Hi,

thanks. It make sense now. I think I was confused because the JOSM didn't ask
for restart after update once. But maybe I just overlooked it.

Thanks again,
jiri

On Wed, Feb 27, 2019 at 06:56:47PM +0100, Michael Zangl wrote:
> Hi,
> 
> A plugin update always requires a restart - you cannot get around this.
> 
> The technical reason is that JOSM cannot unload the old plugin classes. This 
> is why an activation of a plugin is possible without restart, but 
> deactivating it is not.
> 
> Am 27. Februar 2019 13:33:49 MEZ schrieb Jiri Vlasak :
> >Hi Gerd,
> >
> >thanks for your time. I am pretty sure I miss something trivial.
> >
> >On Sat, Feb 23, 2019 at 08:10:12AM +, Gerd Petermann wrote:
> >> Hi Jiri,
> >> 
> >> my understanding is that your plugin either requires a restart (set
> >plugin.canloadatruntime to false in build.xml)
> >
> >The `canLoadAtRuntime = true` should be set properly [1].
> >
> >> or it should work so that it reacts on a event to rebuild everything
> >(maybe costly)
> >
> >I am confused a little bit with "reacts on a event" part. The plugin
> >constructor add entries to menu:
> >
> >public class MapathonerPlugin extends Plugin
> >{
> >/**
> > * Constructs a new {@code MapathonerPlugin}.
> > */
> >public MapathonerPlugin(PluginInformation info)
> >{
> >super(info);
> >MainMenu mm = MainApplication.getMenu();
> >JMenu hm = mm.addMenu("Mapathoner",
> >tr("Mapathoner"),
> >KeyEvent.VK_M,
> >mm.getDefaultMenuPos(),
> >ht("/Plugin/Mapathoner"));
> >
> >hm.setMnemonic(KeyEvent.VK_M);
> >
> >mm.add(hm, new BatchCircleBuildingAction());
> >mm.add(hm, new BatchOrthogonalBuildingAction());
> >mm.add(hm, new BatchLBuildingAction());
> >hm.addSeparator();
> >mm.add(hm, new PickResidentialAreaAction());
> >}
> >}
> >
> >Which should be ok ("Adding a menu entry to the main menu in the plugin
> >Constructor" [3]). Also, shortcuts are bound to actions.
> >
> >Thanks for any pointer,
> >jiri
> >
> >[1]: https://gitlab.com/qeef/mapathoner/blob/master/build.gradle
> >[2]:
> >https://gitlab.com/qeef/mapathoner/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapathoner/MapathonerPlugin.java
> >[3]:
> >https://josm.openstreetmap.de/wiki/DevelopersGuide/PluginInstallationWithoutRestart
> >
> >> Gerd
> >> 
> >> 
> >> Von: Jiri Vlasak 
> >> Gesendet: Dienstag, 19. Februar 2019 07:47
> >> An: josm-dev@openstreetmap.org
> >> Betreff: Plugin installation without restart
> >> 
> >> Dear JOSM devs,
> >> 
> >> I would like to ask about the difference between installing and
> >upgrading JOSM
> >> plugin. In my case, the installation does not the restart of JOSM
> >[1]. However,
> >> when the plugin is upgraded, the new functionality does not work
> >until restart.
> >> 
> >> The plugin adds JMenu with multiple options.
> >> 
> >> Thanks,
> >> jiri
> >> 
> >> [1]:
> >https://josm.openstreetmap.de/wiki/DevelopersGuide/PluginInstallationWithoutRestart
> >> 



Re: Plugin installation without restart

2019-02-27 Thread Jiri Vlasak
Hi Gerd,

thanks for your time. I am pretty sure I miss something trivial.

On Sat, Feb 23, 2019 at 08:10:12AM +, Gerd Petermann wrote:
> Hi Jiri,
> 
> my understanding is that your plugin either requires a restart (set 
> plugin.canloadatruntime to false in build.xml)

The `canLoadAtRuntime = true` should be set properly [1].

> or it should work so that it reacts on a event to rebuild everything (maybe 
> costly)

I am confused a little bit with "reacts on a event" part. The plugin 
constructor add entries to menu:

public class MapathonerPlugin extends Plugin
{
/**
 * Constructs a new {@code MapathonerPlugin}.
 */
public MapathonerPlugin(PluginInformation info)
{
super(info);
MainMenu mm = MainApplication.getMenu();
JMenu hm = mm.addMenu("Mapathoner",
tr("Mapathoner"),
KeyEvent.VK_M,
mm.getDefaultMenuPos(),
ht("/Plugin/Mapathoner"));

hm.setMnemonic(KeyEvent.VK_M);

mm.add(hm, new BatchCircleBuildingAction());
mm.add(hm, new BatchOrthogonalBuildingAction());
mm.add(hm, new BatchLBuildingAction());
hm.addSeparator();
mm.add(hm, new PickResidentialAreaAction());
}
}

Which should be ok ("Adding a menu entry to the main menu in the plugin
Constructor" [3]). Also, shortcuts are bound to actions.

Thanks for any pointer,
jiri

[1]: https://gitlab.com/qeef/mapathoner/blob/master/build.gradle
[2]: 
https://gitlab.com/qeef/mapathoner/blob/master/src/main/java/org/openstreetmap/josm/plugins/mapathoner/MapathonerPlugin.java
[3]: 
https://josm.openstreetmap.de/wiki/DevelopersGuide/PluginInstallationWithoutRestart

> Gerd
> 
> 
> Von: Jiri Vlasak 
> Gesendet: Dienstag, 19. Februar 2019 07:47
> An: josm-dev@openstreetmap.org
> Betreff: Plugin installation without restart
> 
> Dear JOSM devs,
> 
> I would like to ask about the difference between installing and upgrading JOSM
> plugin. In my case, the installation does not the restart of JOSM [1]. 
> However,
> when the plugin is upgraded, the new functionality does not work until 
> restart.
> 
> The plugin adds JMenu with multiple options.
> 
> Thanks,
> jiri
> 
> [1]: 
> https://josm.openstreetmap.de/wiki/DevelopersGuide/PluginInstallationWithoutRestart
> 



Plugin installation without restart

2019-02-18 Thread Jiri Vlasak
Dear JOSM devs,

I would like to ask about the difference between installing and upgrading JOSM
plugin. In my case, the installation does not the restart of JOSM [1]. However,
when the plugin is upgraded, the new functionality does not work until restart.

The plugin adds JMenu with multiple options.

Thanks,
jiri

[1]: 
https://josm.openstreetmap.de/wiki/DevelopersGuide/PluginInstallationWithoutRestart



Re: github or subversion?

2019-02-11 Thread Jiri Vlasak
If you are creating new JOSM plugin, I strongly suggest using
josm-gradle-plugin [1], git, and gitlab pages for providing the `.jar` file.

[1]: https://gitlab.com/floscher/gradle-josm-plugin

On Mon, Feb 11, 2019 at 09:01:07PM +, Malcolm Herring via josm-dev wrote:
> The plugins developer guide says use SVN, but that repo says that SVN is
> deprecated & to use GIT instead. Which is the correct?
> 
> 



Re: LiveJOSM project

2018-12-04 Thread Jiri Vlasak

On 12/4/18 10:48 PM, Sebastiaan Couwenberg wrote:

On 12/4/18 10:39 PM, Jiri Vlasak wrote:

I would like to announce the LiveJOSM [1] project. It's not much, just
Debian Live [2] with JOSM preinstalled (+ some plugins).


Why not install the josm package from the backports repository?

No need for the icon hack then.


There is no deep meaning in that. I am just used to download .jar from 
website.


jiri



LiveJOSM project

2018-12-04 Thread Jiri Vlasak

Dear JOSM devs,

I would like to announce the LiveJOSM [1] project. It's not much, just 
Debian Live [2] with JOSM preinstalled (+ some plugins). The purpose of 
this project is to enable JOSM on Missing Maps [3] mapathons for users 
without JOSM installed or mapping on company computers.


The project is in testing stage.

Some already build images ready to be burned to DVD or copied to USB 
disk are (maybe) available on unreliable server [4].


Have a nice day,
jiri

[1]: https://gitlab.com/qeef/livejosm
[2]: https://wiki.debian.org/DebianLive/
[3]: https://www.missingmaps.org/
[4]: http://giran.info/