Thanks for taking the time to post the solution. I look forward to using Ruby with Postgis (ramping up on both!) and will come back to this thread.
Margie -- http://FarmBillPrimer.org http://www.BaltimoreUrbanAg.org (Please send events; This site is hungry.) http://www.ExcellentNutrition.org http://www.packtpub.com/drupal-5-views-recipes/book On Tue, Mar 4, 2014 at 6:42 PM, Brice Bene <[email protected]> wrote: > I did a mistake on my example. If someone use it in the futur, it is > better with a good example : > > set_rgeo_factory_for_column(:position, > RGeo::Geographic.simple_mercator_factory.projection_factory) > > where position is the name of the PostGIS column. > > Regards, > > *Brice.* > > > 2014-03-05 0:27 GMT+01:00 Brice Bene <[email protected]>: > > Finally I found the solution. The function set_rgeo_factory_for_column >> must be added to each model with a link to PostGIS where you specify which >> factory you are using. >> >> example >> : >> set_rgeo_factory_for_column(RGeo::Geographic.simple_mercator_factory.projection_factory) >> >> Thank you for your help and your time. >> >> *Brice.* >> >> >> 2014-03-04 21:42 GMT+01:00 benebrice <[email protected]>: >> >>> I tried to create the database manually with the template and only >>> after does the migrations. I check the value before being recorded and it >>> is ok (I can obviously unproject the projection). But when it is stored, it >>> cannot be unproject. The problem can come from 2 different points. >>> The activerecord-postgis-adapter/rgeo-activerecord or PostGIS. I think >>> Rails 4 is a possible reason of that. >>> >>> *Brice.* >>> >>> >>> 2014-03-04 18:38 GMT+01:00 Dan Lyke [via PostGIS] <[hidden >>> email]<http://user/SendEmail.jtp?type=node&node=5005829&i=0> >>> >: >>> >>> On Tue, Mar 4, 2014 at 9:33 AM, benebrice <[hidden >>> email]<http://user/SendEmail.jtp?type=node&node=5005826&i=0>> >>>> wrote: >>>> > Thank you for your answer but unfortunately I had already tried this. >>>> I did >>>> > it again but still nothing. I used a similar configuration with a >>>> Rails 3 >>>> > Application and Ruby 1.9.2 with PostiGIS 2. It was working. >>>> >>>> Is there perhaps a way to dump the SQL that your Rails ORM is >>>> generating? Seems to me like you've got a leaky abstraction layer >>>> somewhere, the problem is likely in Rails, and without knowing how >>>> Rails is going wrong we're just playing pin the tail on the donkey. >>>> >>>> Dan >>>> _______________________________________________ >>>> postgis-users mailing list >>>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5005826&i=1> >>>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >>>> >>>> >>>> ------------------------------ >>>> If you reply to this email, your message will be added to the >>>> discussion below: >>>> >>>> http://postgis.17.x6.nabble.com/Recording-problems-with-PostGIS-tp5005821p5005826.html >>>> To unsubscribe from Recording problems with PostGIS, click here. >>>> NAML<http://postgis.17.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> >>>> >>> >>> >>> ------------------------------ >>> View this message in context: Re: Recording problems with >>> PostGIS<http://postgis.17.x6.nabble.com/Recording-problems-with-PostGIS-tp5005821p5005829.html> >>> Sent from the PostGIS - User mailing list >>> archive<http://postgis.17.x6.nabble.com/PostGIS-User-f3516033.html>at >>> Nabble.com. >>> >>> _______________________________________________ >>> postgis-users mailing list >>> [email protected] >>> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >>> >> >> > > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users >
_______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
