Questions tagged [ruby]

an object-orientated programming language

Filter by
Sorted by
Tagged with
1
vote
1answer
35 views

QGIS: Smoothing two polygon sets where polygons are nearly adjacent

I have two polygon sets, one representing cities, the other representing school districts. I am trying to create a relationship between cities and districts, but I have a problem where the cities and ...
1
vote
0answers
47 views

Simple clustering example

I'm trying to use postgis ST_withincluster function. But my knowledge over SQL seems a bit too fresh at the moment and I can't figure out by myself how I should proceed by reading posts like this one: ...
0
votes
0answers
28 views

Converting longitude/latitude to pixel x,y representation in image

I am working on a project which shows users their areas of interest on a map. As a feature of this application - we show the static satellite image relating to the area of interest, this is an ...
1
vote
0answers
29 views

Data type for mixed representation

The following is a JSON representation of an large array of planar spatial surfaces. {"type":"Feature", "geometry":{ "type":"MultiPolygon", "coordinates": [[[[17.7529,-31.146],[17....
1
vote
0answers
557 views

Shapefile to GeoJson with Rails

I have a requirement to create a layer on map, Client have provided me only the shape files(.shp). As i am very new to GIS, i was reading about it and found we need to convert the shapefile into ...
3
votes
1answer
236 views

Checking to see if postGIS is enabled in Ruby on Rails

How can you check if postGIS is enabled in a ruby on rails app? rails seems to do a lot of the backend for you so this is confusing for me. Normally, i would set it up and set up the extension myself. ...
1
vote
1answer
1k views

Does Ruby on Rails enable PostGIS for you?

When using PostGIS with Ruby on Rails and the rgeo - activerecord PostGIS adapter Do I need to create a database first in PostgreSQL and enable the PostGIS extension?
1
vote
2answers
377 views

Can not get Leaflet map to show via link in Rails 4

I'm stumped here, and wondering if anybody can help point me in the correct direction. For that matter, I'm wondering if anybody has ever bumped into this? When I enter my url in manually the map ...
1
vote
0answers
395 views

Rails - inserting GeoJSONs into PostGIS-adapted database

I'm using Rails' PostGIS adapter and RGeo-GeoJSON gems to store/serve some simple geometries in the Postgres database, but I'm having a little trouble with my database seed file... I'd like to be able ...
3
votes
0answers
151 views

Casting group of two polygons with rgeo returns nil

Here's an array of 2 polygons I'm trying to cast into a multipolygon (wkt string format). The polygons are in a linear CRS, SRID:3361 ["POLYGON ((990863.9961167622 709913.6373089257, 990983....
2
votes
0answers
340 views

Any good ruby gems that can calculate a polygonal geofence?

Looking for a Gem that has polygonal geofencing. Many gems offer square or radius geofencing.
1
vote
1answer
166 views

Using mapscript with ruby on rails? [closed]

I want to use mapscript with rubyonrails how should i start doing this? can anyone point to a good tutorial on mapscript?
1
vote
1answer
676 views

RGeo::Feature.cast does not convert between projections

I am attempting to cast a MultiLineString feature in WGS84 to UTM33N using RGeo. Unfortunately, RGeo::Feature.cast, instead of casting the feature to the desired projection, returns the original ...
0
votes
1answer
175 views

Selecting points from intersecting an arbitrary (non-database) polygon with PostGIS

Determining a polygon as follows, and the points to check against, in ruby @poly = GEOFACTORY.polygon(@line_string1) @locations = Location.all @valid_locations = Location.order("id").where("...
2
votes
2answers
2k views

Polygon area calculation in Ruby (on Rails, rgeo, PostGIS and GEOS) in sqare meters

In a Ruby-on-Rails application, I need the area in square meters (or any other surface measure, be it ares, hectares, square kilometers, but not in pseudo surface measure like square degrees) of a ...
0
votes
1answer
331 views

Create KML in Ruby with ruby_kml and use in Javascript

I want to create a KML in Ruby and use it with Openlayers. But Openlayers only wants a real KML file. It's complicated to explain. Just look at my Code: In my Controller I have the following method ...
0
votes
1answer
1k views

Phusion Passeger Error

so i am installing the cartodb platform locally i have followed all the procedures succesfully but i have a phusion passenger spawn error. I am looking for working solutions and i haven't any to be ...
2
votes
1answer
912 views

Running CartoDB Server Stack?

We're attempting to download and run the CartoDB stack on an Ubuntu Amazon EC2 instance dedicated just for it. So we've begun from a bare bones OS install. We've gone through the install/configure ...
2
votes
1answer
746 views

Why are my points being flipped or mirrored when I convert from DMS to DD?

I have a collection of crash data that provides latitude and longitude in degrees, minutes, and seconds that I'm converting to decimal degrees using: (degrees + (minutes/60.0) + (seconds/3600.0)) ...
1
vote
0answers
264 views

Geocode incredibly quickly but inaccurately

I have a Rails 4 app that needs to be able to geocode a large number of places very quickly, but not with any high degree of accuracy. Accurate to a few miles would be fine, I really just need the lat/...
6
votes
2answers
1k views

intersection between two multipolygons yielding anomalous GeometryCollection object full of LineString's & Polygon's (trying to get intersect area)

Normally when I call the #intersection method on a multipolygon to find the intersection shape on another multipolygon I get a multipolygon returned back to me. Either that or something else I can ...
4
votes
2answers
4k views

Attempting to use ST_DWithin to locate objects within a given distance of meters using SRID 4326

I'm a Rails developer with minimal GIS experience, working with PostGIS and the RGeo gem. I'd like to find all of the cows within 500 meters of my current location. So, I'll create a model for my ...
3
votes
2answers
4k views

How to fix “Connection failed - Check settings and try again” when connecting to PostGIS?

I have Postgres running via Postgres.app on rails already and am trying to connect QGis to the database. PostGIS is working already. (questions already found online deal with this issue only) I do ...
2
votes
1answer
171 views

Which fields are standardized to describe a ShapeFiles feature?

I would like to store data into a database which is available here either as JSON or as ShapeFiles. The JSON looks something like this: { "type": "FeatureCollection", "features": [ { "...
9
votes
1answer
3k views

Pros and cons of using Ruby/Rails/RGeo or Python/GeoDjango for a web based GIS

We're at the investigation phase of creating a web based GIS. We're assessing options for an ORM to use in all of our backend import/export and processing routines. From my research, GeoDjango appears ...
3
votes
0answers
753 views

Can I use RGeo::Point data in PostGIS queries without multiple conversion?

How can I represent RGeo::Point ( CAPI implementation ) in some way where I don't have to convert it once more in Sql? Now I have something like this: class Poly scope :enclosing ->(geom) do ...
1
vote
1answer
571 views

Point plus distance along great circle using RGeo or WKT

I'm racking my brains (and google) trying to figure out how to get RGeo to do the following geospatial calculation: Imagine I start off at some arbitrary geographic point (let's say (45, 45) which ...
1
vote
2answers
185 views

Offline data and less space with Ruby

I have a very specific problem. I am trying to build an offline map on leaflet, rhomobile(based on ruby) and OSM data. The problem is that I am making now a offline layer images folder with the city ...
3
votes
4answers
2k views

Algorithm for finding population for a given center point and radius in US

Here is what I have The population data aggregated by zip code given by US Census. Here is what I am doing right now: Reverse geo code the center point to find the zip code of the center point. ...
13
votes
10answers
5k views

What are the advantages of using Rails for a GIS/mapping application? [closed]

I've heard some good things about Rails, but I don't know much about it yet. There are only a few questions about Rails on GIS.SE (and there's not even a Rails tag). Is it worthwhile to learn about ...
2
votes
2answers
546 views

Ruby bindings to GDAL

I'm looking for a guide on how to get up and running with ruby and gdal on Mac. I've seen some examples on how to use gdal in ruby but never found any tutorials on where to download and install it.