PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

1
vote
1answer
36 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
votes
0answers
16 views

How to update polylines coordinates in postgis after editing the polylines in Leaflet

I have a leaflet map in wich I can draw polylines and edit them. Each time I’m creating a new polyline, I send my coordinates to postgis using a php script. When editing my polyline layer, I would ...
9
votes
0answers
29 views

Best-practices for databases and APIs with geographic data spanning the antimeridian

What is the best-practice for storing geographic features (lines, polygons and their multipart equivalents) when these features span the antimeridian (±180° longitude), and need to be sent to and ...
1
vote
1answer
172 views

shape file into DataSet in postGIS using openJUMP, but getting error

I am new to this field and I want to save my shape file into DataSet in postGIS using openJUMP, but I'm getting an error...can anybody tell me solution for this?
1
vote
1answer
19 views

PostGIS query to get a list of points

I have a PostGIS road network layer (all features are linestrings) which I am accessing in Python and would like to get the geometry for each feature as a list of points. Something like ...
2
votes
1answer
36 views

Styling a heat map based on point attribute, not density

I have a point dataset generated from getting the centroid points from a fishnet/polygon grid. I combined these points using a spatial join to give them an attribute of 'pressure' which is an integer ...
1
vote
1answer
30 views

Updating table setting a case with ST_Intersection

I'm trying to update a geometry column using this command: UPDATE mad SET geom_p=CASE WHEN ST_CoveredBy(mad.geom,b.geom) THEN mad.geom ELSE ST_Multi(ST_Intersection(mad.geom,b.geom)) END AS ...
0
votes
1answer
31 views

Why do I get a 503 error when pushing data to the CartoDB SQL API

I'm using ogr2ogr to push a large (200,000 feature) dataset to the CartoDB API. I'm using where_clauses to upload 500 features at a time, and sleeping every 20,000 features for a minute to give the ...
2
votes
0answers
13 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 ...
0
votes
0answers
31 views

SRID and lat long values

I am using the following query to generate the lat long values SELECT NAME, ST_X(ST_Centroid(ST_Transform(geom, 4326))) as longitude, ST_Y(ST_Centroid(ST_Transform(geom, 4326)))as latitude from ...
0
votes
0answers
19 views

Converting polylines coordinates stored in PostGIS in column type text, in another column type geometry(MultiLineString,2154)?

I want to draw a polyline on a leaflet map and then send it to PostGis with php. I’m drawing my polylines using the Leaflet draw plugin and send the coordinates in a column “coords” in PostGIS with ...
1
vote
2answers
25 views

Saving array of objects in PostGIS field?

It is possible in PostGIS to save an array of objects in a field? (timestamps) For example, a spatial table with the fields: "name", "timestamps" and "the_geom" would look like in json as: ...
1
vote
0answers
30 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 ...
1
vote
1answer
34 views

Seeking C++ api to read/write PostGIS?

I need read/write geometry object from PostGIS. Is there C++ library to do this?
2
votes
0answers
27 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?
2
votes
1answer
31 views

For Loop Maximum Minimum Distance Between Two Lines

I have a table of line/lane ids in a table called matched_lanes, and I am trying to create a lateral query that on each id in the table to find the maximumum minimum distance between each point. ...
1
vote
1answer
46 views

Optimizing PostGIS k-nearest neighbour function for large amount of polygons?

I created a function for identifying the K nearest neighbours for every municipality, which works fine, but when I use this function for a large amount of municipalities (over 2900) it takes over 2 ...
8
votes
1answer
260 views

Calculate mean value of polygon from raster in PostGIS

I started with a NetCDF .gri and .grd raster file of the UK provided by a colleague. I clipped it in R to be only London, exported and converted to a ASC file, and then imported it to PostGIS using ...
-4
votes
0answers
14 views

how update data WFS in geoserver by leaflet [on hold]

I would like to modify the data that is in a database postgis that is shared in geoserver i work with WFS and geojson and leaflet .
3
votes
3answers
225 views

How to find accurate latitudes and longitudes data for cities? [on hold]

I want to put the coordinates of cities in a spatial db and then find cities from a given city at some given distance. I am hoping these functions would be readily available in a spatial db like ...
1
vote
0answers
16 views

How to batch create GeoServer stores for each user?

I have unix system with a number of regular users, each with his/her own database in PostGIS. I need to create a PostGIS store for each user. I know how to do this in the web interface. Is it ...
3
votes
3answers
34 views

What is the easiest way to avoid shapefile columns being imported as PostGIS `numeric(p,s)` data type?

Considering the number of shapefiles I've imported to PostGIS (using shp2pgsql or ogr2ogr), I'm a little surprised I haven't come across this before. But I have a shapefile that has numeric columns ...
1
vote
1answer
18 views

Getting data from postgis with hibernate is returning an hash instead of the rows

Is the first time that i use spring and hibernate starting from the basics, i need to get geometries from a postgis table populated with Qgis. I generate a persistence mapping of the table with ...
2
votes
1answer
33 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 ...
3
votes
1answer
326 views

Conflicts while installing postgresql9.3-postgis2.1,QGIS and gdal-bin

