I have a table A with Id and Geometry And Temporary table B Each Geometry of Temporary table B has intersecting geometry in Table A. I want to find the intersecting geometry and make a union of the geometry. The final table should be id of Table A which is having intersection and the union of geometry. If the…
Tag: postgis
Getting error while tryng to add geometry (polygon z) to table
I’m trying to insert a row to postgres (postgis) table and getting error. My table (geo_table) properties: I’m trying to add data: I’m getting the following error: syntax error at or near “Z” …(name, geometry, in_use) VALUES (‘tb2’, POLYGON Z (( what is the erro…
Postgres – Geospatial Search in LINQ or SQL with PostGis
I am using PostGis to search for all points within a given range, relative to a given origin. I am looking at all the documentation provided by PostGis but can’t seem to figure out how would I come up …
Add column data to a table based on geometry intersection with another table – PostgreSQL
my city has defined some Urban Revitalization Perimeters using PostGIS I’ve separated the city Blocks within Perimeters and the Buildings within Perimeters. What I want to do now is to update the buildings table with two new columns, that relates them with the blocks they are on. The following is a samp…
Calculating bounding box from latitude and longitude pairs
Google returns the current lat and lon, but the lower left lat and lon and upper right lat and lon are calculated. I have not been able to figure out how it’s calculated. Does anyone know if it’s a static distance? a percentage difference? How is it calculated? Chicago, IL New York UPDATE: Knowing…
How extract jsonb column in fields by key
I’m using postgresql and postgis plugin. I have stored data with this scheme: table_id is primary key, properties is a jsonb and geom as geometry(GeometryZ,4326); If I make this request: select table_id, properties, geom from nametable return all info with table_id as integer, properties as jsonb and ge…
How to convert PostGIS polygon coords into lat and lng?
From a json API, I am fetching data of an area displayed as a polygon. An endpoint example can be found here: https://admin.udinaturen.dk/api/v1/facilityread/?format=json&subcategory=40&limit=1 Here is a preview of the polygon displayed on the platform I am fetching the data from: http://udinaturen.dk…
How to aggregate multiple points by two columns and create a LineString / MultiLineString out of them
I have a table called locations that has these rows: id uuid NOT NULL, “deviceId” text COLLATE pg_catalog.”default”, “userId” uuid, “userName” text COLLATE pg_catalog.”default”, “creationDateTime” …
Differences between PostgreSQL and MySQL for PHP developers
For a project where most queries on the database will include requirements like “within an polygon” I have come to think about choosing PostgreSQL with PostGIS instead of MySQL, which I have previously mainly used. Mainly because PostgreSQL has more GIS functions. However, I am uncertain how to ev…