0
votes
0answers
21 views

undefined method when trying to build db with activerecord-postgis-adapter

I am trying to deploy a rails application using activerecord-postgis-adapter to heroku, however I keep getting this error. ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0] Rails 3.2.13 ...
0
votes
0answers
36 views

Receiving PG::Error when trying to save GeoJSON to Postgres / PostGIS database. What's missing?

I'm using Rails 3.2 with a Postgres / PostGIS database and the following gems: pg (0.15.1) rgeo (0.3.20) rgeo-activerecord (0.5.0) rgeo-geojson (0.2.3) activerecord-postgis-adapter (0.6.2) The ...
2
votes
1answer
122 views

How can I use PostGIS functions in rails?

The query I'd like to run is: SELECT zcta.geoid10, ST_AsGeoJSON(ST_simplify(zcta.geom,500)) FROM zcta WHERE zcta.geoid10 = '90210' However in the Rails console when I enter this: testquery = ...
0
votes
1answer
100 views

POSTGIS query optimization in RAILS

I am using postgis2.0 with postgres 9.1 db. My goal is to write as close as possible to an optimized query to get nearby locations within certain radius and out put them with their distance order. The ...
0
votes
1answer
79 views

postgis st_distance returning incorrect results

I am using postgis to calculate distance between 2 geo co-ordinates. select st_distance( 'POINT(15.651955 73.712769)'::geography, 'POINT(14.806993 74.131451)'::geography) AS d; It's returning ...
0
votes
3answers
188 views

Convert an ActiveRecord column to PostGIS Point

My setup: Ruby 2.0.0 Rails 3.2.12 most recent pg gem most recent activerecord-postgis-adapter gem most recent rgeo-geojson gem Postgres 9.1.6 PostGIS 2 I've asked something similar a few days ago. ...
0
votes
1answer
40 views

Load only needed points to map from PostGIS in Rails

I'm loading a lot of points, polygons and lines from a PostGIS database to a google map. If I load the entire DB, it'll kill the browser, so I'm looking for a way to load only in the area the user can ...
0
votes
1answer
41 views

Storing a geo route

I'm planning to build a Rails application that should store data about a geo routes (potentially millions). The route is recorded from an smartphone or manually "drawn" in an web-interface. A route ...
2
votes
1answer
139 views

Find all items within a bounding box with PostGIS and Rails

I have a Rails model that uses a PostGIS POINT type to store the coordinates of a location. How can I query all locations that are contained within a bounding box? The bounding box comes from Google ...
0
votes
2answers
131 views

Can't save polygon with PostGIS/RGeo

How do you save a polygon using the PostGIS adapter for Rails? In my model I have: self.rgeo_factory_generator = RGeo::Geos.factory_generator set_rgeo_factory_for_column(:bounds, ...
0
votes
1answer
136 views

Using postgres_ext with postgis adapter not working with array columns

I've successfully installed PostGIS and using the postgres_ext gem to add support Rails postgis ActiveRecord adapter, but when I try to use a Postgres array column type in my migration, it fails: ...
0
votes
1answer
74 views

how to configure database.yml in windows 7 to use postgis

My database.yml development section looks like this: development: adapter: postgis encoding: unicode database: openData_development pool: 5 username: postgres password: test1234 ...
2
votes
1answer
236 views

RGeo Projected Buffer Polygon too small

I have a rails app that is using rgeo 0.3.19 with proj4 support connecting to a PostGIS 1.5 database with the rgeo-activerecord 0.4.5 gem. My app has a model called Region which contains a geographic ...
1
vote
2answers
149 views

rails gem install pg

I want to install the gem pg onto my windows 7 machine with: gem install pg But it fails every time with following error: Fetching: pg-0.14.1-x86-mingw32.gem (100%) Successfully installed ...
0
votes
1answer
144 views

Trying to get postres and postgis running in rails app

I am completely new to Postgresql, Postgis, and SQL and have a little bit of rails knowledge. I am trying to get an existing app going on my local and am currently receiving the following messages ...

1 2 3
15 30 50 per page