Side Channel

  • home
  • resources
Home › Blogs › angch's blog

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password

Navigation

  • Books
  • Feed aggregator

Recent blog posts

  • Ubuntu mirrors up and improved!
  • Google-jstemplate: Iterate object with unknown properties
  • nginx https proxypass for php apps
  • sugarcrm & memcache: Doing it Wrong
  • subversion and https in Ubuntu Karmic
  • Drupal: Views block delta converted to md5 hash
  • Ubuntu Server install requires PAE
  • Installing Drupal from command line
  • Drupal: Handling form field weight through CCK
  • minify javascript using Google Closure Compiler
more

angch's location

angch twitter

  • angch: Heading to Brunei. Business class for a change.
  • angch: tc qdisc htb activated on the mirror, and mirror reactivated. Hope nothing melts now.
  • angch: Hmmm, tbf doesn't work as advertised. htb does. #qos #linux
  • angch: @yoonkit me thinks #lucid is a much better tag than #lynx
  • angch: Great, you broke the dc's net and they disconnected us. Running to tpm from shah alam
more

Postgis recipe: Extracting MULTILINESTRING into LINESTRING

angch's picture

angch — Wed, 30/09/2009 - 12:35

insert into linestringtable (the_geom, col1, col2, col3)
  select st_geometryn(the_geom,n), col1, col2, col3
    from
      multilinestringtable,
      generate_series(1, (select max(NumGeometries(the_geom)) from multilinestringtable)) n
    where st_geometryn(the_geom,n) is not null
      and GeometryType(st_geometryn(the_geom,n)) ='LINESTRING';

Not horribly efficient, but gets the job done.

  • postgis
  • recipe
  • angch's blog
  • Add new comment


Creative Commons License

  • home
  • resources

Standard Disclaimer.