Questions tagged [rgeo]

RGeo is a geospatial data library for Ruby.

RGeo is a geospatial data library for Ruby.

https://github.com/rgeo/rgeo

121 questions
0
votes
1 answer

How to resolve: "proj4_c_impl.bundle: [BUG] Segmentation fault at 0x00000000000440"

MacBook-Pro:sims moboyle$ rails s /Users/moboyle/.rvm/gems/ruby-2.2.2/gems/rgeo-0.3.20/lib/rgeo/coord_sys/proj4_c_impl.bundle: [BUG] Segmentation fault at 0x00000000000440 ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin14] Any ideas? Full…
ob1
  • 1,792
  • 15
  • 20
0
votes
1 answer

How do I make RGeo::Feature::Geometry methods available to RGeo::Geographic::SphericalMultiPolygonImpl?

I am using Rails 4.2 with PostGIS, rgeo and the activerecord-postgis-adapter gem on Ubuntu. I have also installed the following libraries: libgeos++-dev libgeos-3.4.2 libgeos-c1 libgeos-dbg libgeos-dev libgeos-doc libgeos-ruby1.8 ruby-geos. An…
pitachip
  • 965
  • 3
  • 7
  • 24
0
votes
1 answer

Trying to import shapefile using RGeo Ruby gem, getting Stack Level too deep

I don't know whether this is some interaction inside my code, or perhaps naming conventions inside the shapefiles I'm using, but the following code results in a Stack level too deep message def read_shapefile @shp_path = Dir[File.join( @tmp_path,…
mostlydev
  • 715
  • 6
  • 16
0
votes
1 answer

RGeo PostGIS multi-table query

The following query runs fine as raw sql, but because it hits 2 models, I'm not sure how construct it in active record... sql = "SELECT spots.* FROM spots, areas WHERE areas.area = '#{@area.area}' AND…
user1051849
  • 2,307
  • 5
  • 26
  • 43
0
votes
3 answers

Rails RGeo::Geos.supported? False Can't get rgeo-shapefile working

Trying to make this example of uploading a shapefile work with my rails setup and, running from the console, i get returned with: RGeo::Error::RGeoError: GEOS is not available, but is required for correct interpretation of polygons in…
user1051849
  • 2,307
  • 5
  • 26
  • 43
0
votes
1 answer

Undefined method on Heroku (using Puma)

We're using the Postgis adapter with Ruby on Rails, and we're trying to use Puma on Heroku for our production environment. Our test pass flawlessly on the development system. Also, the server works perfectly on every production server but Heroku,…
Dave Qorashi
  • 326
  • 2
  • 11
0
votes
1 answer

Latitude saving as -90 With PostGIS RGeo Lat/Lng Points

I am working with Geo Spatial coordinates and was testing my coding in rails console Looks like it is changing my longitude to -90.0 instead of what it should be -93.291557312011719 Any help would be appreciated.. tried it with just…
Big Al Ruby Newbie
  • 834
  • 1
  • 10
  • 30
0
votes
2 answers

Method not defined in production

I have a project with PostGIS integration through RGeo gem. Rails 4, ruby 2.1. RGeo has standard method contains? which checks is point is located in polygon. Everything is fine in development (on MacOS X). But when I push my code to production…
Pavel Tkackenko
  • 963
  • 7
  • 20
0
votes
1 answer

Postgis ST_DWithin match a certain radius AND points on the right

I'm using postgis 9.1 and rgeo to develop an map application. One of the features implies that I find all points that are XXX kms from the current point, and are also on the right of the Point. I tried with the following query: Environment.where{…
0
votes
1 answer

rails 4 postgis and singular table names

We are using rails (4.0.4), ruby (2.0.0p247) and activerecord-postgis-adapter (0.6.5) and singular table names set in ./config/environment.rb (ActiveRecord::Base.pluralize_table_names = false) This works great in development and test environments.…
techbrownbags
  • 618
  • 5
  • 10
0
votes
1 answer

RGeo: error when running spatial migration

I'm working with Rails 3.2 and MySQL. I installed the gems: gem 'rgeo', '0.3.20' gem 'rgeo-activerecord', '0.4.6' gem 'activerecord-mysql2spatial-adapter', '0.4.3' all other requirements and dependencies are met, or at least I think so. Yet,…
Miotsu
  • 1,776
  • 18
  • 30
0
votes
1 answer

PostGIS's st_overlaps method is only returning results overlapping the LinearRing which makes up the exterior of the polygon I'm searching under

I'm using PostGIS on ruby/rails, and have created a simple box-like polygon under which I wish to search for land parcels in a county. The st_overlaps tool has worked for this before and it has worked this time, sort of. So I created the polygon to…
boulder_ruby
  • 38,457
  • 9
  • 79
  • 100
0
votes
1 answer

Why do I get "Errno::ENOENT: No such file or directory" when joining a filename?

I have a file I'm trying to open in a Rails application. For some reason Ruby is splitting the name of the file. For example: root = Rails.root path = root.join('lib/tasks/filename.shp') puts path What is output is /lib/tasks/filename/shp. Then I…
Ben G
  • 128
  • 2
  • 14
0
votes
3 answers

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. (Need to convert a Boolean from Postgres (==…
Benjamin M
  • 23,599
  • 32
  • 121
  • 201
0
votes
1 answer

How to express the projection using pure sql?

I have used RGEO_FACTORY = RGeo::Geographic.simple_mercator_factory RGEO_FACTORY.point(lon, lat).projection But now I want to use sql to implement it. And I have the point(geometry) in the postgis database. How should I do ?
Tony Han
  • 2,130
  • 3
  • 24
  • 37
1 2 3
8
9