Busy making things: tinycast, github, links, photos, @mc.

PostGIS: From Multilinestring to Linestring

Posted: March 4th, 2007 | Author: | Filed under: Projects | 8 Comments »

Continuing on with my PostGIS tinkering, I’ve been further exploring getting data in and out of PostGIS. After recompiling GEOS to get the C API working so that I could start working with the new features in PostGIS 1.2.1.

One of the problems I ran in to is that gpx2shp really likes to import data as a Multilinestring, while in the simplest case of a single-track GPX file, it should really be a Linestring. After searching a bit, I came across a mention of linemerge which can turn a Multilinestring such as MULTILINESTRING((-95.235071 38.971896,-95.235076 38.971906,-95.235015 38.971848)) in to a LINESTRING(-95.235071 38.971896,-95.235076 38.971906,-95.235015 38.971848), which seems like a saner way to work with single tracks.


8 Comments on “PostGIS: From Multilinestring to Linestring”

  1. 1 Darian Buhro said at 4:11 am on June 14th, 2007:

    This one makes sence “One’s first step in wisdom is to kuesstion everything – and one’s last is to come to terms with everything.”

  2. 2 generic propecia said at 9:43 pm on January 23rd, 2011:

    Bravo, what necessary words…, a remarkable idea

  3. 3 vyvoz stroitelnogo musora said at 12:05 pm on February 12th, 2011:

    vyvoz stroitelnogo musora spb…

    vyvoz musora…

  4. 4 tory-burch-slippers said at 3:59 am on February 14th, 2011:

    discount tory burch shoes…

    Saletoryubrchon.com provide good quality and best price for discount tory burch products, there offer tory burch boots,tory burch sandals,tory burch flats,tory burch handbangs sale, tory burch wallets for free shipping. …

  5. 5 tory-burch-flip-flops said at 4:09 am on February 14th, 2011:

    cheap tory burch shoes …

    Tory Burch flip flop online sale.For the younger working expat women,look at these tory burch Shoes.these tory burch flip flops are definitely fun,yet the glossy design and round-toe stay these lovely.These tory burch shoes with multiple.New arrivel To…

  6. 6 tory-burch-sandals said at 10:36 pm on February 14th, 2011:

    discount tory burch shoes…

    Saletoryubrchon.com provide good quality and best price for discount tory burch products, there offer tory burch boots,tory burch sandals,tory burch flats,tory burch handbangs sale, tory burch wallets for free shipping. …

  7. 7 tory-burch-slippers said at 10:45 pm on February 14th, 2011:

    cheap tory burch shoes …

    As the summer goes, winter comes.You should have some shoes in store. Based on this point, the cheap tory burch shoes Shoes is developing faster and faster. More and more people do online shopping.With so many shoes in it, now I advise you getting a …

  8. 8 Kids Tory Burch Flats said at 10:48 pm on February 14th, 2011:

    tory burch shoe sale …

    As the summer goes, winter comes.You should have some shoes in store. Based on this point, the Tory Burch sale Shoes is developing faster and faster. More and more people do online shopping.With so many shoes in it, now I advise you getting a pair of T…