Tagged Questions

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

learn more… | top users | synonyms

1
vote
0answers
45 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
40 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
115 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
23 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
36 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
26 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
133 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
56 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
33 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
72 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
45 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
20 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
56 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
105 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
24 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
73 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
84 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
41 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
60 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
68 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
48 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
175 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 ...
2
votes
0answers
177 views

How to correctly import GeoJSON in PostGIS? [closed]

I'm trying to migrate GeoJSON data to PostGIS database and I thought that ogr2ogr is the tool: ogr2ogr -f PostgreSQL PG:"host={} user={} port={} dbname={} password={}" test.geojson -nln ogr_test ...
2
votes
1answer
52 views

Problem when trying to style negative values in Geoserver via SLD

I have a PostGIS table that holds (numeric) values from -1 to +1. I would like to style these values in Geoserver so I created an SLD file in QGIS which looks like this: ---snip--- <?xml ...
1
vote
1answer
37 views

Different ST_AZIMUTH results for ST_PROJECT points along the same original bearing

I'm trying to develop some way of determining line of sight (LOS) between two geographical points about 1km apart or less using ST_3DINTERSECTS or something similar. BASIC PROBLEM: Along the way, ...
0
votes
0answers
25 views

Bulk insert geometry in PostGIS inserting geom from an already existing table in database

My goal is to bulk insert original data into a table I created within PostGIS. I want to insert geographical data into this same table as well; this geographical data already exists within my ...
2
votes
1answer
100 views

Installed PostGIS extension not listed for database

I have a PostgreSQL database with the PostGIS extension enabled. I know that this extension is enabled, since I am using PostGIS functions, and I can actually see the PostGIS functions. However, ...
2
votes
1answer
47 views

Find nearest distinct features to a point

I am trying to select a single distinct features closest to an XY point in PostGIS. So I can find a single record for each distinct code by using: Select Distinct ON (code) * FROM table; Which ...
2
votes
0answers
43 views

PostGIS “Overlay” Style Union, not “Dissolve” Style

I'm trying to use PostGIS to do a 'union' of polygons. When I Googled "PostGIS Union", I found the ST_Union function, which performs what I would call a 'dissolve,' not a Union. What I actually want ...
0
votes
0answers
21 views

PostGIS commands in GRASS

How does the geometry get referenced in GRASS when using a PostGIS command like st_within? e.g: echo "UPDATE file SET within=(select file2.name from file, file2 where st_within(file.geom,file2.geom) ...
1
vote
1answer
46 views

Postgres Performance with Radius Searches

Im porting an application from mysql to postgres, and have several tables with 500k+ rows in each of geo points (lat, lon). In mysql i used a bounding box query with haversine to select rows within a ...
0
votes
1answer
65 views

Cannot load postgis layer from sql string in pyqgis

I'm trying to load a layer using the following code in qgis python console: sql = "(select the_geom, ID from mytable)" uri = QgsDataSourceURI() ...
0
votes
0answers
37 views

insert row into postgis query table in QGIS

I find I am using QGIS (2.4) more and more as a client for PostGIS database tables with geometry, but also for tables without geometry, partly because it's good just to use the one application and ...
1
vote
2answers
74 views

Split lines into non-overlapping subsets based on points

Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the ...
2
votes
1answer
66 views

PROJ4 / PostGIS transformations between WGS84 and NAD83 transformations in Alaska

I'm trying to implement the recommended WGS84 - NAD83 transformation for Alaska using PostGIS. This post: Geographic Transformations in Alaska Between NAD83 and WGS84 indicates the proper ...
1
vote
3answers
210 views

postgresql export database with command or pgAdmin III

I want to export my postgresql db with pgadmin. I search all of its GUI, I also searched the web and I don't find some sueful information. I know how to import the db into postgresql: create a db with ...
3
votes
2answers
78 views

Which one of these azimuth values is the right one? And why?

First of all, let's make clear that I want the Azimuth on the surface of the Earth, i.e. the angle between two locations, for example New York and Moscow. I am testing some azimuth calculations with ...
2
votes
1answer
122 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
63 views

Is the Azimuth on the equator equal to the one not on the equator?

I am trying to fully understand the concept of Azimuth and I am encountering some inconsistencies (or maybe it is my error). I show you some examples that do not match, hoping somebody can explain me ...
0
votes
1answer
73 views

How to calculate the Azimuth between two points in PostGIS?

I have a GIS API based on OpenLayers. I have been trying to implement Azimuth calculation in JavaScript and I needed some way to calculate the Azimuth in order to perform tests. I started using ...
0
votes
1answer
20 views

Road displays up to node, not up to starting point and ending point

SELECT id FROM table ORDER BY st_distance(the_geom, st_setsrid(st_makepoint($slng,$slat), 4326)) limit 1 ; get source and similar for target ; and then apply in dijkstra algo SELECT pgr_a('SELECT id ...
1
vote
0answers
23 views

How can I associate a consistent polygon area with a set of attributes using a topology?

Consider the following topology. SELECT CreateTopology('topotestschema', 0, 0.01); CREATE TABLE topotest (id SERIAL PRIMARY KEY, data TEXT); SELECT AddTopoGeometryColumn('topotestschema', 'public', ...
0
votes
0answers
12 views

Working with different source WMS data

I have a geoserver and WMS services on it. For example my water valve layer is point data and published from geoserver. (I am using postgis to saving data.) An external WMS service publishes polygon ...
2
votes
0answers
36 views

Determine PostGIS geography polygon orientation

How can you determine the orientation of a PostGIS geography polygon? I'm looking/hoping for a function that would tell me which side is the interior (left or right) as you traverse the vertices of ...
1
vote
0answers
33 views

Query PostGIS database without creating primary key [closed]

I'm trying to query PostGIS database from QGIS DB Manager: select row_number() OVER(ORDER BY idx DESC) as id, p.*, * from table_1 join table_2 as p on "name" = "name" where row_number() OVER(ORDER ...