Hot answers tagged

2

Are you sure you're not misreading something? SELECT ST_AsEWKT(st_transform(st_setsrid(st_makepoint(-79.3545864, 43.7094892), 4326), 26717)) "SRID=26717;POINT(632549.238889373 4840701.2020248)"


2

Try enforcing closed LineStrings by adding their ST_StartPoint to the end of the them: SELECT ST_MakePolygon( ST_MakeValid( ST_AddPoint( shape. ST_StartPoint( shape ) ) ) ) AS shape FROM asia_waterway_line WHERE waterway ='riverbank' ; If you want to make sure you are not duplicating points for when a LineString is already closed, run: SELECT ...


1

CREATE TABLE schema.polytable AS SELECT column1, column2, ST_AsText(ST_CONVEXHULL(ST_COLLECT(geomcolumn))) AS newgeomcolumn FROM schema.sourcetable GROUP BY column1, column2 As suggested by someone else, this works in this scenario.


1

You need to move the subquery outside of the function call: SELECT ST_AsText(ST_cart2spr(X,Y,Z)) FROM ( SELECT ST_x(geom) As X, ST_y(geom) As Y, ST_z(geom) As Z FROM ( SELECT (St_DumpPoints(geometry)).geom FROM surface_geometry JOIN building ON surface_geometry.id = building.id WHERE geometry IS NOT NULL AND cityobject_id = 95 ...


1

Setting a different target schema is currently not supported by osm2pgsql. See this GitHub issue for details: https://github.com/openstreetmap/osm2pgsql/issues/768


Only top voted, non community-wiki answers of a minimum length are eligible