I calculate a 500m Isochrones with pgr_drivingDistance and after that use pgr_pointsAsPolygon to create the Isochrones out of the resulting nodes.
SELECT * FROM pgr_pointsAsPolygon('SELECT id,x,y FROM Calc_nodes')
Sadly in some case the Dijkstra algorithm create holes in the resulting poylgons. I know the reason for this is the nature of the network and how the algorithm works.
I just need function to check if there are holes and then get rid of them. Any suggestions?
Answer
Try
SELECT ST_MakePolygon(ST_ExteriorRing()) AS geom
FROM
to process all polygons, or
SELECT CASE
WHEN ST_NRings() > 1
THEN ST_MakePolygon(ST_ExteriorRing())
ELSE
END AS geom
FROM
to only process those with an interior ring.
No comments:
Post a Comment