[pgrouting-users] problems with pgr_pointsAsPolygon

I have a collection of x,y points and I am trying to draw a bounding polygon. I was unhappy with the default returned, so I decided to a play with the alpha parameter.

I get no result and the value ‘NOTICE: n = 1’

printed on the console,
My sql is

pgr_pointsAsPolygon('select id,st_x(st_startpoint(the_geom)) as x, st_y(st_startpoint(the_geom)) as y from tmp where label=27,5.0);
select pgr_version() returns psql (10.5 (Ubuntu 10.5-1.pgdg16.04+1))
The machine is running postgres 10.5-1

Is there anything wrong with what I am doing? Using an alpha value of 0 does not generate an error.

regards

Dave.

Hi Dave,

You are talking about a function who’s code has not being “revised”

Currently it use’s CGAL alphashape
Actually we want to move it to GEOS (then to postGIS) because it has to do more with geometries than with graph algorithms, and we can remove CGAL dependency on pgRouting.
But while we still have it:
Please open an issue, in the issue, post the smallest data possible (can be a link to a zipped file) where we can reproduce the problem.
Also what happens if you set alpha exactly to 1?

I have this kinda blog in form of an issue: https://github.com/cvvergara/pgrouting/issues/57

Regards VIcky

···
Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44, 
81739 München, Germany

Vicky Vergara
Operations Research

eMail: vicky@[georepublic.de](http://georepublic.de)
Web: [https://georepublic.info](https://georepublic.info)

Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9

Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl

Hi Dave,

There was a blog post I wrote long time ago, but after some improvements to the pgr_pointsAsPolygon function, when it supported a custom value for “alpha”:
https://georepublic.info/en/blog/2017/catchment-area-calculation-with-pgrouting/

I don’t remember details anymore, just that I wrote that post and the result was quite OK.
It seems I got more detailed boundaries, when the alpha value was pretty small like “0.00001”.
Have you tried such a small number?

Best regards,
Daniel

···

Georepublic UG & Georepublic Japan
eMail: daniel.kastl@georepublic.de
Web: https://georepublic.info