Hi Everyone, I've only now woken up to the fact that this thread is not on the Shapely support list at all, but on python-gis-sig where it is off- topic. Let's continue on the Shapely list. Apologies,
Sean On Aug 20, 12:54 am, Ludovic Granjon <[email protected]> wrote: > Hello Sean > I extract a line from my shapefile in wkb : > > LINESTRING (798143.4698356552980840 2169244.2676589516922832, > 787556.8340599430957809 2137003.1496147373691201, 786594.4126257874304429 > 2109574.1387413009069860, 793812.5733819549204782 2080701.4957166314125061, > 796699.8376844218000770 2063859.1206189072690904, 799587.1019868887960911 > 2026324.6846868367865682, 804399.2091576671227813 2002264.1488329453859478, > 801030.7341381222940981 1983496.9308669101446867, 797181.0484014996327460 > 1968579.3986374973319471, 797181.0484014996327460 1957511.5521447071805596, > 794774.9948161104694009 1936819.4913103606086224, 795737.4162502661347389 > 1919014.6947784810326993, 801030.7341381222940981 1902172.3196807571221143, > 809692.5270455232821405 1884367.5231488773133606, 821722.7949724688660353 > 1854051.2479729740880430, 833271.8521823368500918 1842502.1907631063368171, > 839046.3807872707257047 1839614.9264606393408030, 839046.3807872707257047 > 1839614.9264606393408030, 844820.9093922047177330 1843464.6121972620021552) > > I also give you my shapefile. > > Thank you for your help > > Ludovic > > 2010/8/17 Sean Gillies <[email protected]> > > > Hi Ludovic, > > > Can you extract a line from a shapefile and export it to WKT or > > encoded WKB for me? If so, I'll be happy to run your script. > > > Cheers, > > > 2010/8/12 Ludovic Granjon <[email protected]>: > > > Hello Sean > > > Thank you for your help > > > > I join my script at this message. > > > There's different function : > > > - cut2line2 that cut the line every x distance > > > - openShapeLine2 that open a shapefile > > > - decoupage that call openShapeLine2 and cut2line2 > > > - creationShape that save the result as a shapefile > > > > - test is the main script, you just have to run it. It take in input the > > > shapefile line that we want to cut, the shapefile line result and the > > > distance to cut. > > > > Thanks > > > > Ludovic >
