>
> Admittedly I am no JavaScript fan at all, but Lua looks definitely more
> non-programmer friendly than QtScript to me, but that might be just my
> impression.

That is more or less my point of view, too. However as filter scripts 
will require some user input QtScript will be the only way to go. But 
maybe we can achieve something similar with Lua. What about a list 
widget with known scripts and a text box. If you select a script the 
list box shows the parameters like:

a = 5
b = 6

The user can change these values and press ok. The text is read and 
split into variables ready to read by Lua.

>
> Occasionally it makes also sense to tweak Douglas-Peucker, BTW: We have a long
> straight road here with a moderately steep 40m hill, which gets mostly 
> flattened
> out by the standard 2D-Douglas-Peucker, because it doesn't take elevation data
> into account ;-)

Usually Douglas-Peucker is used to hit the 500 point limit on old 
devices. For all other cases I appreciate the current algorithm, which 
takes the elevation into account, too.

>
> Yes, the dialog looks a bit "historically grown" ;-)  I am no UI expert, but I
> think the apply-this-or-that check box on each page at least not optimal.

Really :)

>
> Oh, while we're at it: Contrary to the current filter implementation, Lua 
> track
> filters are atomic. If something goes wrong in the middle of a Lua filter no
> data is modified, because a track where half of the data is modified is
> generally rather useless.

That's nice, but there should be always shadow values, too. Currently 
there are _lon, _lat and _ele. A QLGT track will always carry the 
original information as long as it stays in the QLGT universe which is 
the database and the *qlb format.

>
>> Next I would suggest to add that additional tab in the track edit dialog and 
>> to start implementing a better track filter UI. For the next releases this 
>> can be in parallel to the current track filter dialog. If it supersedes  the 
>> old dialog the old one will be removed. What do you think about that?
>
> Sounds reasonable!
>

Ok :) Go ahead.

Oliver


>>
>> -------- Original-Nachricht --------
>>> Datum: Sun, 25 Sep 2011 21:19:11 +0200
>>> Von: Helmut Schmidt<[email protected]>
>>> An: [email protected]
>>> Betreff: Re: [Qlandkartegt-users] User definable track filtering?
>>
>>> Hi Michael,
>>>
>>> I like it, sounds really cool!
>>>
>>> Helmut
>>>
>>> Am 2011/09/23 23:55, schrieb Michael Klein:
>>>> Hi!
>>>>
>>>> I think it would be really nice to have the possibility to add some user
>>>> definable track filtering mechanism without the need to hack around in
>>>> CDlgTrackFilter and compile the whole thing from source, but some
>>>> interpreted scripting language instead.
>>>>
>>>> Compared to e.g. Python, Lua is embarrassingly easy to embed, so I made
>>>> a quick hack that adds a "Lua" page to the track page, where you can
>>>> simply paste your Lua filter script and execute it. Obviously the
>>>> attached hack isn't ready for prime time yet and leaves much to be
>>>> desired on the UI, but it's enough to play a bit around and check what's
>>>> possible.
>>>>
>>>> The track data is exposed to the Lua interpreter through the single
>>>> global array "track". Note that array elements are, by convention,
>>>> counted from 1 instead of 0 in Lua. Currently only a subset of the track
>>>> point data is exposed: lat(itude), lon(gitude), ele(vation), flags and
>>>> timestamp.
>>>>
>>>> Attached is also a simple implementation of the Douglas-Peucker
>>>> algorithm in Lua. Filtering a track with 3000 points takes only a few
>>>> seconds on my dated G4 Powerbook, and it seems most of the time is
>>>> actually spent in track.rebuild() *after* the Lua work. So performance
>>>> is IMHO no showstopper.
>>>>
>>>> Opinions?
>>>>
>>>> Regard,
>>>> Michael
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Qlandkartegt-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users
>


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to