PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
19 views

Maximum likelihood Between 2 linestrings in Postgre?

I created a lot of linestring datasets and loaded them all in PostgreSQL, I want to compare said linestrings 2 by 2 using a maximum likelihood Query which would give me a coefficient proportional to ...
0
votes
0answers
24 views

Postgis load raster to DB running on AWS RDS with raster2pgsql

I want to perform very common task: I have Postgresql + Postgis running on Amazon Web Service cloud, using RDS service. I have there some vector layers and can execute SQL (Postgis) commands via ...
3
votes
1answer
71 views

How to use a polygon as a reverse cookie cutter on features in a Postgresql database

I want to be able to use a polygon in a database to remove all features and parts of features that falls within the polygon. Not as part of a query transferring the database to another database. I ...
1
vote
0answers
54 views

One way Replica deleted feature not synchronizing when I synchronize

I have created one-way replicas from 50 geodatabases to one geodatabase (Arcsde. With PostgSQL 9.2) After that, I update my feature class in parent geodatabase, but when I synchronize the replica the ...
1
vote
1answer
108 views

Postgres/PostGIS calculate area of Polygon in Square Miles

Polygon in Postgres/PostGIS database. It has the spatial reference 4269 which is in degrees. I know there is a ST_Area() to calculate it. this is my query to select the areas in the SRID units. ...
1
vote
1answer
45 views

Postgres st_intersection points/polygon

I am trying to use the ST_Intersection function to intersect points by county and find the counts by county, but I am having no luck. SELECT counties.name, FROM counties INNER JOIN routes ON ...
1
vote
1answer
38 views

Postgres/postgis st_makepoint

I am looping through a csv, taking latlng values and trying to add there geometry to postgis enabled postgres table. xy values are int's conn = psycopg2.connect("connected") cur = conn.cursor() cur....
1
vote
1answer
68 views

Making selections from two tables based on the reference table in PostgreSQL/Postgis

Based on the address locations ad for the region of interest (as a reference), I am trying to make selections from two street layers street1 and street2. What I have tried is shown by the code below: ...
0
votes
1answer
80 views

Python to Postgres insert Geometry syntax

Having trouble creating geom columns and inserting geometry lat lng values into postgres table Is my syntax correct in creating the point geometry fields? st_makepoint is the point constructor. ...
1
vote
0answers
25 views

Missing vector features when import from .sqlite to postgis?

I imported vector data from a .sqlite file to PostGIS but not all of my vector features imported. I haven't been able to determine a reason for most of the loss of features between the databases (...
0
votes
0answers
22 views

Not able to edit PostGIS SDE featureclass in ArcGIS Standard

I have created an Enterprise geodatabase in PostgreSQL and now uploading OS MasterMap data using QGIS OS Translator Tool. The feature classes created are not editable, however if I create a blank ...
0
votes
1answer
30 views

lwgeom_to_geojson: 'PolyhedralSurface' geometry type not supported

I am using PostGIS (PostGIS 2.2.0 with SFCGAL extension) and I have data in postgres which is loaded using citygml2psql tool and it contains polyhedralSurface geometry. But when i run query : ...
3
votes
1answer
94 views

How to loop in PostGIS to add the next lat long to a route

I want to loop over the results of a query and then pass row(n)'s longitude, latitude and row(n+1)'s longitude and latitude to another function. I have a query which returns a set of coordinates from ...
0
votes
2answers
33 views

Proper handling in PostgreSQL/PostGIS only after many queries?

I am trying to analyze GPS data of a parade on a fixed route with a certain variance due to the urban surrounding (canyoning). I'd like to project the GPS waypoints to the nearest points on the route ...
1
vote
0answers
34 views

Swapping start and end points of line (i.e. direction) of LineString in PostGIS?

