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

learn more… | top users | synonyms

1
vote
1answer
40 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 ...
1
vote
0answers
29 views

Create geometry column of type 'PointZM' in PostGIS

I want to add a geometry column with geometry like "PointZM", "PolygonZM". I have written something like this: SELECT AddGeometryColumn ('data_rivne','geo_point','geom2',0,'POINTZM',0); But it ...
6
votes
0answers
126 views

How to compute the smallest network that connects all points using PostGIS?

I have a set of postgis scripts which generates two tables - one of a set of points and the second a set of roads which surround them. All data is in the same projection and both outputs are stored in ...
1
vote
1answer
20 views

Collecting multipolygons into a single multipolygon with ST_Collect() in PostGIS

I would like to collect 50,000 individual multipolygons into one big multipolygon. Unfortunately when I perform ST_Collect(geom) it bundles them into a geometry collection and cannot be cast as ...
6
votes
1answer
154 views

How to use ST_DelaunayTriangles to construct a Voronoi diagram?

With PostGIS 2.1+ we can use ST_DelaunayTriangles() to generate a Delaunay triangulation, that is a dual graph of its Voronoi diagram, and, in theory, they have an exact and reversible conversion. ...
1
vote
1answer
48 views

PostGIS query losing geometry column information

Using PostGIS I want to collect all attributes into one polygon. The old table looks like this: Column | Type ---------+------ xyz_cols | `xyz` geometry | geometry(MultipolgyonZ, 2193) Performing ...
1
vote
2answers
76 views

How to validate OpenLayers area calculation using PostGIS?

I am working on a GIS API that work on top of OpenLayers. I have a feature that calculates the area of a drawn polygon. I have tested it on the browser and the areas I got, appear to be correct. For ...
2
votes
2answers
47 views

Did I set up Tiger Geocoder incorrectly?

I set up Tiger Geocoder in PostGIS on my local box (PostGIS 2.1.3, PostgreSQL 9.3.5, Tiger 2013 data). The problem I'm running into is that on almost every street most of the points are clustered, ...
0
votes
0answers
41 views

R PostGIS convert SpatialPolygon to PostGIS table

I've been having some success in scraping some webdata and converting it from HTML to spatial data as originally asked here: Parse PHP/HTML to shapefile or similar I've been using R to both fetch the ...
3
votes
1answer
144 views

Extracting centerline of a Complex-Polygon in PostGIS/Python

Any idea how to extract the centerline of the following polygon (Fig1) using PostGIS functions or Python modules? I was trying Voronoi Function but thats not helpful for this kind of shape. I want ...
2
votes
0answers
67 views

N Nearest Neighbours efficiently PostGIS/Python

The data is worldwide about a million points, lat/lons, with an id and an importance value (0.0 to 1.0), and it's limited to being on land. Ideally I need to cluster all 1 million points into 100,000 ...
3
votes
1answer
55 views

PostGIS: Get closest point between geometry and Multipoint

I think my question is not that difficult for GIS professionals, but i didn't found an answer to my problem (even not in other questions). Problem: I have given two tables (table1,table2) with Points ...
2
votes
1answer
70 views

PostGIS - How do I create a line that directly connects two earth points without travelling over a geodesic?

In PostGIS 2.1.1, I've noticed that if I create two distant earth points with equal altitude and then create a line connecting them, as I gather interpolated Z coordinate data along the line my Z ...
1
vote
0answers
35 views

Convert multiline to polygon

perfect result Shapefiles How I can convert this closed line to polygon with PostGIS? I tried many functions like ST_Polygonize, ST_MakePolygon, ST_BuildArea. I got some results, but not a perfect ...
1
vote
0answers
30 views

Finding areas with high POINT density from PostGIS table using Python

I have a PostGIS table with thousands of POINT objects and I want to find areas that have a high density of points. I have the DBSCAN clustering algorithm implemented in Python which does exactly ...
1
vote
0answers
46 views

Why does the postGIS file lose geometry?

I am loading shapefile data from a GPS into PostGIS via Leica ZenoOffice. This apparently imports fine with it's geometry in the attribute table. However, when I add a postGIS layer in QGIS the file ...
0
votes
0answers
12 views

