4
votes
Accepted
Use ST_ApproximateMedialAxis with 3D geometries
So, looking at the source code for the ST_ApproximateMedialAxis and ST_StraightSkeleton indicates that both do in fact drop the z-axis, ie, they work, but ignore the z values.
However, there is a ...
4
votes
Postgis exact geometry from text
As of PostGIS 2.5, the geometry and geography types only support storage of double-precision floating point values. Any coordinates that you input to PostGIS are converted to the geometry type, and ...
3
votes
How does ST_ApproximateMedialAxis(geometry) calculate medial axis internally?
The PostGIS ST_ApproximateMedialAxis uses the SFCGAL approximateMedialAxis function (code here). This function computes the straight skeleton using CGAL. It then returns only skeleton edges which are ...
3
votes
PostGIS sfcgal ST_3DArea
The vertices given in 2) cannot be elements of the same 2-dimensional plane; i.e. vertex (0 1 1) cannot be contained in the plane defined by the other vertices. Simple POLYGON geometries (or faces), ...
2
votes
Can sfcgal be Installed on Amazon Web Services
You can install virtually the same set of software in AWS EC2 as that of your laptop. At least, this is the case for me with Ubuntu 16.04 LTS, in which sfcgal works out of the box with apt-get.
You ...
2
votes
ST_MakeSolid() creating an invalid solid from closed polyhedralsurfaceZ
The problem is in the ordering of your points. The front and the back of a face are determined by whether the points turn clock or counter-clockwise. Make sure you'r points all rotate the same ...
2
votes
ST_Tesselate on PolyhedralSurface is invalid : Polygon 0 is invalid: points don't lie in the same plane (and Is_Planar() only applies to polygons)
Based on user30184's answer and because Is_Planar apparently only applies to polygons, I came up with the following workaround using ST_Dump:
SELECT
ST_IsPlanar(geom(ST_Dump(
ST_GeomFromText(
...
2
votes
ST_Tesselate on PolyhedralSurface is invalid : Polygon 0 is invalid: points don't lie in the same plane (and Is_Planar() only applies to polygons)
I would have a try with ST_IsPlanar https://postgis.net/docs/ST_IsPlanar.html.
2
votes
Accepted
PostGIS SFCGAL ERROR: PolyhedralSurface is invalid : inconsistent orientation of PolyhedralSurface detected at edge 0 (0-1) of polygon 3
I guess this is the right way to defin the polyhedral surface:
SELECT ST_Tesselate(
ST_AsText(
'POLYHEDRALSURFACE Z (
((0 0 0, 1 1 1, 1 2 1, 0 0 0)),
((0 0 0, 1 ...
1
vote
3D centroid in PostGIS
I'm also posting here what I have found so far as an answer to keep things clearly separated.
So this is my current workaround, maybe other (future) people could have better/faster/more robust ...
1
vote
Accepted
ST_3DIntersects says 'no' despite geometries intersecting
It seems that the bug has been corrected. I had a try and got result true,truewith this PostGIS version:
POSTGIS="3.4.1 3.4.1" [EXTENSION] PGSQL="160" GEOS="3.12.1-CAPI-1.18.1&...
1
vote
sfcgal ST_Volume Issue
Not really an answer but a workaround:
Changing the TINZ prefix in the input data file to POLYHEDRALSURFACE Z
then works with:
ST_Volume(ST_MakeSolid(sd.design))
Maybe there are some polygons ...
1
vote
How to Fix Inconsistent Data Conversions in SFCGAL Expressions
The answer is to send the POLYGONZ text strings through ST_MakeSolid before performing any other operations on them. E.g.
SELECT ST_Volume(ST_3DDifference(stopeDesign,ST_3DIntersection(s1,s2)))
...
1
vote
How to Fix Inconsistent Data Conversions in SFCGAL Expressions
I am posting this as an answer, even though it is not a full answer, as it lacks a complete explanation of why what you are doing isn't working, but this approach does work (and because it is way too ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
sfcgal × 36postgis × 32
postgresql × 12
3d × 6
cgal × 5
tesselation × 3
polyhedralsurface × 3
polygon × 2
geometry × 2
extensions × 2
postgresql-14 × 2
qgis × 1
r × 1
openstreetmap × 1
geojson × 1
sql × 1
intersection × 1
shapely × 1
ubuntu × 1
spatial-database × 1
postgis-2.0 × 1
sf × 1
mac × 1
database × 1
windows × 1