Open arneman opened 4 years ago
Additional context Despite the circumstance that we upgraded to pg12 & pgrouting3 only because of the new (easily usable) pgr_alphaShape function: Does this bug only affect Driving_Distance, or is pgr_alphaShape used in other pgr functions, too?
pgr_alphaShape
is a geometry function, it should not be in pgRouting, it should be in PostGIS.
Good to know that pgr_alphaShape
is easily usable.
A story about it:
pgr_alphaShape
& pgr_pointsAsPolygon
I agree was very confusing, because pgr_alphaShape
actually was the back-end function of pgr_pointsAsPolygon
if you think about it:
points as polygon could be: ST_ConvexHull
, ST_ConcaveHull
as they return a polygon if you give them points as input.
There is no Alpha Shape functionality on PostGis. So the original developer created both functions in pgRouting when creating the driving distance function.
It needs as dependency CGAL
pgr_alphaShape
We removed the CGAL dependency an created a code of our own thinking in the not near future: Move the function to PostGIS The use is like if it was PostGIS function (which is no graph related) So basically the new usage is as if you are using a postGIS function that it just happens to be in pgRouting like ST_ConcaveHull
On V2 was too tight on the result columns from pgr_drivingDistance
But what if ..
pgr_drivingDistance
pgr_drivingDistance
pgr_drivingDistance
pgr_kruskalBFS
pgr_primDFS
ST_ConvexHull
with the geometry of the edges of the result of pgr_kruskalBFS
Will have a look to this issue, next week, keep in touch
Any updates on this? Tks.
@andregracioso
PostGIS has the alpha shape now, https://postgis.net/docs/manual-dev/ST_AlphaShape.html So in version 4.0 of pgrouting pgr_AlphaShape will be deprecated.
Please use PostGIS alpha shape.
@andregracioso
PostGIS has the alpha shape now, https://postgis.net/docs/manual-dev/ST_AlphaShape.html So in version 4.0 of pgrouting pgr_AlphaShape will be deprecated.
Please use PostGIS alpha shape.
Please note that ST_AlphaShape is part of postgis_sfcgal which is not available on all distros.
Better to use ST_ConcaveHull, which was redone recently. If you are using GEOS 3.11, it's much faster than old ST_ConcaveHull.
As a side note, I got that error too. But only seems to happen if I don't pass in an alpha.
Describe the bug pgr_alphaShape sometimes fails with this exception:
We had this very weird situation: Buidling an alphashape for 149 points succeeded, but it fails if we build the alphashape with 148 of the 149 points.
To Reproduce Insert the points in sample_data.sql and execute the two sql commands at the bottom of the file to see the problem.
Expected behavior A valid (alpha shape) hull
Sample Data sample_data.zip
Specifications (please complete the following information): SELECT version(); PostgreSQL 12.3 (Debian 12.3-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
SELECT postgis_full_version(); POSTGIS="3.0.1 ec2a9aa" [EXTENSION] PGSQL="120" GEOS="3.7.1-CAPI-1.11.1 27a5e771" PROJ="Rel. 5.2.0, September 15th, 2018" GDAL="GDAL 2.4.0, released 2018/12/14" LIBXML="2.9.4" LIBJSON="0.12.1" LIBPROTOBUF="1.3.1" WAGYU="0.4.3 (Internal)" TOPOLOGY RASTER
SELECT pgr_version(); 3.0.2
Additional context Despite the circumstance that we upgraded to pg12 & pgrouting3 only because of the new (easily usable) pgr_alphaShape function: Does this bug only affect Driving_Distance, or is pgr_alphaShape used in other pgr functions, too?