Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread Margie Roswell
Thanks for taking the time to post the solution. I look forward to using Ruby with Postgis (ramping up on both!) and will come back to this thread. Margie -- http://FarmBillPrimer.org http://www.BaltimoreUrbanAg.org (Please send events; This site is hungry.) http://www.ExcellentNutrition.org http

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread Brice Bene
I did a mistake on my example. If someone use it in the futur, it is better with a good example : set_rgeo_factory_for_column(:position, RGeo::Geographic.simple_mercator_factory.projection_factory) where position is the name of the PostGIS column. Regards, *Brice.* 2014-03-05 0:27 GMT+01:00 B

Re: [postgis-users] ST_AsRaster vs raster2pgsql

2014-03-04 Thread Pierre Racine
You can set the pixeltype and the extent in ST_AsRaster(). You seems also to have a different nodata value that you can also set in ST_AsRaster(). So a bit of reading about ST_AsRaster() and experiment and you'll should get what you want. Pierre > -Original Message- > From: postgis-use

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread Brice Bene
Finally I found the solution. The function set_rgeo_factory_for_column must be added to each model with a link to PostGIS where you specify which factory you are using. example : set_rgeo_factory_for_column(RGeo::Geographic.simple_mercator_factory.projection_factory) Thank you for your help and

Re: [postgis-users] ST_AsRaster vs raster2pgsql

2014-03-04 Thread georgew
Thank you Pierre, after adding constraints I get: "NZTPU";"public";"bk30_saga";"rast";2193;5;-5;4801;5784;TRUE;FALSE;1;"{32BF}";"{-9}";"{f}";"010320910801000580DD0F3A41CECF067D3C7255410080A26D3A41CECF067D3C7255410080A26D3A41CECF067DFE410080DD0F3A41CECF06

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread benebrice
I tried to create the database manually with the template and only after does the migrations. I check the value before being recorded and it is ok (I can obviously unproject the projection). But when it is stored, it cannot be unproject. The problem can come from 2 different points. The activerecor

Re: [postgis-users] ST_AsRaster vs raster2pgsql

2014-03-04 Thread Pierre Racine
It's not because the entries in raster_columns are different that the actual tables are different. Info in raster_columns is generated from constraints set by raster2pgsql. A better way to compare the two tables is to use ST_Metadata() and ST_BandMetadata(). You can also set the constraints on

[postgis-users] ST_AsRaster vs raster2pgsql

2014-03-04 Thread georgew
Hi, I am new to raster and am having some problems creating a raster table from a contour vector table, PostGIS 2.1.1, Win 8.1 64bit To create the table I am using: CREATE TABLE BK30_dem2 AS SELECT 1 AS rid, ST_AsRaster(( SELECT ST_Collect(geom) FROM contours_topo_

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread Dan Lyke
On Tue, Mar 4, 2014 at 9:33 AM, benebrice wrote: > Thank you for your answer but unfortunately I had already tried this. I did > it again but still nothing. I used a similar configuration with a Rails 3 > Application and Ruby 1.9.2 with PostiGIS 2. It was working. Is there perhaps a way to dump t

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread benebrice
Thank you for your answer but unfortunately I had already tried this. I did it again but still nothing. I used a similar configuration with a Rails 3 Application and Ruby 1.9.2 with PostiGIS 2. It was working. I may have done something but I am not able to remember what. I checked everything on my

[postgis-users] Split(line, point), a temporary version until ST_Split gets fixed

2014-03-04 Thread Rémi Cura
Hey List, here is a link a linkto a working implementation of ST_Split((multi)line,(multi)point). The current ST_Split is not working correctly with points due to precision issues (and it is not working with m

Re: [postgis-users] Recording problems with PostGIS

2014-03-04 Thread Margie Roswell
Maybe this is it? http://alastaira.wordpress.com/2011/01/23/the-google-maps-bing-maps-spherical-mercator-projection/ "However, less than a year after the official EPSG: 3785 code was finally introduced, EPSG issued a change request (EPSG::2008.114, issued in Dec 2008), deprecating the 3785 code a

[postgis-users] Recording problems with PostGIS

2014-03-04 Thread benebrice
Hello, I am currently developing a Rails Application (Rails 4.0.2, Ruby 2.1). I am using RGeo to convert longitude and latitude to a position with the srid 3785 (for PostGIS). When I am on with the terminal, I can project and unproject the coordinates without any problem. But when I save the posit

Re: [postgis-users] xkcd on map clocks...

2014-03-04 Thread Brent Wood
Couldn't resist - he's done it again - a novel map for (sort of) spatio-temporal data http://xkcd.com/1335/ Brent From: Gerry Creager - NOAA Affiliate To: PostGIS Users Discussion Sent: Wednesday, February 26, 2014 12:30 PM Subject: [postgis-users] xkcd

Re: [postgis-users] merge partial intersected polygons in one table

2014-03-04 Thread Rémi Cura
Hey, you could use postgres windows function and group by on parcel_id, coverage_id. If using Union, overlapping polygons while be merged, and non overlapping will only be grouped into multi or geom collection. You might struggle to keep the id. Cheers, Rémi-C 2014-03-03 22:52 GMT+01:00 mane