[postgis-users] Fixing badly noded Multilinestrings

Sandro Santilli strk at keybit.net
Wed May 25 01:26:54 PDT 2011


On Wed, May 25, 2011 at 02:49:08PM +1200, Peter wrote:
> If i use st_snaptogrid to fix badly noded lines (ie some lines that are 
> meant to end exactly where another starts, dont) surely this will fail in 
> rare cases, either side of the cut off point, eg:
> 
> select
>    st_astext(
>      st_snaptogrid(  st_geomfromtext('MULTILINESTRING((0 0,100.49 
>      200),(100.51 200, 300 300))'),1    )
>   )
>   
> -- gives MULTILINESTRING((0 0,100 200),(101 200,300 300))
> 
> Is there a way around this?

You may try ST_Snap, available with PostGIS dev version (upcoming 2.0.0)
when built against GEOS-3.3.0 (rc2 released yesterday).

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html



More information about the postgis-users mailing list