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

learn more… | top users | synonyms

0
votes
0answers
5 views

Get points from linestring with extreme angles

I intend to remove points from a linestring with extreme angles like the image link 1. Get the points 2. Remove from linestring Thanks
1
vote
1answer
203 views

Displaying postgis database data

I'm a beginner in this field and tried to display the postgis database data in localhost.But i used select query in my code .so the table got displayed.I want to display the geographical points in a ...
0
votes
2answers
509 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
0
votes
0answers
7 views

I have two points in my geodjango models when serializing them using drf gis one of them gets renamed and the renamed one doesn't show in haystack?

class Space(TimeStampedModel): origin = models.PointField() destination = models.PointField() origin_address = models.CharField(max_length=255) destination_adress = ...
3
votes
0answers
14 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 ...
0
votes
0answers
13 views

How to pass time dimension to postgis DB layer WHERE clause in Geoserver?

I have successfully configured a layer with time dimension that is backed by an SQL query to a PostGIS DB. I can query it throug WMS, no problem so far, but I just can't find a way to pass the start ...
0
votes
0answers
16 views

Generating a route from an array of lat-long values in OpenLayers 3

I have developed a web application for bus tracking using GPS devices fitted on them. I am using MySQL to store and retrieve the lat-long values coming from the device. Also I have the route names and ...
1
vote
2answers
180 views

Instruction to import OSM file using PostGIS in windows

I want to import OSM data into a PostGIS database running under windows. After a web search I learned that I should use osmosis. But most of the explanations are for Linux. But I have to use windows. ...
2
votes
0answers
11 views

Issue loading PostGIS out-db rasters (either in QGIS or MapServer)

I'm playing with a few different options of storing raster data via PostGIS to visualize (eventually in a web app). The out-db or out-of-database storage seems the best option, but I can't seem to ...
1
vote
2answers
30 views

Saving array of objects in PostGIS field?

It is possible in PostGIS to save an array of objects in a field, and GeoServer able to read it? (timestamps) For example, a spatial table with the fields: "name", "timestamps" and "the_geom" would ...
2
votes
2answers
698 views

How to calculate area or centroid of the_geom in CartoDB?

Is it possible to calculate area or centroid of the_geom in cartoDB? It would not be a huge time saver, and I am doubtful that it is an option but figured I would ask.
1
vote
1answer
35 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: ...
1
vote
1answer
45 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
48 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
votes
0answers
29 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 ...
13
votes
1answer
97 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
47 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
1answer
173 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?
2
votes
1answer
27 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 ...
1
vote
1answer
31 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
16 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
21 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
1answer
39 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
30 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
32 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
49 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
267 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 ...
-5
votes
0answers
16 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
228 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
35 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
36 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
90 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 [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
23 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 [closed]

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? [closed]

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 ...
1
vote
0answers
14 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
52 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
29 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 ...