PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

1
vote
0answers
40 views

pgRouting “Can't find Table”

I am using pgRouting version 2.1.0. I am using pgAdmin III. I have created a street network using Anita Graser's guide: https://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ But ...
1
vote
1answer
42 views

Getting node information of a way in OSM2PGSQL data

I have a feeling this is not possible, but I am looking to get information on the nodes which are part of a line in the planet_osm_line table. The issue which I am trying to handle is I am trying to ...
0
votes
1answer
26 views

saving results of ST_offsetcurve to new table with geometry and fields from original data table

I am trying to create lines parallel to some road centerlines, using distances from the attribute table specific to each line. I'm trying to figure out how to get it to save to a new table with ...
1
vote
1answer
24 views

Geoserver getfeatureinfo returns big number with exponential format

I have a Geoserver layer, which contains numbers on a million scale in one of the attributes. If I query these features, I get back a number in this format: 4.1E7 instead of this: 410000000 Is there ...
1
vote
0answers
31 views

Python GDAL open dataset in PostGIS with quotations

Error trying to use gdal to open a dataset in PostGIS with the following code: ds = gdal.Open("PG: dbname=nyc host=localhost user=postgres password=mypassword port=5432 mode=2 schema=public column=...
1
vote
0answers
25 views

Applying values to highest terminal segments in channel network using PostgreSQL?

I extracted a channel network from a dem but due to some technical difficulties the layer had some discontinuities. So after filling them, i suddenly realised that the Strahler orders it gave me were ...
1
vote
0answers
50 views

PostGIS Svg Projection on Google Map

Context I have a database with spatial data such as areas and points. Some of the areas in my db are coming from OpenStreetMaps, representing some regions. (Which are kinda small at earth's scale, ...
1
vote
1answer
48 views

Find the convex hull around a set of polygons?

I'm using Postgres 9.4 with PostGIS 2.1. I have a table with the following columns: Column | Type --------------+------------------------ ogc_fid | integer ...
1
vote
0answers
23 views

Converting .shp to wkb after v.clean

I've been trying to get to through this by reading manuals, but I can't seem to understand what I'm doing. I have source data with overlaps that exist in a table with associated WKBs(SRID 4326). I ...
3
votes
1answer
70 views

Big datasets in QGIS

I'm working with large PostGIS tables in QGIS but really only need to do simple visualization and editing the attributes (like change road names, speed limits, etc). The most processing I need to do ...
0
votes
2answers
47 views

Not able to create postgres Sql file using Osm2po

I am newbie to the GIS community. After downloading the osm2po jar file, I have run following the instructions from underdark tutorial. Also, from Carsten's answer in gis stack exchange, I have ...
3
votes
1answer
81 views

ogr2ogr: encoding issues when importing from Oracle Spatial to PostGIS

I'm trying to import some spatial tables from Oracle Spatial to PostGIS using ogr2ogr, but I can't figure out why the special characters on the attribute tables get messed up while I'm doing it. My ...
1
vote
2answers
44 views

How to save several Layers in QGIS as shapfile in one step

I have a huge QGIS (using 2.12.3-Lyon) project with several layers stored in a SQL database. Now I need this layers as Esri shapefiles. It is possible to right click one of the layers, click on "Save ...
2
votes
1answer
152 views

How to use ST_ClusterWithin with geography data type and measurement units?

I want to clustering locations use ST_ClusterWithin function: geometry[] ST_ClusterWithin(geometry set g, float8 distance); My table has column location of geography(Point,4326) type and I don't ...
1
vote
1answer
67 views

postgis not valid win 32 application

I'm trying to setup Postgres 9.5 on my local machine x64 based win 8. I've downloaded postgresql-9.5.1-1-windows.exe and also downloaded postgis-bundle-pg95x64-setup-2.2.2-1.exe Postgres runs fine, ...
3
votes
0answers
59 views

Interpolating point to nearest polygons to compute street width in posgis

I am trying to calculate the width of streets (line.shp) in postgis using reference point (ref_point.shp) (yellow point features) and building polygons (building.shp). The red point features are the ...
0
votes
1answer
58 views

Issues with raster data on postgresql / error:Attempting to get pixel value with out of range raster coordinates

So here is the issue, i am trying to extract values from a big raster divided in 200 or so tiles and applying them to a selection. The points are startpoints, endpoints and midpoints from vector items,...
0
votes
0answers
35 views

How cut multilinestring by 2 points on postgis?

I know how cut linestring by 2 points, easy: ST_LineLocatePoint,ST_LineSubstring. But i have unmerged multilinestring, few lines are not connect?
1
vote
1answer
65 views

Postgre/PostGIS - How to find points inside an area

I have a database of clients/users with their coordinates. I would like to select all clients within the marked area. Query: SELECT * FROM clients INNER JOIN polygons ON polygons.polygon @> ...
0
votes
0answers
37 views

Insert shapefile drawn features into PostgreSQL

Sorry my question is repeated, unfortunately i didn't get the proper solution for the problem. I have a LeafLetjs map on which I draw features like: points, polygons, markers, lines etc and I am ...
1
vote
1answer
38 views

How to check point intersection with bbox made from two points?

I have two points which represents lower left and upper right point of BBOX. I have one point which SHOULD be somewhere inside and I want to test it. I have all of them as 'geometry(POINT, 4326)' ...
0
votes
0answers
64 views

How can I add the PostGIS extension?

I'm experiencing difficulties when trying to add the PostGIS extension to PostgreSQL. I wasn't able to add the extension during the installation because of an error. Now I'm trying to add the ...
1
vote
1answer
26 views

Identify groups of stacked geometries in PostGIS

I need to create a column in my PostGIS table with values identifying different groups of stacked/duplicate geometries, such that one group of stacked geometries might get a value of 1, another group ...
1
vote
2answers
53 views

Conditional “On the Fly” Column with PostGIS

I have two tables I am working with; tl_2015_us_county which consists of county polygons, and tl_2015_48_puma10 which consists of PUMA polygons. I am currently using the below SQL in order to achieve ...
1
vote
1answer
80 views

LeafLetjs: GeoJSON invalid object error

I am getting GeoJSON data from postgresql, but it seems to be invalid. How can I validate it? After getting GeoJSON format data I want to put on map for projection. I am using LeafLet, java EE, ...
1
vote
1answer
83 views

Creating polygons (squares) from point using PostGIS?

I want to create a regular grid of polygons/squares from this point knowing that between two successive points 100 meters, so each square would have 100*100 m2 in its area.
1
vote
0answers
80 views

Cursor help on large spatial query in PostgreSQL

I have two very large tables on which I want to perform a spatial query. UPDATE table_a SET att_1 = b.att_1, att_2 = b.att_2 FROM table_a AS a JOIN table_b AS b ON ...
1
vote
1answer
79 views

Change SRID of geometry column

I have in my table column geom with geometry, data type of this column is geometry(Point,102067). I want to change SRID from 102067 to 5514, but if I use this command select UpdateGeometrySRID('...
7
votes
1answer
2k views

Could not load library “C:\…\ rtpostgis-2.2.dll”

I've installed PostgreSQL with Postgis (tried both version 9.4 and 9.5 ) on a remote desktop running Windows 7 64bit. However, when I executed this SQL command: "CREATE EXTENSION postgis" (on ...
2
votes
0answers
78 views

Insert shapefile draw features into PostgreSQL database using java EE (pragmatically)

I am working with PostgreSQL 9.4 and Java EE i want to insert shapefile or layer's features into PostgreSQL, is there any solution so i can insert the whole shapefile into database. OS Windows10. ...
0
votes
1answer
119 views

How to USE ST_difference AND ST_intersection in case of multipolygons ? (POSTGIS)

I try to use ST_difference and ST_intersection with two layers of multipolygons. I want something like: With the input on the left and the result on the right. MY DATA: t1.geom contains 1000 ...
1
vote
0answers
42 views

Is PostGIS / PostgreSQL UK Public Sector Network (PSN) compliant?

Is PostGIS / PostgreSQL UK Public Sector Network PSN compliant? ... specifically so it can be used in a UK local government council?
1
vote
1answer
70 views

Geometry type and create trigger for that in postgresql

I want to create a trigger (before inserting trigger), to check the geometry type weather it is point, polygon, line, or multi-polygon. After that, I want to set the color property. How can I do this ...
0
votes
1answer
82 views

How to use gdal_rasterize with postgis vector?

I'm trying to convert a multipolygon vector layer to a raster using the GDAL tool gdal_rasterize. The command I am using is: gdal_rasterize -b 1 -burn -9999 PG:"dbname=db password=password" \ ...
0
votes
1answer
38 views

Adding a column to polygon table with correct corresponding address

I have 2 shapefiles: one with polygons (buildings) and their properties other one is a point address shapefile - it contains points that are inside polygons from the other SHP, but it's still ...
2
votes
1answer
37 views

Why am I getting a syntax error at “RETURN result;” when creating a CartoDB pl/pgsql function?

Despite CartoDB appearing to run PostGIS 2.2 (see below), it still doesn't support multi-point geometries in ST_Split. SELECT postgis_full_version(); POSTGIS="2.2.0" GEOS="3.5.0-CAPI-1.9.0 r4084" ...
3
votes
2answers
92 views

Change case of Acronyms in PostGres

I have a table containing almost 1 million points (POIs). I want to change the case of all the acronyms in the display name column I have, currently I am identifying the acronyms as any 3 letter words ...
0
votes
1answer
47 views

SQLAlchemy Error on insert

I am trying to add a point with GeoAlchemy 2. However I am getting getting error on insert action saying ---sqlalchemy.exc.InternalError: (psycopg2.InternalError) parse error - invalid geometry HINT:...
0
votes
1answer
50 views

Converting files with ogr2ogr and dropping ALL attribute fields

I want to add a gpx file to a PostgreSQL/PostGIS table using ogr2ogr, but my table does not have any of the fields that are attributes of the GPX file. There are previous questions here dealing with ...
0
votes
1answer
32 views

Storing bounding box in database (mariaDB)?

Is there a bounding box type or a nearest equivalent for specifying a column the will store an extent (SE-NW) and how would I then query the database to find entries where a point exists within it? ...
-3
votes
1answer
50 views

ERROR: syntax error at or near “group” LINE 4: …E ST_DWithin [closed]

I'm writing an SQL query but I am getting a syntax error on the line with the GROUP BY. What can possibly be the problem? UPDATE intersection_points i SET nbr_victimes = sum(tue+bl+bg) FROM ...
2
votes
2answers
153 views

points within a polygon

Since I am a beginner to postgis I am facing problem with finding points within polygons from my table. This is my table structure Column | Type | -------------+------------...
2
votes
0answers
32 views

Can't delete postgis

geo2=# create extension postgis; ERROR: PostGIS is already installed in schema 'public', uninstall it first geo2=# create extension postgis_topology; ERROR: required extension "postgis" is not ...
6
votes
1answer
134 views

Direct Connection from Postgres to ArcGIS results to two feature classes per table

I'm using ArcMap (10.3.1) to connect to Postgres (9.4.5), which has Postgis version 2.2.0 installed. Create/Enable Enterprise Geodatabase wasn't used in this database. It's just a connection to the ...
0
votes
0answers
38 views

Calling cmd command from stored procedure in PostGIS

How to execute the command prompt from stored procedures in PostgreSQL. Below is cmd command to convert PostGIS data to image: PG:"host='<host>' port:'<port>' dbname='<dbname>' ...
0
votes
1answer
120 views

run command line shp2pgsql in c# function?

i'm developing an application web with asp.net/c# and i would in a button importing the shapefiles into postgis, and i'm trying with this code, this code i'm using it in cmd.exe in windows it imported ...
5
votes
1answer
82 views

What is the best way to merge lots of small adjacents polygons ? (POSTGIS)

I am looking for a way to merge lots of small adjacents polygons. I have this kind of features: So if my polygons are adjacents AND have the same color attribute then I want to merge those ...
4
votes
1answer
131 views

ST_Transform doesn't work in PostgreSQL

When i run the query with ST_Tranform I get this error: Input geometry has unknown (0) SRID SQL state: XX000 How can I resolve this error? I want to convert from UTM into geographic lat/lon. ...
1
vote
2answers
100 views

Simplify geometries but keep them contiguous

I have several detailed contiguous areas. I need to turn each one into KML, but when I do so, the end result is too large (in terms of memory). Using PostGIS I need to simplify these geometries but ...
2
votes
1answer
74 views

Update one table from another based on spatial join

In beginning i had two tables of points and i wanted create from one of this POINT table new table CIRCLES which will contain circle polygons 300 metres around points. This step i have done here: ...