Dot density inside polygon (kml co-ordinates)

I have a kmz url(its not in local), which has so many polygons in it. Which contains co-ordinates something like: <LinearRing> <coordinates>138.878021,-34.971903,0.0 ...
0
votes
0answers
22 views

GDAL_Translate not compressing when NoData value is set

I am trying to compress a .TIF file using GDAL_Translate or GDAL_Warp. My Raster is 32mb to start with. When I use GDAL_Translate with the COMPRESS=PACKBITS option, it compresses to 1.9mb. However ...
4
votes
1answer
61 views

Should geometries be drawn using rhumb-line or great-circle paths?

I work with WGS-84 coordinates and, most of the time, my map display (luciadmap) is in Mercator projection. My client is surprised to see that, for a rectangular geometry: the line between the 2 ...
0
votes
0answers
12 views

openlayer wfs protocall reset on map zoom

By considering wfs-example example. I have added one layer on map with BBOX and savestrtegy and add controls(add,delete,modify and save). wfs = new OpenLayers.Layer.Vector("Editable Features", { ...
1
vote
0answers
23 views

Create “grid” of polygons with the same 3D area based on an underlying raster variable (e.g. DTM height)

This could apply to point or raster values but imagine a raster of a continuous variable such as height (DTM). Is there a way to create a complete coverage of polygons that will have an equal area, ...
2
votes
1answer
36 views

Error in installing PostGIS 1.5?

I am installing PostGIS 1.5. After giving the command ./configure, it is showing that: pQserverversion in -lpq not found. configure: error: could not find libpq. What does it mean? I am ...
1
vote
1answer
26 views

How to calculate the intersection between WFS layer and a PostGIS table

I need to calculate the intersections betweek a WFS layer and the geometries stored in PostGIS table. Then I should save the geometries of the intersections in a separate PostGIS table. Do you have ...
1
vote
0answers
44 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 ...
1
vote
1answer
39 views

PostGIS - How to do ST_UNION on each feature of a geojson FeatureCollection

I have a simple geoJSON featureCollection composed of 2 features: featureCollection = {u'type': u'FeatureCollection', u'features': [{u'geometry': {u'type': `u'MultiPolygon', u'coordinates': ...
1
vote
2answers
102 views

Export polygon in geojson as multipolygon

Anyone knows if is there any way to export a polygon layer in geojson, as multipolygon? I have a multipolygon shapefile. But there are single and multi polygons. When I export it to geojson, I got ...
0
votes
0answers
20 views

uploading raster format tif to postgis through raster2pgsql

I have the same problem Uploading raster format(*.tif) to postgis through raster2pgsql How to you fix it, if it is a problem? Because my raster column is empty. Of if it's ok, what does it mean? ...
1
vote
1answer
35 views

Error while installing PostGIS 1.5

After giving the command ./configure, it is showing that: pQserverversion in -lpq not found. configure: error: could not find libpq. What does it mean? I am using Red hat Linux (32 bit) version ...
0
votes
1answer
23 views

WFS with authentication to PostGis (or to shape)

Is there a way to import data from a WFS layer to a Postgis table (or to a shape)? there are blogs explaining how to do it in 3 steps (http://anitagraser.com/2012/09/26/wfs-to-postgis-in-3-steps/) or ...
2
votes
2answers
131 views

PHP examples to replicate FeatureServer capabilities

I used FeatureServer before and I liked it. The only thing I didn't like, though, is that it needs some other dependencies to work. That's why I want to try PHP instead. I know that there are already ...
3
votes
2answers
52 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: ...
1
vote
0answers
31 views

Which type in entities for PostGIS/Hibernate Spatial

I already manage to store, read and update PostGIS rows with Hibernate Spatial with a Point and a MLineString in a very simple case : a MLineString defining a road, display a point along this road ...
2
votes
3answers
70 views

Find point close to points from postgis table

I have a postgis point table with a large list of cities. I need to find duplicates in it, but only if they are 10km close each other, which means that is the same city. For example, I have 5 points ...
0
votes
0answers
19 views

Problem with Performance when accessing selected Features from PostGIS layers in QGIS using Python

I have 2 PostGIS layer in my QGIS project. They have about the same amount of data and a similar structure except that layerX has its PK on a single column and layerY has its PK on 4 columns. When I ...
1
vote
1answer
38 views

Geometry error in roadnetwork

I have a road network table. When I check st_isValid(the_geom)='f', I am getting an error: NOTICE: IllegalArgumentException: point array must contain 0 or >1 elements ERROR: Exception in ...
1
vote
0answers
18 views

How to process GeoJSON data and create hive table for spatial analysis

I am using the ESRI-GIS tool for hadoop for analyzing json data generated through ESRI products like ArcGIS. But I wanted to analyze spatial data from a PostGIS table for which I made geojson ...
1
vote
1answer
54 views

Migrating data from Python to PostGIS

I have pandas DataFrame with these columns: point datetime value 1 Point(-24.6064453125 26.3683280945) 2014-09-11 19:00:00 24.885258 2 ...
1
vote
1answer
93 views

Get a single cluster from cloud of points with specified maximum diameter in postgis

I have on the order of 2M Geometry Collections with N (median: 2, stddev: 6.6, 75th: 6, 95th: 21) Point objects (repeated points allowed and important) in a PostGIS table. I want to identify clusters ...
0
votes
0answers
23 views

imposm2 to imposm3

I am using imposm2 to import osm data to postgresql database but recently moved to imposm3 which is still in development phase I want to know is there an easy way to convert imposm2 mapping file ...
2
votes
1answer
67 views

Export raster from QGIS 2.4 to PostGIS

How can I export a raster file out of QGIS (version 2.4) into a PostGIS database? I am looking for a module or python script.
1
vote
1answer
66 views

How to install postgis extension using an existent version on postgresql on OSX 10.9.4

I'm trying to install postgis using my existent version of postgresql. I tried doing: brew install postgis. But I'm getting the following error trying run create extension postgis; query ...
1
vote
1answer
45 views

What date was a table loaded into PostGIS

Is it possible to find out the date a table was loaded into a PostGIS schema using PgAdmin3? The tables are usually supplied from varying external sources.
2
votes
1answer
38 views

Is there a similar Esri “load data tool” on Postgres/PostGIS?

I have a remote PostGIS DB and tables with permissions and users, containing data that is being published on geoserver; and in the office locally, we have an ESRI corporative GDB that is being updated ...
1
vote
0answers
16 views

Map Rendering Issues [closed]

I have tried simplification of geometry using Postgis function (ST_Simplify) in a map, for map rendering issues. I am still not able to get a good result, are there any other steps to follow?
3
votes
0answers
57 views

Problem with performance when loading PostGIS layer using pyQGIS

I'm having a question on loading a PostGIS layer into the project from my QGIS plugin. The code is like this: uri1 = qgis.core.QgsDataSourceURI() uri1.setConnection(str(host), str(port), ...
2
votes
0answers
66 views

Is it possible to create an ellipse around a line in 3D space?

In Postgis 2.1.1, I have a line in 3 dimensional space connecting two antenna points on the earth's surface. Is it possible to create an ellipse around that line? I have a formula to compute the ...
1
vote
1answer
46 views

Copy tables from one server to another in PostgreSQL

I am trying to copy a number of tables from one server to another using PostgreSQL as part of reorganising our data structure. I am pretty new to PostgreSQL so haven't much experience with it. Is ...
2
votes
1answer
46 views

Polygon from line creation problem

I have a problem transforming a linestring into a polygon. The error is: ERROR: lwpoly_from_lwlines: shell must be closed So I checked but firstpoint and endpoint are the same. I tried to use ...
0
votes
2answers
142 views

How do I install PostgreSQL + PostGIS + MapServer + Python-MapScript on Ubuntu 12.04 LTS w/o compiling from source?

This question is similar to the one posted here... How to have PostGIS 2.1 and the Python osgeo library installed together without compiling from source? ...but since I'm new GIS Stack exchange, I ...
1
vote
1answer
41 views

PostGIS - ST_Difference query returns a dissolved result

I am using the ST_Difference to erase multipolygon feature by a mask. However, the query returns a dssolved multipolygon. The query is the following: '''SELECT ST_AsGeoJSON(ST_Collect(geom))::json ...