[postgis-devel] Description of EWKB

Frédérick Sauvage frederick.sauvage at gmail.com
Tue Jun 12 01:03:27 PDT 2007


Hello,

I used some "printf" for help me in my development.

I have a group of road's segments. Each segment is a Multiline. I need to
create a polygon for each segment (from the point number I (xA,yA) to the
point number J (xB,yB)).
I create the polygon MyPolygon from the 1st 2 points of the segment, the 4
points of this polygon are (xAlpha,yAlpha) (xBeta,yBeta) (xGamma,yGamma)
(xDelta,yDelta). I calculate the 4 points of the polygon from the 2nd 2
point of the segment, I create a polygon MyPolygon which is the result of
GeomUnion between a polygon (with this 4 new points) and MyPolygon, ...

Pente = slop
maRequete = MyRequest

I have no problem for the first segments but I have a problem for this
segment and I don't understand why.

"i=1 j=2 nbPoints=11

xA=3.070467 yA=50.299797 xB=3.070475 yB=50.299816

pente=2.285714

xAlpha=3.061306 yAlpha=50.303806 xBeta=3.079628 yBeta=50.295788 xGamma=
3.079637 yGamma=50.295807 xDelta=3.061314 yDelta=50.303825

i=2 j=3 nbPoints=11

xA=3.070475 yA=50.299816 xB=3.070484 yB=50.299835

pente=2.105263

xAlpha=3.061443 yAlpha=50.304108 xBeta=3.079508 yBeta=50.295525 xGamma=
3.079517 yGamma=50.295544 xDelta=3.061452 yDelta=50.304127

i=3 j=4 nbPoints=11

xA=3.070484 yA=50.299835 xB=3.070498 yB=50.299850

pente=1.163636

xAlpha=3.062900 yAlpha=50.306355 xBeta=3.078068 yBeta=50.293316 xGamma=
3.078082 yGamma=50.293331 xDelta=3.062913 yDelta=50.306370

i=4 j=5 nbPoints=11

xA=3.070498 yA=50.299850 xB=3.070515 yB=50.299866

pente=0.888889

xAlpha=3.063854 yAlpha=50.307323 xBeta=3.077141 yBeta=50.292377 xGamma=
3.077158 yGamma=50.292393 xDelta=3.063871 yDelta=50.307339

i=5 j=6 nbPoints=11

xA=3.070515 yA=50.299866 xB=3.070545 yB=50.299889

pente=0.761905

xAlpha=3.064454 yAlpha=50.307819 xBeta=3.076575 yBeta=50.291912 xGamma=
3.076605 yGamma=50.291935 xDelta=3.064484 yDelta=50.307842

i=6 j=7 nbPoints=11

xA=3.070545 yA=50.299889 xB=3.070575 yB=50.299911

pente=0.761905

xAlpha=3.064484 yAlpha=50.307842 xBeta=3.076605 yBeta=50.291935 xGamma=
3.076635 yGamma=50.291958 xDelta=3.064514 yDelta=50.307865

NOTICE:  TopologyException: no outgoing dirEdge found (3.07069,50.2997,
50.2997)
SELECT failed: ERROR:  GEOS union() threw an error!


maRequete= select GeomUnion(GeomFromText('POLYGON((3.064484 50.307842,
3.076605 50.291935, 3.076635 50.291958, 3.064514 50.307865, 3.064484
50.307842
))'),'0103000000010000002500000095110D8268900840EB857D1B6226494065C5707500840840310BED9C6627494010ECF82F10840840E92ADD5D67274940D50500ADAC9008401B01558F5E2649407C596AA5A1910840009E184957264940946934B918A30840C576F700DD25494061C43E0114A308404E469561DC2549409835197DDF920840A415E5D84D264940EACE13CFD9A20840B743C362D4254940B7291E17D5A20840401361C3D3254940D33D81149A910840DFD35BBF562649401DED01CEC49008407EA0AE945C264940E5DD596BD490084014FACF4C5B2649400C40A374E99F084095F3C5DE8B254940BCE9961DE29F08405FB2F1608B254940BFECCD3EF39008404D568AC55826494003D29BEA16910840A34B88D85526494086FF7403059E0840274A42226D2549402672C119FC9D0840228D0A9C6C254940D784792179910840BE4344CA4D2649403EAE0D15E39C084065C746205E2549409487855AD39C0840ADA7565F5D2549406BC4EAB8CA900840067E390D5A2649408C04149994900840B84E57DB5D264940F4AFABFC92900840BBA67FF15D2649407C6308008E7D08400F2A711DE3264940A94BC631927D0840865AD3BCE3264940FC77D7715C900840394FFC2D60264940878BDCD3D57D0840DA39CD02ED264940BA30D28BDA7D0840516A2FA2ED26494055886B97599008400DD8ED0661264940E25817B7D1800840A9FB00A4362749402CF2EB87D8800840DE3CD521372749402D8F4D0160900840CBDCE48D6126494012C0CDE2C582084080272D5C56274940724D81CCCE82084086E464E25627494095110D8268900840EB857D1B62264940')
"

I hope you understand me :/

Your faithfully,
   Fred

2007/6/11, Thomas Marti <thx.79 at schweiz.org>:
>
> Hello PostGIS devs
>
> Is there somewhere a complete and binding description of the EWKB/T
> formats used
> in PostGIS? Including all the fancy new curve stuff, etc.
>
>
> Thanks and bye..
>   Thomas
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>



-- 


SAUVAGE Frédéric

Telephone :
+336 32 45 21 55
+333 27 46 75 05
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20070612/951d0e07/attachment.html>


More information about the postgis-devel mailing list