I want to use postgresql9.3-postgis2.1 and gdal-bin parallel . I have refer instruction here for installing postgresql-9.3 on ubuntu 12.04. I have install qgis from here While installing gdal-bin it ...
2
votes
1answer
2k views

How to install PostGIS and pgrouting on Windows if Stack Builder fails to connect?

I know this has probably been covered and that there are plenty of guides out there, but for the life of me I cannot get pgrouting installed. All guides/how-tos are different or assume prior ...
6
votes
0answers
89 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 ...
4
votes
1answer
241 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
1
vote
0answers
27 views

Request long/lat precision and request too slow [on hold]

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
20 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 ...
1
vote
1answer
36 views

PostGIS - syntax error inserting GeoJSON

I am trying to insert a GeoJSON into PostGIS, but I am encountering a syntax error. I can't seem to see where the problem is - I'm sure it is an easy issue to resolve, but my inexperienced eyes can't ...
1
vote
1answer
21 views

Why can't PHP insert new geometry on PostGIS?

(Copied this question from stackoverflow, since it may have more answers here.) I'm using ogr2ogr to upload a GPX file to PostGIS. When I do it on command line (Ubuntu 14.04), it works fine. ...
4
votes
1answer
270 views

Building a ol3 web application with dynamic content and user registration

My set-up: Currently I’m using a PostGIS database, with a GeoServer service and displaying the data with OpenLayers 3. I use WFS data to display the features in clusters and I’m able to edit them ...
-1
votes
0answers
24 views

Most representative spatial queries [on hold]

I would like to do few tests of different spatial databases and compare response times for different types of queries. There are some studies available but they often do not present the selection of ...
-7
votes
0answers
46 views

how to minimize the time for the execution of the request? [on hold]

hello i'm tired with this query, and i would minimize the time for execution of this request, so how to minimize the time for the execution of the request (13 million MS and not yet)!! update troncon ...
0
votes
0answers
11 views

WMS Layers from Azure Geoserver not loading with multiple users

I am loading multiple WMS layers into a leaflet web application from an Azure virtual machine Geoserver that pulls data from a PostGIS database on the same machine. The layers load through quickly ...
3
votes
1answer
50 views

Make TileStache cache faster

I am serving vector tiles using TileStache, I have everything set up like I want. My data is stored in Postgres and I am using the VecTiles provider to serve GeoJSON tiles. I want to cache all my ...
1
vote
2answers
227 views

Utilizing OSM Data in a Postgres/PostGIS database in ArcMap

I've been trying for over a week now, and I'm not sure what i'm doing wrong and I haven't found the answer yet. I am trying to display and symbolize the OSM dataset over Jordan in ArcGIS for Desktop ...
1
vote
0answers
26 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 ...
1
vote
1answer
22 views

Storing GML Polygon in PostGIS 2, ERROR: unknown spatial reference system

I am receiving GML as part of a larger XML message. When I receive the XML it is unmarshalled to Java objects. I have no rights to alter the schemas or the generated Java code. Therefore, I later have ...
1
vote
1answer
190 views

How to update the OSM data in a PGRouting Database built with osm2pgrouting?

I'm using a PGRouting database originally built with osm2pgrouting from a *.osm file downloaded from Mapzen. If I want to update the OSM data in that database, ie. re-build my PGRouting Database, ...
1
vote
2answers
47 views

Calculate area parts of polygon intersections

I have a problem of calculating area sizes of intersected polygons in postgis. I would represent the problem in an example (please see the picture). I have a gridsquare table with some attributes like ...
21
votes
6answers
5k views

PostGIS: Select features that do NOT intersect

This seems to me like such a simple question (and it probably is) yet I cannot seem to find an example that gives me the answer. Using PostGIS, I just want to select points that fall outside of ...
2
votes
4answers
288 views
1
vote
1answer
26 views

Finding locations within a radius of a given path [duplicate]

I am trying to figure out in Postgis the right sql statement for the following: I have in my database a table of merchants with latitudes and longitudes; I have a route from google that lists a lot ...
11
votes
5answers
3k views

Simplifying polygons to linestring

I would like to simplify some polygons that represent rivers into linestrings. I assume that holes in polygons can be omitted. Anybody has some good idea how to simply do it? It would be nice, if it ...
7
votes
2answers
3k views

SQL query to have a complete geojson feature from PostGIS

I would like to get a geojson feature with properties from PostGIS. I have found an example to have a feature collection but I can't make it works for just a feature. so far I tryed to modify the ...
1
vote
1answer
31 views

Area of influence with CartoDB

I am working on a city transport map, and for fun (and practice) I try to make an area of influence of transport station. But, whatever I try, something gets wrong. So two questions. 1 - How can I ...
1
vote
1answer
29 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 ...
3
votes
1answer
31 views

How to use ORDER BY GROUP BY & LIMIT

How do I use ORDER BY, GROUP BY & LIMIT in the following query through column name KPH? SELECT * FROM data WHERE ST_Within( ST_Transform(geom, 2163), ST_Buffer( ST_Transform( ...