I have a legacy areas data, where some records are in Polygon and some in MultiPolygon format stored in noSQL DB in JSON format. I need to migrate that data to a PostGIS database with area column, which has type of ST_MultiPolygon.
So, my question…
I want to have ability to edit GeoJSON data as text, in edit page. I use Rails, PostgreSQL with activerecord-postgis-adapter. For encoding data I use rgeo-geojson.
My show view works fine, I encode:
<%= RGeo::GeoJSON.encode(@field.shape,…
I'm trying to create a basic app using the activerecord-postgis-adapter gem and am following the instructions in the readme.
According to the readme, a point is supposed to use the spherical factory, but I get a CAPIPointImpl type instead of a…
I'm having some trouble storing a point in RGeo.
initializer/rgeo.rb
RGeo::ActiveRecord::SpatialFactoryStore.instance.tap do |config|
# By default, use the GEOS implementation for spatial columns.
config.default = RGeo::Geos.factory_generator
…
Having trouble implementing Daniel Azuma's solution for handling Google Maps geo data with RGeo / Rails.
SETUP
locations table:
create_table "locations", force: :cascade do |t|
t.string "name",
t.geometry "polygon", limit:…
I'm quite new to postgis and rgeo. I suspect I may be tackling things in the wrong way but I have been a bit surprised to find out a few operations, in particular contains & within, aren't possible on spherical based objects.
I have a bunch of…
I'm asking this question because the answers I've found in Order by nearest - PostGIS, GeoRuby, spatial_adapter wasn't able to provide a solution. I'm trying to create a controller method that can return the n closest records to a certain record's…
I updated Rails version to 4.2 and then my test are failing when Rgeo gem is used. It seems that there is something wrong with the attributes types on the tables.
can't cast RGeo::Geographic::SphericalPointImpl to point
Following this link…
there is a typical schema when Address model has an RGeo attribute:
t.st_point :coordinates, geographic: true, srid: 4326
and normally it is wrapped in the RGeo::Geographic::SphericalPointImpl…
I have a rails app that uses the RGeo gem and I'm having a hard time getting the gem to install with support for the underlying GEOS library which my app requires to work properly.
Typically you can run RGeo::Geos.supported? from the rails console…
I am trying to write this algorithm in R. Does it exist in any package already?!?
This is what I did (with help from SO and various blog posts):
library(rgdal)
library(ggmap)
require("maptools")
require("plyr")
locations<- unique(cbind(data22[,1],…
I'm using Rails 4.4.1, Ruby 2.1.2, RGeo 0.3.20 and activerecord-mysql2spatial-adapter 0.4.3
My problem is probably very simple since I'm new to both Ruby and Rails, but I could not find anything useful in the web so far.
I want to create a form to…
Ok, so this may seem like a total newbie ask, but when I create an instance of my model with let, for some reason all of the getter methods on it return nil. Here's my example:
Model:
class Parcel < ActiveRecord::Base
extend UUIDHelper
…
I have a polygon that represents a school district, which I have imported from NYC Open Data. I believe that the coordinates are in epsg projection 2263 - nad83 / new york long island
I am having trouble converting the coordinates to a format usable…