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

learn more… | top users | synonyms

1
vote
1answer
32 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 ...
0
votes
2answers
26 views

shp2pgsql: how to know the schema.table?

I want to import a shapefile using shp2pgsql. I am using Mac with Postgis 2.2. Based on this reference: A conversion and upload can be done all in one step using a UNIX pipe: shp2pgsql -s ...
1
vote
2answers
23 views

Counting points within range using CartoDB?

I have a dataset of users location and want to assign per user how many other users they have within a given range, and updating this value into a table.The dataset name is "users_20160410" and the ...
0
votes
1answer
1k views

How do I explode a MultiLineString using ST_Dump() in PostGIS?

I want to do what this blog post does: explode a MultiLineString into individual LineStrings. I'm using CartoDB but don't get individual LineStrings as the result of my query. I still get a ...
1
vote
1answer
52 views

PostGIS ST_Intersects GeometryCollection

If i'm not terribly mistaken, ST_Intersects does not support GeometryCollection. ERROR: Relate Operation called with a LWGEOMCOLLECTION type. This is unsupported. HINT: Change argument 2: ...
0
votes
2answers
649 views

Drawing curved lines in CartoDB?

I am experimenting drawing curved line from Origin to Destination in Cartodb. I was able to do so once, however, failed the second and third time. Could anyone offer me some insights into the ...
3
votes
1answer
44 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
1answer
3k views

How to write a point-in-polygon query for Postgis?

I'm trying to write a query in Postgis which will return all rows where a dynamically changing longitude/latitude point resides within the geometric polygon of that row (in the geom column). This is ...
0
votes
0answers
21 views

Handling empty PostGIS geometries with GeoServers Pregeneralized Features extension

I've setup my GeoServer instance (2.8.2) with the Pregeneralized Features extension to serve several large polygon layers from PostGIS (9.3), and while it is working I am still experiencing remarkably ...
3
votes
1answer
31 views

How to quickly load two distinct areas into postGIS without using --append flag?

I have two distinct / non-overlapping areas that I wish to load into a postGIS database. The trouble is that once one area is loaded, it becomes painfully slow to load the second area using the ...
4
votes
2answers
393 views

How to get the regional maximum or minimum of raster data by using PostGIS?

