Convert lambert II to wgs84


#1

Hi,
how can i use ruby code to convert lambertII to wgs84 ?, in fact i installed this library https://github.com/yageek/lambert-ruby#usage and I verified that this library is installed because I found it under the folder
"/usr/share/logstash/vendor/bundle/jruby/1.9/gems/" and then i tried to use this library with this script ruby in ruby-filter in logstash and this is my ruby-filter in my file.conf:

ruby {
init => "require 'lambert_ruby'"
code => "
a = Lambert::LambertPoint.new(994272.661,13467.422)
a.wgs84(Lambert::LambertII)
event.set( '[result]', event.get('[a]') )
"
}

but after restart logstash i get this error "[ERROR][logstash.filters.ruby ] Ruby exception occurred: wrong number of arguments calling initialize (2 for 3)" , and yet I put this script in a file.rb and it works well but with ruby filter it does not work
i use logstash 5.5.1
I need your help please :slight_smile:


(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.