Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] failed to create straightSkeleton

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] failed to create straightSkeleton


Chronological Thread 
  • From: Marcos Dione <>
  • To:
  • Subject: Re: [cgal-discuss] failed to create straightSkeleton
  • Date: Wed, 31 Aug 2016 16:21:02 +0200
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
  • Ironport-phdr: 9a23:1rQNgxRtl3Deq0m+BmhjHQuQ5dpsv+yvbD5Q0YIujvd0So/mwa64YRyN2/xhgRfzUJnB7Loc0qyN4vmmBTxLv8jJ8ChbNscdD1ld0YRetjdjKfbNMVf8Iv/uYn5yN+V5f3ghwUuGN1NIEt31fVzYry76xzcTHhLiKVg9fbytScbshsi6n9q/54fUK10RwmHsOPUufF7o802R7pBQ2to6bP5pi1PgmThhQ6xu32RmJFaezV7Xx/yb29pdyRlWoO8r7MVaUK/3LOwSRL1cCyk6YShuvJW4/UqLcQza7XQVViAakwFDHhPexBD8RJb49CXg5cRn3yzPGMTsRrcvERij6KFmAEvthCYAMTMR/3vKjs17yqVBr1SovUoskMbvfIiJOa8mLevmdtQASD8ZUw==

On Wed, Aug 31, 2016 at 09:57:05AM +0200, Sebastien Loriot (GeometryFactory)
wrote:
> Right, I had a issue with my path.
> I checked again and the polygon is valid.
> However, I could call create_interior_straight_skeleton and
> create_exterior_straight_skeleton_2 with no error.
>
> I looked at the sfcgal code to use the exact same calls they were doing
> and I had no issue.
>
> You can try it yourself:
>
> https://gist.github.com/sloriot/29b613a7180f43ec01827fe70d095dca

Here's what I get on my end:

In [1]: import shapely.wkt

In [2]: s= open('121897178.wkt').read()

In [3]: sh= shapely.wkt.loads(s)

In [4]: import psycopg2

In [7]: conn= psycopg2.connect(dbname='gis')

In [8]: import centerlines

In [10]: centerlines.skeleton_medials_from_postgis (conn, sh)
---------------------------------------------------------------------------
InternalError Traceback (most recent call last)
<ipython-input-10-d5ff10333f12> in <module>()
----> 1 centerlines.skeleton_medials_from_postgis (conn, sh)

/home/mdione/src/projects/osm/osm-centerlines/centerlines/__init__.py in
skeleton_medials_from_postgis(connection, way)
122 cursor= connection.cursor ()
123 cursor.execute ("SELECT ST_StraightSkeleton(%s),
ST_ApproximateMedialAxis(%s);",
--> 124 (way, way))
125 skel, medials= [ decode (i) for i in (cursor.fetchone ()) ]
126

InternalError: CGAL failed to create straightSkeleton

I'll try to figure out where this is comming from. Thanks for you
time so far. Cheers,

-- Marcos.

--
PS: centerlines.skeleton_medials_from_postgis() is this Python function:
https://github.com/StyXman/osm-centerlines/blob/master/centerlines/__init__.py#L117

--
(Not so) Random fortune:
Terrorism isn't a crime against people or property. It's a crime against
our minds, using the death of innocents and destruction of property to
make us fearful.
-- Bruce Schneier



Archive powered by MHonArc 2.6.18.

Top of Page