If I have Mean sea surface pressure data in raster format, is it possible for PostGIS to look for regional maximum or minimum? So that I can locate the L or H as the chart shown below? (image source: ...
3
votes
1answer
187 views

PostGIS is not seeing any GDAL drivers

I've tried setting POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL as an environment variable. As well as running SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; from psql. -- (With a pg_ctl restart after ...
3
votes
1answer
61 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
1answer
23 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 ...
0
votes
0answers
13 views

multigtfs and pgr_createTopology

Could anyone know how to create a Topology on imported GTFS data into PostGIS with multigtfs? In fact, pgr_createTopology needs the edge_table or network table. Here are tables obtained after the ...
2
votes
1answer
38 views

postGIS SQL request with aggregating ST_Union()

I have a postGIS table that looks like this : id | value | geometry(MultiPolygon) 1 10 ... 1 20 ... 1 30 ... 2 10 ... 2 20 ... 2 30 ...
1
vote
0answers
33 views

How to calculate a Label Point for a (multi)polygon [duplicate]

ESRI software has a concept of a 'label point' for a (multi)polygon. It is like the centroid, except it is guaranteed to be within the (multi)polygon. Like for a U-shaped polygon, the label point is ...
1
vote
2answers
576 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
3
votes
2answers
38 views

Polygon another location

Using google maps I have located 4 points and have created a polygon with them in this way insert into dummy_zip values (4,'prueba_directa','2016-04-13 ...
2
votes
1answer
26 views

Is there a way to avoid the re-calculation of the same centroid without creating a new column?

All tables contain polygon geometries. SELECT * FROM table1, table2, table3, table4 WHERE st_contains(table2.geom, st_centroid(table1.geom)) AND st_contains(table3.geom, ...
5
votes
1answer
145 views

Adding new nodes in the middle of each líne of a Polygon

I am currently working on a Street Lighting Network. I have two layers in PostGIS ( PostGIS 2.1.3 and PostgreSQL 9.3.5): Manholes (56.000 Polygon) Pipes (Linestring) The manholes are perfect ...
2
votes
1answer
59 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
votes
0answers
44 views

Implementing spatial autocorrelation (global and local moran's) using PostGIS?

Has anyone tried to count global and local moran's index for polygons inside PostGIS database, with defined neighborhood relations as queens? Is it even possible? I could use R, but my goal was to ...
3
votes
1answer
1k views

PostGIS intersection function

I have a problem with intersection function. I built my query following http://manual.linfiniti.com/en/postgis/geometry.html, 5.7 section. I made my clip object, a red linestring frame: But after ...
2
votes
1answer
655 views

Delete duplicate geometry in postgis tables

After - I dont know what happend - all my entry's in my postgis tables are doubled! I tryed that to delete them but it does not delete any/all duplicates: DELETE FROM planet_osm_point WHERE ...
1
vote
1answer
33 views

Clustering markers using quadtree

I have a POSTGIS database with geography points and i want to cluster the points using quad-tree . I have a map where i have to display the markers clustered or non clustered depending on the zoom ...
1
vote
1answer
407 views

PostGIS ST_MapAlgebra Assistance

I would like to perform the equivalent of the below ArcGIS raster calculator equation in PostGIS using the ST_MapAlgebra function and return it as a tif using ST_AsTIFF. Con(("Sol_gain_clipped.tif" ...
1
vote
1answer
36 views

PostGIS clipping raster with the same color band as the original raster

I am trying to clip a raster so that the clipped raster would have the same minimum and maximum values for the color band as the original raster. For example if i clip the raster with this command: ...
0
votes
1answer
28 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 ...
0
votes
1answer
29 views

PostGIS 2.1 ST_EstimatedExtent returns error

In absence of statistics (empty table or no ANALYZE called) the function ST_EstimatedExtent(schema,table,geom_column) should return NULL (PostGIS 2.1). In my case, the function returns FEHLER: ...
-3
votes
0answers
10 views

How R read and get data from PostGis tables? [duplicate]

I have not more details to add, I need to receive a reply to question above if it is possible
0
votes
0answers
54 views

Tile server and postgis db with OpenSeaMap data, how to render icons?

I am trying to build a tile server in a windows machine with the OpenSeaMap data. I set up my postgresql database and populated with the world.osm data (OpenSeaMap data) and the water polygons. I ...
1
vote
1answer
133 views

What's the benefit of heterogeneous geometry column in PostGIS? [closed]

I read that in PostGIS, one can have different types of geometry, say, POINT and LINESTRING?? in the same column/field of a table. I have used ESRI products a lot where each table can only contain ...
3
votes
0answers
43 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 ...
1
vote
1answer
43 views

PostGIS: how to merge contiguous features sharing same attributes values?

I have a big postgis table storing line features. I woud like to merge features that are both connected to eachother and have given attribute values identical. Here is below an example of what I'd ...
1
vote
1answer
185 views

Error when trying to visualize geography data with QGIS

I use PostGis, and want to use QGIS to visualize data. But I get error message when trying to show the points in the table. I create a table: CREATE TABLE poi ( id text NOT NULL, coord ...
0
votes
2answers
266 views

PostGIS pgr_dijkstra function does not find node that appears in ways table

I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths ...
4
votes
1answer
590 views

Using PostGIS for a large trajectory dataset

I have a spatial trajectory dataset which basically contains about 10E6 (lat,lon,time)-tuples, grouped together by an identifier so they form trajectories. Currently, SQLite is used to store the raw ...
7
votes
2answers
162 views

Drawing line between points at specific distance in PostGIS?

I have a data of points along the streets, I would like to turn those dots into simple coloured lines. Any pointers what this problem may be called or any algorithms that can help me solve this? I ...
0
votes
0answers
27 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
117 views

OpenLayers - possible to display detailed GIS data?

I have an OpenLayers app to plot point features, but need to read in a very detailed multipolygon vector layer to plot an accurate location. I'm currently loading the polygon layer via TinyOWS. I've ...
0
votes
1answer
516 views

TinyOWS failing to connect to postgresql - Ident authentication failed for user “postgres”

I'm getting the above error on a new and local TinyOWS installation on Centos 6. Postgresql 9.2, PostGIS 2.0. I can connect to PostGreSQL locally and from my LAN using several other methods (psql, ...
1
vote
1answer
190 views

OpenLayers WFS no FID being passed from TinyOWS

I have a webapp - OpenLayers<->tinyows<->postgis. With 1 layer I have a problem. On localhost all works well - here is a snip of the XML I get back: <gml:featureMember> <tows:trad ...
2
votes
1answer
166 views

ST_Within for TIN or 3D objct in PostGIS

I would like to query if a point is located in the TIN object. My TIN object is closed (convex hull) object (i.e. surface of a round object). I tried to use ST_Within, but the error message returns ...
1
vote
1answer
45 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
1answer
60 views

How can i convert the coordinates (latitude,longitude) to X,Y using postgis

I want know how i can convert the latitude and the longitude coordinates of a rectangle in the Cartesian coordinates, so I can store them in a geometry field using postgis.
3
votes
1answer
53 views

OSM roads polygonized in PostGIS = nonsense

I have a dump of OSM data in my city and wrote a query to polygonize it. In the first attempt, the result looked like this: The problem was that OSM lines were not split and I guessed that the ...
2
votes
0answers
42 views

QGIS : How to calculate centroid on polygons with holes

I try to compute the centroid of polygons with holes on qgis. I did not manage to do it directly, I had to make a conversion to convex hulls before extraction. I crashed my pgsql server trying to ...
2
votes
3answers
1k views

Configuring SFCGAL to PostGIS Db

I was using PostgreSQL with PostGIS and Pgrouting. Recently I needed to install SFCGAL for some extra functions for my PostGIS db. After installing SFCGAL, now I don't know how to update my PostGIS db ...
2
votes
1answer
1k views

Problem in importing raster data from PostGIS to Geoserver

I am using Opengeo Suite 3.0.2, PostGIS 2.0.3 and PostgreSQl 9.2. I am trying to import raster data from PostGIS to Geoserver but facing an error. I follow this tutorial link to import the raster ...