Re: [postgis-users] Optimizing ST_Intersection

2011-09-27 Thread Stephen Woodbridge
Hi Paul, If the pipeline is a very long linestring then would it make sense to first chop the linestring into multiple shorter segments and then intersect each of them against the roads. I would think that this could be done with a join between SRF to chop the linestring into segments and the

Re: [postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Stephen Woodbridge
On 9/27/2011 5:14 PM, Greg Allensworth wrote: On 9/27/2011 2:09 PM, Paul Ramsey wrote: Some functions are just plain Dropped between versions, and actually the ones you cited looked like losers to me. The best bet is to put a dump against a clean newly installed PostGIS database. OK, good, goo

Re: [postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Greg Allensworth
On 9/27/2011 2:09 PM, Paul Ramsey wrote: Some functions are just plain Dropped between versions, and actually the ones you cited looked like losers to me. The best bet is to put a dump against a clean newly installed PostGIS database. OK, good, good. I'll give that a shot, and let you know if i

Re: [postgis-users] Optimizing ST_Intersection

2011-09-27 Thread Paul Ramsey
http://www.sql-tutorial.net/SQL-JOIN.asp SELECT ST_AsText(ST_Intersection(r.the_geom, p.the_geom) FROM roads r JOIN pipes p ON ST_Intersects(r.the_geom, p.the_geom) WHERE p.pipeid = 1; On Tue, Sep 27, 2011 at 1:56 PM, vinod.kh...@gmail.com wrote: > I have a table containing all roads in the US.

Re: [postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Paul Ramsey
Some functions are just plain Dropped between versions, and actually the ones you cited looked like losers to me. The best bet is to put a dump against a clean newly installed PostGIS database. P. On Tue, Sep 27, 2011 at 1:55 PM, Greg Allensworth wrote: > On 9/27/2011 1:41 PM, Paul Ramsey wrote:

[postgis-users] Optimizing ST_Intersection

2011-09-27 Thread vinod.kh...@gmail.com
I have a table containing all roads in the US. Naturally, this table is very large with more that 20 million rows. I want to find the intersection of these roads with a single linestring (representing a pipeline). SELECT ST_AsText(ST_Intersection( (SELECT the_geom FROM roads) (SELECT the_g

Re: [postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Greg Allensworth
On 9/27/2011 1:41 PM, Paul Ramsey wrote: Create a new database Load PostGIS 1.5 into that blank database Load your dump file into that PostGIS 1.5 database Watch a lot of errors go by Yeah, we got that. Aside from these functions, the process still basically worked. Still, I'd like for these f

Re: [postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Paul Ramsey
For a hard upgrade, do the following steps: Create a new database Load PostGIS 1.5 into that blank database Load your dump file into that PostGIS 1.5 database Watch a lot of errors go by I think it's possible you've created a new database in PgSQL 9.1 but still linked all your functions to the ol

[postgis-users] undefined symbol: DirectFunctionCall2 ?

2011-09-27 Thread Greg Allensworth
When trying to install PostGIS into a new database, or to upgrade it within an existing database, I am getting this error: ERROR: could not load library "/usr/lib/liblwgeom.so.1.3": /usr/lib/liblwgeom.so.1.3: undefined symbol: DirectFunctionCall2 Any ideas on what that error means? Google wa

[postgis-users] WKT Raster

2011-09-27 Thread Volkmar Herbst privat
Hi all, I have a question concerning the creation of a raster in a plr function. I create a empty raster and set the pixel values individually with update queries: for(i in 1:nrow(mat_p)) { for(j in 1:ncol(mat_p)) { pg.spi.exec(sprintf ("UPDATE nutrients.applications SET raster = ST_SetValu

Re: [postgis-users] What dimension number should be used when using AddGeometryColumn?

2011-09-27 Thread Sandro Santilli
On Tue, Sep 27, 2011 at 09:08:35AM -0600, Kenneth Xu wrote: > The PostGIS document says the dimension number can be 2, 3, 4. > 2 is for 2D like Point(x,y). > > If I want to create a table for pointm (x,y,m), what number should be used? > 2, or 3? > If I want to create a table for point (x,y,z),

[postgis-users] What dimension number should be used when using AddGeometryColumn?

2011-09-27 Thread Kenneth Xu
Hi, The PostGIS document says the dimension number can be 2, 3, 4. 2 is for 2D like Point(x,y). If I want to create a table for pointm (x,y,m), what number should be used? 2, or 3? If I want to create a table for point (x,y,z), what dimension number should be used? 3? Thanks, Kenneh Xu GIS

Re: [postgis-users] pgsql2shp

2011-09-27 Thread Mark Cave-Ayland
On 26/09/11 09:42, Raffaele Morelli wrote: Hi, I am working with R and using pgsql2shp to export shape files from pg. The shapes are created by pgsql2shp but when I try to import them in a R enviromnent I get this error Error in res[i, ] <- Map$Shapes[[i]]$verts : replacement has length zero