Tag Info

New answers tagged


You can actually hold two geometry objects in the same row of a table that have different CRS. Again, not actively encouraged, but possible. e.g. CREATE TABLE foo ( id bigint NOT NULL, geo geometry(POINT, 4326), geom geometry(POINT, 27700) ); CREATE INDEX foo_geo_gix ON foo USING GIST (geo); CREATE INDEX foo_geom_gix ON foo USING GIST (geom); ...


I was also having strange issues using ST_SummaryStats with ST_Clip. Querying the data differently told me the min value of my raster was 32, and then max 300, yet ST_SummaryStats was returning -32700 for the pixel values in my target polygon. I ended up hacking around the issue as so: WITH first AS ( SELECT id, (ST_Intersection(geom, rast)).val FROM ...


A single-vertex line is an invalid geometry. It is essentially a point geometry. A line-offset cannot be determined for a line with only one vertex. Try eliminate invalid geometries with a filter on ST_IsValid: SELECT ST_OffsetCurve(t.geom, 3) FROM the_table AS t WHERE ST_IsValid(t.geom);


I have created tests to see what is faster: Selecting data from (1) band in (N) band raster - 240 ms Selecting data from (1) band in (1) band raster - 70 ms (Full results: PostGIS raster and bands tests)

Top 50 recent answers are included