I know that postgis has the function to find the start and end point of a line. Is there a function that can swap the start point and end point? (Note: I do not mean literally changing the co-...
0
votes
0answers
30 views

Problem to input a .osm file in a Postgres database with Osmosis

I have a problem with import a *.osm file to postgres/postgis database. I hope someone can help me? Ich have done the following things. install Postgresql/Postgis and pgAdmin III -> works fine ...
1
vote
0answers
85 views

importing shapefile in postgres

I am trying to import a shapefile to my database in postgres but there is no shapefile loader appearing in the plugin menu in PgAdmin. Postgis is definitely installed as I have added it as an ...
0
votes
3answers
122 views

How can i use WFS in Openlayers 3 with mapserver and PostGis?

I didn't find a documentation to display features ( vectors ) combining MapServer ( mapfile ) and PostgreSQL/PostGIS and OpenLayers 3 ?
3
votes
1answer
65 views

Are calculated fields available in any database that Qgis can use

I'm trying to find a data storage method that can handle up-datable calculated fields (such as population density=population/area). I want to be able to alter the population as the data changes (like ...
1
vote
1answer
49 views

How can rewrite this query for using with commonly used lat-long values

I have this query to get the nearest road vertices from a bus stop point. Ho can a re-write this query to pass commonly used lat-long values like in google maps instead of 715127 957625 SELECT * ...
3
votes
1answer
97 views

PostGIS - Linestring doesn't contain a Point - Problem

I have a problem to check if a Linestring contains a Point. I consider the straight line y = 0.1 x , and take by it a segment l='Linestring( 0 0 , 4 0.4 )' and a Point p on segment l, p = 'Point(1.5 ...
4
votes
1answer
78 views

Why QGIS WFS doesn't update PostGIS line and polygon layers?

I installed PostgreSQL and PostGIS and created PostGIS layers in GeoServer. But when i want to change geometry in QGIS via WFS it drops an error: ": Error performing insert: java.lang.String cannot ...
1
vote
1answer
25 views

How to get the geometry of all tables in a postgresql database?

How can I return all tables geom?
1
vote
1answer
63 views

PostGIS ST_Difference function returns wrong geometry in result

I have a strange st_difference behaviour. I’ve got two overlapping lines (each one has two points), but st_difference result is complete geometry of the first line. The code to reproduce is here: ...
0
votes
1answer
35 views

Draw Map using JTS API And PostgreSQL database

I use PostgreSQL for storing data. I want to create map based on it using JTS. I want to create geometry object from list of rows. Such geometry object to used as draw polygon,point etc.
1
vote
1answer
36 views

GeoServer - layer is read only (it already has a primary key)

I created a simple table in my Postgres\PostGIS DB. I then created the GeoServer layer with the SQL: select * from tablename I'm trying a WFS Transaction, like I usually do (and it works on similar ...
2
votes
0answers
24 views

Using PostgreSQL stored procedure with GeoServer?

I was wondering if it is possible to call PostgreSQL stored functions from GeoServer? I tried to use GeoServer's WPS to do map algebra, but found that the operations it offered was somewhat limited ...
1
vote
1answer
72 views

Postgis spatial join performance (point on area)

I need to update a single attribute of a large table of point data with a result of a spatial join (point on area operation) on a polygon table. I'm using the below query but wondering if this is the ...
1
vote
0answers
20 views

Linestring segment completition?

I just extracted some river paths from some old maps I acquired a few weeks ago, they seem accurate enough and will be very interesting to put against my theoretical mapping calculated by using the ...
1
vote
1answer
55 views

Complex QGIS Relations

I need QGIS to display combo boxes when editing for certain fields in a table, very similar to the functionality provided by the Relations properties in the project settings. It seems this is ...
2
votes
0answers
43 views

QGIS, connect to postgresql using windows login credentials

How to connect QGIS to PostgreSQL/PostGIS using the Windows user login credentials (Windows / Active Directory / LDAP). Is it possible? Can anyone tell me how?
3
votes
0answers
33 views

Export multiple Layer Definition Files (qlr)

I have a postgresql database with approximately 400 tables. I need to generate Layer definition files (qlr) in QGIS for each individual table. Making this manually would take huge amount of time, so I ...
0
votes
2answers
121 views

Unable to connect PostgreSQL 9.5 from QGIS 2.14.1

I created new database called "shashi" in PgAdmin III. In QGIS to create new connection I entered following details. In PostgreSQL 9.5 pgAdmin lll Please enter password for user postgres on server ...
2
votes
1answer
59 views

Can I set up a PostGIS store/connection in GeoServer without user password for database?

When creating a PostGIS store in GeoServer, the guidelines I saw ask us to fill in database connection parameters including: host, port, database, schema, username, and password. This is a bit ...
1
vote
0answers
28 views

Request long/lat precision and request too slow [closed]

I've a PostGIS DB of 18Gb. The tab node (id, tags, geom) is very huge and I need to request long/lat on this table but it's very long when I'm using this sql request : SELECT * FROM nodes WHERE geom ...
3
votes
0answers
28 views

PostGIS - ST_SetValues is slow

I have large data in my C++ program (up to 3000x3000). I have connection to PSQL with PostGIS. Now I need to store my raster data (greyscale images) in DB raster. I am using ST_SetValues for this and ...
2
votes
0answers
40 views

Use array[] datatype in qgis from postgresql

I'm just a beginner in GIS, so I'll be glad to see any comment here. I have tables in PostgreSQL which I've connected to QGIS. There are columns in tables with datatype array[]. But it's not easy for ...
1
vote
1answer
33 views

How to append OS MasterMap Feature Class to the Feature class in PostgreSQL database

I have my Enterprise Geodatabase as PostgreSQL. I want to keep OS MasterMap data on the Geodatabase and would like to update it whenever a new tile is downloaded. However, I am struggling to find a ...
1
vote
0answers
55 views

Is it necessary to use hibernate-spatial for postgis?

I'm beginner in GIS. I have a database in PostgreSQL that contains a table location, that table contains a column with type point. I have to get points and display it on google map. Once I did the ...
3
votes
2answers
86 views

Ogr2ogr is rounding numeric field from PostgreSQL to 6 decimals

I am using ogr2ogr to convert the data from PostgreSQL to GeoJSON. PostgreSQL contains field named shape.area, type numeric, which stores values up to 17 decimal places, like 0.15627328781960101. The ...
3
votes
1answer
41 views

How to update OSM data using osm2pgsql?

I have already loaded osm data into postgresql earlier. Now I want to update the database. I have downloaded the pbf file from geofabrik. How I can update the database without deleting the existing ...
1
vote
1answer
53 views

St_ClosestPoint within St_MakeLine Query problem

I am currently trying to create the closest point (closest_ports_point_test) on the grid (lng_grid_test) from the original points (ports_point), and to create the line connecting the original and the ...
2
votes
1answer
33 views

PostgreSQL 9.4.7: PostGIS 2.2.1 via Stackbuilder Checksum issue

When installing PostGIS via Stackbuilder (3.1.1) I get an error: "checksum verification failed for: postgis_2_2_pg94.exe! deleting file..." I've neither seen this in previous installations nor found ...
0
votes
0answers
35 views

How to replace a part of OSM data in postgres?

i want to replace the apart of osm data in postgrs database. for example ,replace the osm data of china which in planet osm data. i hava used osm2pgsql, but if use osm2pgsql import the china data ,...
6
votes
1answer
115 views

Leveraging capabilities of PostGIS for large (ish) tables in PostgreSQL?

I am using PostgreSQL and PostGIS to do some exploratory analysis and eventually spatial analysis. I have a table with 40M+ points (geolocated tweets) in the United States that has a spatial index. I ...
1
vote
0answers
29 views

How to write postgres source in virtual layer in Qgis 2.1x

In Qgis 2.14, I am trying to create a connection with my postgres database using virtual layer. But in the virtual layer window, how should I write the parameters in source field ? I can't find any ...
2
votes
1answer
22 views

Extracting the geometry of the parts not intersecting from 2 shapes overlapping each other in postgresql?

This seems simple enough, yet i do not find a clear awnser on that peculiar matter. What i am trying to do is to extract the parts of a shape that doesn't intersect with another when the 2 of them are ...
1
vote
0answers
46 views

Is spat the correct flag to use in my ogr2ogr command?

I have an ogr2ogr command that I'm using to convert part of a Postgres database to a Geojson. I ingested all of Canada in my database and to start, I want to grab all of the buildings in the Toronto ...
0
votes
1answer
48 views

Using pgRouting through PostgreSQL

I followed the guideline from this tutorial to use pgrouting through PostgreSQL but I can't understand the first instruction: CREATE OR REPLACE VIEW road_ext AS SELECT *, st_startpoint(the_geom), ...
-3
votes
2answers
123 views

Postgres error: fatal role “username” does not exist [closed]

I by mistake installed PostgreSQL twice, uninstalled one, and now I am trying to create a new PostGIS connection in QGIS but receive the following error when testing the connection: fatal role "...