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

learn more… | top users | synonyms

1
vote
1answer
35 views

Select Polygon Intersections Between Two Tables With No Common Key

I am new to geodatabase queries and cartodb. I am trying to write a SELECT query that will do the following. I have two tables. Table 1 contains congressional district polygons and info about ...
1
vote
0answers
50 views

Export DGN to shape or postgis with multiple mslinks

I need a command line tool to export DGN files to shapefile or PostGIS, I tried ogr2ogr but it only exports type, level, graphicgroup, colorindex, weight, style, entitynum, mslink and text. I need the ...
1
vote
1answer
22 views

SELECT geometry FROM spaces WHERE geometry ARE WITHIN OR OVERLAP polygons FROM OTHER table

I've got two tables, one containing LINESTRINGs and one containing POLYGONEs. I would like to select all the LINESTRINGs that are containing within the outer boundary of all the POLYGONs combined. ...
1
vote
2answers
55 views

Free solution for an intranet geodatabase for point data, connectable to QGIS / MapInfo

I have a plenty of point measurements - thousands of points with date/time, gps, measured values etc. I would like to make it possible to put all my particular datasets (can decide whether shp or ...
0
votes
0answers
48 views

All queries on wkb_geometry column return null regardless of input ( ST_Point, ST_Intersects )

I am new to Postgis and I don't know if I am doing something wrong with my query, or if there is a problem with the data. I have been running queries on tiger shape files from the US Census site, I ...
1
vote
0answers
60 views

Create polygons enclosing same number of points on PostGIS

I have a geodatabase on Postgis with points representing customers, what i need is give a number of customers, lets say 100 and it need to generate polygons enclosing 100 clients each one. I only ...
1
vote
0answers
244 views

Using ArcMap 10.3 with PostgreSQL 9.3.x database and PostGIS 2.1.1?

I have a PostGIS database that we use for data storage. I would like to open this data in ArcMap instead of storing it in another format. In previous versions of ArcMap it has been possible to open ...
2
votes
4answers
100 views

Postgis don't use spacial-index with st_intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
0
votes
1answer
46 views

Write a query to find all geometries within a distance using ST_DWithin

I have written a query in PostGIS in which I use the ST_DWithin function to get the geometries which are located in a certain distance: SELECT images.path, focnetworkpart.__gid FROM images INNER ...
0
votes
0answers
16 views

Updating committee name based on a spatial join within a trigger in postgis

Updating committee name based on a spatial join within a trigger in Postgis. It appears right to me and it runs and executes successfully but still comes up with an error when I try to create a new ...
2
votes
3answers
176 views

Where to find the units for a specific spatial reference system?

I want to use the st_within function to find geometries within a specifi distance. My geometries are both in the same SRID stored in a postgis db. From what I read here: ...
0
votes
1answer
74 views

Get postal codes of a city in OSM via postgis/postgresql

So, I'm trying to get the postal codes of a city (polygon). Unfortunately, I never get consistent results with my code: SELECT a.name, b.tags->'postal_code' FROM planet_osm_polygon a JOIN ...
1
vote
2answers
58 views

QGIS2.6 postgis relation between tables

I have three tables in Postgis: points called location(gid (pkey),name) example (1,Paris) temperatures named Temp(idTemp(pkey),TempValue,date) example (1,12,2015-01-01) relation between the two: ...
5
votes
1answer
92 views

PostGIS query points based on distance from regular grid

I have a PostGIS table with a large number of points (>150k) on a roughly regular grid -- all points are all about 5km apart. Each point has a geometry field and an associated value nr_days. Is ...
0
votes
0answers
39 views

Dissolving points based on easting and northing with statistic type first as aggregate function using PostGIS?

I have two points features having point_ID, Easting and Northing fields and want to dissolve based on Easting and Northing with statistic type aggregate as "first" for point_ID, as you do in ArcMap. ...
2
votes
1answer
48 views

am I setting up data from google geocoding correctly for ST_DWithin search?

Sorry to ask a basic question, but I have not been able to find this laid out entirely anywhere. I am mostly relying on this SO post: What Spatial Reference System do I store Google Map's Lat/Lng ...
1
vote
1answer
95 views

postgis calculate distance between point & polygon/circle

By basic requirement is to find the nearby fences to a particular point(user lat long alt) within a N meters. I have list of polygon/circle in DB with 900913 srid ...
1
vote
1answer
47 views

PostGIS returning a field one level higher in the Json

I have the following SQL on a PostGIS Database ($properties contains a list of fields, including osm_id) SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, ...
1
vote
3answers
42 views

PostGIS raster maximum number of bands?

Is there a limit on the maximum number of bands you can store in a postgis raster? I cannot find documentation on this. As far as I can remember, a geotiff allows up to the max short integer (so ...
0
votes
0answers
32 views

QGIS Crash: Enter Credentials

just wondering if anyone has come up against this issue...in the office QGIS will come up with an 'Enter Credentials' box with 'Error: Too many clients already'. When you enter your username and ...
1
vote
2answers
76 views

WFS 2.0 transaction

I am using WFS-T in a mobile application to commit changes to a postgis database via geoserver 2.6. I build the http requests myself (not using any framework like geotools or openlayers). I already ...
1
vote
1answer
36 views

how can I update linestring on postgis?

I have a linestring on my postgis. and I want to add a new point linestring. I mean I want to update my linestring? how can ı do this? UPDATE roads SET geom = ST_AddPoint(geom, 'POINT(0,0)') WHERE id ...
2
votes
3answers
101 views

Which tool/referecence for adress geocoding?

I have to geocode several corporate sites (a big excel file), near to Paris (FRANCE). I would like to geocode this file based on the addresses. Could you tell me the best tool for this task ...
0
votes
1answer
65 views

How do I create a new vertex in the middle of an edge in postGIS?

I have a postGIS database populated with OSM data with the osm2po import tool. I have a number of fixed points that I want to route between using pgrouting. In order to do this accurately, I want to ...
3
votes
2answers
156 views

Downloading raster data into python from postgis using psycopg2

I have raster data in a postgres table that I want to get into python as a numpy array. I am using psycopg2 to connect to the db. I am able to download the data but it comes back as a string (probably ...
1
vote
2answers
52 views

How can I add another WHERE filter to a PostGIS query?

I have this query, which works well, for an OSM database: SELECT row_to_json(fc) FROM ( SELECT ST_AsGeoJSON(ST_Transform(ST_Intersection(lg.geometry, bbox.geom), 4326))::json As geometry, ( ...
0
votes
0answers
37 views

PostGIS ST_Contains query return empty

Hopefully I explain this properly. I am trying to check if a route falls into another route I have greated. The route is saved as a linestring. My search query is: SELECT id FROM routes WHERE ...
3
votes
1answer
61 views

How to import a GeoTIFF into PostGIS without raster2pgsql

I know that one can import GeoTIFF into PostGIS via raster2pgsql. I was wondering if there is any easy way (as a sequence of SQL statements) to do the same without resorting to the command line tool? ...
1
vote
1answer
251 views

How to add Geoserver WFS to Leaflet JS Application

I have a PostGIS database and have successfully consumed a table into GeoServer and published a WFS. Are there REST endpoints available for these WFS' akin to ESRI's feature services? How are ...
0
votes
1answer
109 views

OpenGeo Explorer for QGIS 2.6.1 - No module named ogr2ogrtopostgis

I'm trying to use the OpenGeo Explorer plugin for QGIS (v2.6.1) to import shapefiles to my PostGIS database. I can connect to the server, but when I try to import, I get the following error: No module ...
0
votes
0answers
24 views

NameError: global name 'QgsDataSourceURI' is not defined

Following on from my previous question I cannot seem to get my function to run using script runner in QGIS. However, if i type then out in the Python Console then they work and load the layer in ...
5
votes
3answers
211 views

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this: ╔════╦═══════╦═════════════╦══════════════╦══════════╦═════════════════╗ ║ id ║ index ║ easting ║ northing ║ utm_zone ║ ...
1
vote
2answers
96 views

PostGIS SQL syntax for bounding box

I have the following query: SELECT row_to_json(fc) FROM ( SELECT ST_AsGeoJSON(lg.geometry)::json As geometry, ( select row_to_json(t) from ( ...
1
vote
0answers
27 views

Searching a table within PostGIS using PyQGIS script

Morning all, I am looking for some guidance in trying to set up a script that will search a PostGIS database using a wildcard and then open a certain file directory that will be in one of the fields. ...
1
vote
0answers
29 views

How to correctly upload Shapefile into PostGIS on ubuntu?

I want to know how to use upload shape file via Postgis. Can u please help me? .com/nsVuQ.png
2
votes
1answer
95 views

ST_INTERSECT of each element of two tables (polygons, lines)

Im new to postgis and trying to solve the following problem: I have two tables: 1. containing polygons 2. containing lines I need to find out the id of all polygons on each line and fill them in new ...
0
votes
0answers
27 views

How to get correct measure with PostGIS SQL query? [duplicate]

First of all, sorry my bad english. I am new at gis. So I want to measure my road. I want to use measure unit kilometers. But I am a bit confused. I have a garmin etrex gps device. So I get my ...
0
votes
1answer
39 views

Finding lines of similar attribute with respect to nodes connected to its both Ends

I have line networks with node generated for Start and End Point . how to check if a line has correct attribute with respect to point created at its End. for instance FuID_Line = ABC_BDQ and Start ...
1
vote
3answers
61 views

How to append data in PostGIS database with QGIS?

I 'm running postgis with qgis 2.6. I created a database and tables that i need to update with new datas provided with shapes. I cannot find how to insert them in table. All attributes both shapes and ...
1
vote
0answers
28 views

From Openlayers 2 report generation

Can u suggest how a JasperReport can be geneated by an user accessing an point (say a wireless tower in map) on a active layer done in openlayers 3. Here the architecture uses openlayers 3 and is ...
0
votes
1answer
59 views

How to find routes between for each entry in a list of point pairs?

I have a postgis database with two tables. In the first table I have linestrings of a street network. The second table has points that are located on the street network. What I want is to find the ...
1
vote
0answers
24 views

How do I step into the C++ functions from an external Python app I'm debugging?

I just wanted to see how to step into the C++ class QgsVectorLayer()'s methods from the python call to QgsVectorLayer(self.uri.uri(),'foo','postgres'). I'm trying to debug and it trying to step into ...
0
votes
0answers
51 views

ERROR IN sudo PGUSER=postgres make installcheck step

I am trying to setup cartodb on Ubuntu 14.04. I installed all the dependencies & requirements. Postgres 9.3 and postgis 2.0 are also installed. Whenever I try to execute following Steps : ...
2
votes
1answer
80 views

Symbolising null features in graduated symbology

I have a polygon feature dataset, and an attribute from a different table that I join (one-to-one) within QGIS in order to symbolise the attributes as a choropleth map. However, not all polygon fields ...
1
vote
1answer
94 views

Removing pseudo nodes from PostGIS database using ST_ModEdgeHeal()?

I have used osm2po (5.0.0) and its autogenerated SQL file to load some 25% of Europe.osm.pbf as a network table into my PostGIS database. I have also created an associated nodes table with select ...
0
votes
0answers
36 views

Routes through centroids and array functions

I have a table stopcentroids4 like in figure with the following fields: gid, routes, geom and i want to draw a line for each route that runs through centroids. In my code there is a mistake. ...
0
votes
1answer
175 views

pgRouting cannot find extension control file

I am trying to use pgrouting on OS X. I installed the following: brew install postgres brew install postgis brew install pgrouting When I try to create the extension pgrouting I get the following ...
1
vote
0answers
97 views

How to create projects in Tilemill Ubuntu Web service?

I have set up Tilemill on a Ubuntu server and successfully accessed it from browser using TILEMILL_HOST:20009 I have already uploaded planet_osm data to postgresql/PostGIS DB in the same server ...
7
votes
1answer
233 views

How to visualize measure values along linestrings in QGIS?

I have a series of LineStringM geometries. The measure value represents slope (or stream gradient) at each point in the geometry. I love QGIS's robust styling options, but I can't find a way to render ...
0
votes
1answer
21 views

Combine Elevation Raster and MultilineString to create MultilineStringZ in PostGIS

I want to show how steep a given stream is. I'm using PostGIS and QGIS. I do not have access to ESRI products. I have some ideas, but I'm not entirely sure how to proceed, and some of my assumptions ...