Skip to main content
7 events
when toggle format what by license comment
Aug 25, 2015 at 15:24 comment added Jerome "ST_intersects(ST_GeomFromText('#{@poly}', 3785), locations.lonlat)" for anyone who is following is the proper string for the where command in rails
Aug 25, 2015 at 14:36 comment added Jerome Thanks Richard. I happend to have picked up on the single quote matter a while ago, viewing good examples. I did not have the CAPS correct. That did not impact the next hurdle PG::InternalError: ERROR: Operation on mixed SRID geometries : SELECT "locations".* FROM "locations" WHERE (ST_intersects(ST_GeomFromText('POLYGON ((9.0395777869 45.6141806128, [...] 9.0395777869 45.6141806128))'), locations.lonlat))
Aug 25, 2015 at 14:21 comment added Richard Fairhurst st_intersects((POLYGON ((9.0395777869... isn't valid SQL - it should be ST_Intersects(ST_GeomFromText('POLYGON(9.0395777869 45.614... and so on. It would help if you could post the full SQL being generated.
Aug 25, 2015 at 12:08 vote accept Jerome
Aug 25, 2015 at 12:06 comment added Jerome Removing ST_GeomFromText does not alter the error.
Aug 25, 2015 at 12:03 comment added Jerome I should have caught that, but I guess I'm getting tripped up between ruby, rgeo and straight sql. The interpolation jump started (via ActiveRecord), however PG did not like it too much, pointing at the space between lon and lat (chich I find curious as that is the syntax normally): PG::SyntaxError: ERROR: syntax error at or near "45.6141806128" LINE 1: ...es" WHERE (st_intersects((POLYGON ((9.0395777869 45.6141806...
Aug 25, 2015 at 11:42 history answered Richard Fairhurst CC BY-SA 3.0