[postgis-users] st_offsetcurve

Sandro Santilli strk at keybit.net
Tue Oct 8 00:47:59 PDT 2013


On Tue, Oct 08, 2013 at 03:31:03AM +0200, franco base wrote:
> Hi Sandro.
> I make some new test.
> 
> 1)
> geom:
> 
> "0105000020E6100000030000000102000000020000008D383A2989B031400D12B11E01574940D32053AD91B0314078F4C42CFA56494001020000000200000042083BBCAAD11440D2A4DA35902242409EBC431F7DD114404A364DAB92224240010200000002000000A09DDE2E93C0E93F3EEEA26A82FB4340A047C9708EB5E93F9DA27A8EC5FB4340"
> 
> a --- st_OffsetCurve (geom, 10)  -----crash

I don't see a crash here, but a usage error:

 ERROR:  ST_OffsetCurve only works with LineStrings

Passing each of the 3 component lines succeeds in giving results.

> geom:
> "0102000020BB0B00001A00000079D89E45F9293741F14C50AA6B325341C41A7C2A382A37410883317663325341CD3F67FF402A3741198673F763325341698C557E482A374172476380643253414A84B1BA512A3741762D8365643253417D7917BC562A3741D8F1FAC26332534111841142592A37413C31D018623253411358BE57582A3741855D0E3560325341763C915A532A37418D6096095F325341EDAF86C64B2A3741EED3886B5E3253412DBCEB1E452A3741B9BA27DC5E325341274EA43B3F2A3741B9EEA1BE60325341C41A7C2A382A3741088331766332534179D89E45F9293741F14C50AA6B3253411917A146EC293741334C8BCB6C325341D6F08A90DD293741ED4925AC6D3253419907FB3BD2293741C0334CF16C3253414A5E87FCC6293741CBCB6EAF6B325341F802DE62BA2937419947A8096C32534196A36267B2293741A27EAAC06C325341766972B9AB293741F1123A786F32534181CE3BB69E29374190823CFD71325341CC44D8A28C29374188D03924733253412FCB0BD1762937417E116A6773325341E7969309F52837410B84C6BA6F32534180CE3EC2E828374139D1E77F6F325341"
> 
> a --- st_OffsetCurve (geom, 10) -----crash

I get a result here:

0102000020BB0B00003B00000069F5CAE5FD2937411040BAE16D3253416BD9D286392A3741A621A11A663253418D3645823E2A37418C1F8C63663253410222AABF452A374160A1CEE76632534107A94255472A37412D6110FC663253413C669CF2482A37413230BAFF663253411D5EF82E522A37413616DAE466325341173D9346542A374162496AD06632534129FBFA40562A37411A8741A0663253415CF060425B2A37417C4BB9FD65325341CB1C14D25C2A37412BADCFBE653253417069BE2C5E2A374182A19C6E6532534131DE92465F2A3741A00BDB0F65325341B482F915602A37411AA9C4A564325341488DF39B622A37417EE899FB623253419C08652F632A3741AC63F965623253415A85802F632A3741C6A8DFCB613253415C592D45622A37410FD51DE85F3253411AE559E9612A3741CD74247B5F325341115E5A43612A37418F2FCC135F3253414B7F3558602A3741781836B55E32534157FF092F5F2A3741745E3F625E325341BAE3DC315A2A37417C61C7365D3253410E59FD71582A3741BEDCC0E25C3253414B2EC173562A3741F21615A95C325341C2A1B6DF4E2A3741538A070B5C325341E85DC2024D2A3741F6AC6FF05B325341E63B481A4B2A37412819FCEC5B32534141D11438492A37410C01CD005C32534181DD7990422A3741D7E76B715C32534114BC4F8C402A3741E42EFCA25C32534149BAC1BE3E2A374162D519EF5C3253415902583D3D2A3741EDD537525D3253415394105A372A3741ED09B2345F32534127F678D9362A37414BCABE615F325341870A9A36312A374138317B8C6132534108E89239302A374138277CAD6132534134D6B04BF52937411D46375D693253413D456477E929374108CE7A646A325341CD7E4BA8DD2937415258C5186B3253416E48D28BD5293741E04702936A32534181207611CB2937415FC92C6769325341FB80E964C92937411ACD424269325341E5FF09A5C7293741B820D23069325341F716E2DFC529374128BC663369325341A5BB3846B9293741F637A08D693253418F598603B7293741396C26AF693253412DFA0A08AF29374142A328666A32534184F99503AD2937415D7595A56A325341CA4AD644AB293741F65F3E006B32534131DA5DE2A9293741D9DB8E716B325341600AE795A4293741209255996D325341D2D5D728A42937419D6AB2C56D325341AE93C93A9A2937418CAFE7B16F325341E28231258B293741447F13A87032534162571B247729374155C5ACE57032534196A3A729F62837414F2FD73E6D3253417612D2C8F52837418955903C6D3253410F4A7D81E9283741B7A2B1016D325341


This is with:

 POSTGIS="2.1.1dev r11987" GEOS="3.4.0-CAPI-1.8.0 r3949" 

Actually, I can't even reproduce the originally reported issue.
Anyway, as I see you filed a ticket, let's move discussion there.

 http://trac.osgeo.org/postgis/ticket/2496

Thanks

--strk;

> 2013/10/4 Sandro Santilli <strk at keybit.net>
> 
> > On Fri, Oct 04, 2013 at 06:21:17PM +0200, franco base wrote:
> > > Hi Sandro,
> > > thank you for your answer,
> > > I'll upgrade my GEOS, but I work for a Public Administration and this
> > > process is slow.
> > >
> > > So I have Isolated the geometry wher St_OffsetCurve crash.
> > > There are two type of geometries:
> > >
> > > 1) Geometry with repeated points. I can solve the problem using:
> > >  St_OffsetCurve (ST_RemoveRepeatedPoints(geom), 10)
> > >
> > >
> > > 2) Geomtery with repeated points but non consequential (see the .jpg)
> > >
> > > The geometry is
> > >
> > "0102000020BB0B000013000000F49BB3FCAA3037413033606B9C3253412FD60B7D61303741EDE29F4E9B3253416842DD0745303741DD30E3C89A3253417776B8621830374149B42AE399325341EDC13D130430374122AE490A983253415FAF500FFC2F37410A84A0DD943253415500A09BFE2F3741D62BEB178532534166ECD670FF2F3741F01372E67A3253417713ABF605303741CE2AF9FC77325341BBA13CB0283037415C422E6F713253410B10133F2E303741256D85F770325341A024E9F33330374115D50563713253414B75A9D4363037419868B9B8723253410DFDE549353037415AF87C3177325341CAF46320303037411170B9E88F325341536848BF2F30374135F86EA19532534180088DD2363037417D62C985983253416842DD0745303741DD30E3C89A3253412FD60B7D61303741EDE29F4E9B325341"
> >
> > > You think that GEOS-3.3.9, or 3.4.2. solve this problem or this is a
> > "bug"
> > > of the St_OffsetCurve.
> >
> > I can tell you it's _not_ fixed in 3.4.2 :(
> > Could you file a ticket please ?
> > Add the RemoveRepeatedPoints trick, is useful!
> >
> > --strk;


More information about the postgis-users mailing list