On Thursday, 09 June 2011, at 21:32:34 +0200,
Damir Perisa wrote:

> is there somewhere documentation how to add such a filter? i have some 
> experience with java and some script languages but never did something 
> with qt.
> 
A good starting point to get information on how to implement the algorithm,
or the implementation itself, would be the "mkgmap" sources, as
Douglas-Pecker is implemented by "mkgmap" as a means of point density
reduction when generating Garmin maps. See "mkgmap" option 
--reduce-point-density

As "mkgmap" is coded in Java, it should be easy for you to understand, and
as it is released under the GPLv2 license, the code could be used in QLGT
according to the license, after the necessary language / programming
adaptation. Have a look at "mkgmap" sources at:
http://www.mkgmap.org.uk/snapshots/
http://svn.parabola.me.uk/mkgmap/trunk (HTTP and SVN)
http://www.mkgmap.org.uk/svn/wsvn/mkgmap

It seems the algorithm is implemented in the following souce file:
src/uk/me/parabola/mkgmap/filters/DouglasPeuckerFilter.java

The file is slightly over 150 lines long, including a fair amount of useful
comments, so should be easy to understand and "translate" to QLGT.

Hope it helps.

Greetings,

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436     Linux Kubuntu 11.04 (Linux 
2.6.38-8-generic-pae)

Attachment: signature.asc
Description: Digital signature

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Qlandkartegt-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qlandkartegt-users

Reply via email to