# Convert lambert II to wgs84

**URL:** https://discuss.elastic.co/t/convert-lambert-ii-to-wgs84/104707
**Category:** Logstash
**Created:** [October 20, 2017, 1:33pm UTC](https://discuss.elastic.co/t/convert-lambert-ii-to-wgs84/104707 "2017-10-20T13:33:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ala\_t](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Ala\_t](https://discuss.elastic.co/u/Ala_t)
#### Post date: [October 20, 2017, 1:33pm UTC](https://discuss.elastic.co/t/convert-lambert-ii-to-wgs84/104707/1 "2017-10-20T13:33:13Z")

</div>

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](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 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [November 17, 2017, 1:33pm UTC](https://discuss.elastic.co/t/convert-lambert-ii-to-wgs84/104707/2 "2017-11-17T13:33:23Z")

</div>

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