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

Chris English sglish at hotmail.com
Mon Nov 21 13:00:47 PST 2011






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_parcels (6874 rows) . The roads table generally conforms to the layout of electric distribution.I then extracted a centroids table from parcels to try to develop the 'final drop' line segment, the last bit of wire fromdistribution wire (roads) to a home or business with the final goal to then join to final drop to roads for end to end distribution.

explain create table summit_final_drop asselect Distinct ST_ShortestLine(r.intersection_geom, m.geom) as final_drop_geom,r.sld_name,r.measured_l,m.pams_pin,m.mun,m.block,m.lot,m.qcodefrom summit_roads as r,summit_parcels_centroid as m;
This code resulted in 2,109,000 rows , essentially centroid to every line point as against whatI was expecting.
Suggestions appreciated.
Thanks,Chris
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20111121/581dfce0/attachment.html>


More information about the postgis-users mailing list