Re: [postgis-users] ST_ShortestLine(r.geom, m.geom) confusion - better limiting point to nearest line results

2011-11-21 Thread Phil James
Yes you will as it finds the shortest distance each time between points and lines, sorry - you need the inner query to give you the nearest neighbour and then generate the line between that and the point.  Have a quick search for "nearest neighbour postgis" for how to do this.  That should give

Re: [postgis-users] ST_ShortestLine(r.geom, m.geom) confusion - better limiting point to nearest line results

2011-11-21 Thread Chris English
Thanks Phil for your response. The below does greatly reduce number of rows created through theinner join.The "shortestlines' unfortunately seem to radiate from the center of town. create table summit_final_drop asselect ST_ShortestLine(nearestgeom.intersection_geom, b.geom) from summit

Re: [postgis-users] ST_ShortestLine(r.geom, m.geom) confusion - limiting point to nearest line results

2011-11-21 Thread Phil James
Hi Chris You need an inner query that selects the closest line segment and use that geometry in the shortest line query Select shrtest line(p.the_geom,nearestgeom.thegeom) from Points p, Select  a.*, st_distance(a.the_geom, b.the_geom) as dist from roads a,points b order by dist asc limit 1) as

[postgis-users] ST_ShortestLine(r.geom, m.geom) confusion - limiting point to nearest line results

2011-11-21 Thread Chris English
Hi all, My goal is to model electric distribution in a municipality with 8.4, PostGis 1.5 and pgrouting. I clipped roads and parcels from state level (roads) and county level (parcels) to get roads and parcels fora municipality resulting in two tables: summit_roads (306 rows) and summit_parc

[postgis-users] Topology improvements, testing, funding

2011-11-21 Thread Sandro Santilli
Good evening data modelers, this mail is to let you know that the topological support in the upcoming PostGIS 2.0 has been improved thanks to the input from an early tester, feeding topology constructor functions with pretty dirty data. The outcome of that experience is reported here: http://strk

Re: [postgis-users] st_union drops M values

2011-11-21 Thread Paul Ramsey
It's a "known issue". The GEOS library that is doing the Union operation only supports x/y/z, there is no room in its model for an m ordinate. Only idea would be a re-working of GEOS to support m, which is probably already ticketed, but unfunded. P. On Mon, Nov 21, 2011 at 2:53 AM, Lauri Kajan w

Re: [postgis-users] Workaround for "transform: couldn't project point" error?

2011-11-21 Thread Mark Cave-Ayland
On 18/11/11 03:19, Evan Martin wrote: I'm importing some data into a PostGIS DB. The points in the data come in various SRIDs, but I need to transform them all to 4326 to use the geography type. A simple ST_Transform() doesn't always work for this, because of the error in http://trac.osgeo.org/

Re: [postgis-users] ST_Mapalgebra

2011-11-21 Thread Bborie Park
On Mon, Nov 21, 2011 at 7:02 AM, Joan wrote: > Hello, > > When I run the following query > select ST_MapAlgebra(r1.rast, r2.rast, "rast1 + rast2") from (select > r1.rast, r2.rast from r1, r2) as foo limit 10; > I get this error > ERROR: column "rast + rast" does not exist > LINE 1: ...t * from (se

[postgis-users] ST_Mapalgebra

2011-11-21 Thread Joan
Hello, When I run the following query select ST_MapAlgebra(r1.rast, r2.rast, "rast1 + rast2") from (select r1.rast, r2.rast from r1, r2) as foo limit 10; I get this error ERROR: column "rast + rast" does not exist LINE 1: ...t * from (select ST_MapAlgebra(r1.rast, r2.rast, "rast + ra... ^ What

Re: [postgis-users] Hosting para postgis

2011-11-21 Thread Stephen V. Mather
I know GeoSolutions out of Italy has done some work in this arena. Not sure who else… . Best, Steve http://www.clemetparks.com/images/esig/cmp-ms-90x122.pngStephen Mather Geographic Information Systems (GIS) Manager (216) 635-3243 s...@clevelandmetroparks.com

[postgis-users] Copying database via template

2011-11-21 Thread Phil James
I teach a class using PostGIS and have successfully used templates as an efficient way of copying databases for each class member (ie. selecting a populated database as the template). However, in our new configuration this time around I have been getting error messages that the database is in u

[postgis-users] st_union drops M values

2011-11-21 Thread Lauri Kajan
Hi all, I aked this before but no answers. Does anybody have any ideas? I'm trying to make a union of geometries with M-values. But ST_Union seems to drop all the M-values. Or am I doing something wrong? Here is a sample query: select st_asewkt(st_union('LINESTRINGM(0 0 0, 1 1 1)'::geometry,'LI

Re: [postgis-users] min distance between two lines

2011-11-21 Thread Muhammad Imran
Hi Gaurav, In principle, st_distance(geom, geom) always returns minimum distance between two geoms and it should work for any geom type (line, polygon, point). Calculating minimum distance of a geom to more than one geoms is however tricky a bit. It has been quite a long time, I developed a sim

Re: [postgis-users] min distance between two lines

2011-11-21 Thread muhammad imran
Hi Gaurav, In principle, st_distance(geom, geom) always returns minimum distance between two geoms and it should work for any geom type (line, polygon, point). Calculating minimum distance of a geom to more than one geoms is however tricky a bit. It has been quite a long time, I developed a si