Hot answers tagged

6

You need to alias your columns, effectively giving it a name, if they are the result of a function, or PostgreSQL will use the function name of the outermost function it uses to generate the column (values)! CREATE OR REPLACE VIEW _06_spildevand_vandloeb.drikkevandsledning_dissolve AS SELECT ROW_NUMBER() OVER() AS id, ST_Union(the_geom)::...


3

When the topology checker highlights a feature in red, it means that feature violates one of the rules. Since your only rule is "must not overlap," when a polygon is red it means that polygon overlaps with another polygon. It's up to you to find the exact place where it overlaps. I suggest using the Clip tool (from the Vector menu > Geoprocessing tools) ...


2

You can add new fields in the view definition: CREATE OR REPLACE VIEW v_roads as SELECT r1.id, r1.geometry, 1 as road_type, 'type1' as road_type2 FROM roads_1 r1 UNION ALL SELECT r2.id, r2.geometry, 2 as road_type, 'type2' as road_type2 FROM roads_2 r2 UNION ALL SELECT r3.id, r3.geometry, 3 as road_type, 'type3' as ...


2

Try to reinstall PostGIS by the following executable on this page : http://download.osgeo.org/postgis/windows/pg12/ The download will allow you to get the necessary dll files. When PgAdmin4 was released, when you installed PostGIS with StackBuilder, some files were missing. They updated the executable a few days later and the problem was solved.


2

If I get this right you should be using two JOINs on your <tableB>: SELECT ST_ConcaveHull(ST_Collect(a.geom, b.geom), <value_lower_than_1.0>[, TRUE | FALSE]) AS geom FROM <tableA> AS ref JOIN <tableB> AS a ON ref.<id1> = a.<id> JOIN <tableB> AS b ON ref.<id2> = b.<id> ; You may want an ...


2

Your problem is stated here: The geometry column in the table has no SRID set (Find_SRID for this table returns 0). As a result GeoServer considers this unprojected data (it's just numbers not a position) and can't reproject it. GeoServer only considers the SRS of the geometry column not the individual projection of the geometries (which PostGIS doesn't ...


1

In the Postgres DB, you can define the constraint to cascade the deletions: when you delete from table tray, it also deletes from tableB. This instruction should be set on the foreign table CREATE TABLE tableB ( id serial PRIMARY KEY, trayId integer REFERENCES tray (trayId) ON DELETE CASCADE ); Alternatively, you can do this yourself. Before ...


1

If you're able to alter the source data, that would be a good place to start. UPDATE konflikt.source_table SET roadstatus = 'Not mentioned' WHERE roadstatus = '' If that isn't possible, adding a CASE statement to the roadstatus column in the materialized view is another option: create materialized view konflikt.vejstatus_dissolve as select ...


1

First off: QGIS queries data within the canvas extent only; I doubt that you can get more performance than with this pre-selection on well-maintained (indexed) relations. However, if your users connect with their own credentials, you could work with a View that selects from your AOI table by matching session_user (System Information Functions); this assumes ...


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