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

learn more… | top users | synonyms

0
votes
1answer
31 views

Postgis installation

I am installing Postgis on my Debian server, following these instructions: http://postgis.net/install/ (Ubuntu / Debian) https://wiki.postgresql.org/wiki/Apt However, after following the ...
0
votes
0answers
4 views

PgRouting function wrapper

I'm trying to adapt the pgr_fromAtoB function to pgr_fromAtoMult replacing pgr_dijkstra function to pgr_drivingdistance.Here is the code: CREATE OR REPLACE FUNCTION pgr_fromAtoMult(IN tbl character ...
1
vote
0answers
17 views

POSTGIS get the max length of the polygon and the average width

I have in postgis a polygon type table. I need to calculate automatically the maximum length of the polygon: And the second one is the average width: I am doubting rigth now if this is possible ...
1
vote
0answers
12 views

QGIS Plugin for PostGIS versioning

Does anyone of you know a QGIS-Plugin for Versioning PostGIS-Data? I know there was pgVersion of Horst Düster but as far as I know this was not updated for QGIS 2.x (at least not for the "normal" QGIS ...
0
votes
0answers
26 views

Find headwater polygons

This is a follow up question to this question. I have a river network (multiline) and some drainage polygons (see picture below). My goal is to select only the headwater polygons (green). With ...
0
votes
1answer
21 views

Postgis: Conflation of two vector layers into a single layer

If I have table A that I consider to be definitive and table B that may have some elements missing from table B but also has geometries that are "close" to those in A that I want to ignore. How could ...
0
votes
1answer
11 views

ST_AsLatLonText () rounded

I know this is a POSTGIS question… I set a field with UPDATE members SET latlong_degree = ST_AsLatLonText (the_geom) But the result is (for example) 48°37’41.742”N 9°17’55.716”E The seconds part ...
1
vote
0answers
14 views

How to get changeset tag from .osm file into PostGIS enabled Postgres db

End goal: visualize geographic data from .osm file with QGIS by adding PostGIS layers which include changeset information. I have used osm2pgsql successfully to populate PostGIS and visualize the ...
1
vote
1answer
49 views

PostGIS ST within does not exist

I'm quite new to postgresql and postgis so this error will probably due to some rookie mistake. I want to run the spatial query ST_within. When I describe the query like this SELECT nw.entity_id AS ...
0
votes
0answers
24 views

How to create unique plane with PostGIS?

How to create a unique plane, with (x , y ,z) as center and a vector as normal, in PostGIS? I already saw "Make3DBox" function, but it does not make a unique one.
0
votes
2answers
30 views

Can you do aggregate functions among nearby geometry in PostGIS?

I want to do aggregation based not on group but on geometry, is that possible in PostGIS? For example to calculate max, min, average price for all listings that's nearby a geometry point, how can I ...
2
votes
1answer
24 views

Visualising a raster PostgreSQL table in QGIS

I have imported a raster tif image into PostgreSQL with this command: raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql And imported the output SQL file ...
3
votes
1answer
51 views

PostGIS multiple conditional statement on spatial join

I want to make a multiple conditioned spatial query in PostGIS 2.0/PostgreSQL 9.3., OS Windows 7. There are 2 tables, cadastre (Polygon) and roads (Linestring). Query: Select the sum (one number) of ...
0
votes
2answers
37 views

Y-coordinates offset in Tilemill

I own a project created with TileMill in SRS 900913. The data source is a Postgis database with the same SRS. When I'm loading the file generated with TileMill (mbtiles) in QGIS and I'm putting under ...
3
votes
3answers
86 views

Spacing a set of points

I have a shapefile of a set of points that I want to space out. I DO NOT want to do this using line interpolation as I run the risk of placing a point where there wasn't one before. I can load this ...
5
votes
2answers
340 views

Find start of river

Edit: Follow-up question here (= Find headwater polygons). How can I determine the start of a river in PostGIS? I have a river network (Multiline) and want to find the startpoints of the rivers. ...
0
votes
0answers
17 views

Convert Postgis tables to DWG

Is there a simple way of converting a postgis table to DWG for a given table name? Regards,
1
vote
2answers
33 views

Problem in importing shapefile to Postgis with postgis Shapefile manager

i have a problem with importing my shapefile to postgreSQL, it's a poroblem with the encoding, here's the screenshot: i tried to change encodingin "options" buti get this message: "Failed in ...
3
votes
1answer
49 views

How to display OSM relations (in QGIS) from osm2pgsql populated PostGIS DB

I have a PostGIS DB populated with OSM data (osm2pgsql, standart.style). Now I would like to display a hiking trail (http://www.openstreetmap.org/relation/51855). It would also be fine, if I just ...
0
votes
1answer
34 views

PostGis - BBox -vs- ST_intersects Queries

CartoDb Recommend here that the following query is faster than an St_intersects Query SELECT * FROM {table_name} WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-73.9980, 40.726), ...
0
votes
1answer
13 views

Raster2pgsql overview method

What is the method used by Raster2pgsql to create overview? I couldn't find details in the docs. Nearest neighbor isn't a very good choice for the dataset I'm working on, but that seem to be the one ...
3
votes
1answer
81 views

PostGIS ST_Union Performance

I'm trying to execute a 'dissolve' operation in PostGIS using the ST_Union command. The input layer is admittedly quite large and complex. By 'large' I mean 57,771 features, with number of vertices ...
1
vote
1answer
25 views

Querying Postgis data in R using dplyr package

Does anyone have a workflow for querying postgis data in R using the dplyr package? R doesn't like the spatial columns in postgis data so can't read them in like a postgres table. I get the error ...
-1
votes
1answer
26 views

How to choose a SRID and what is its meaning? [duplicate]

I'm new to GIS, in PostGIS, and I'm struggling with the SRID concept. How do you choose a SRID for a database column? This is making me crazy. Why do I need to choose a SRID? What's its meaning? ...
0
votes
1answer
12 views

Walking-Driving area with Leaflet,OpenLayers

Could be possible to get a walking or driving distance area using pgr_drivindistance,pgr_alphashape and/or pgr_pointsaspolygon when an user click any location on map with Leaflet or OpenLayers?. I ...
3
votes
0answers
60 views

Spatial query too slow to handle bigger OSM extracts

I'm trying to compute some statistics for OSM data using PostgreSQL 9.3.5 and PostGIS 2.1.4. I started with a small bavaria extract which I downloaded from Geofabrik. The db schema is the normal API ...
0
votes
0answers
26 views

How to choose data type and SRID, for coordinates from different sources, in a medium size zone

I'm developing an application. In the database I need to store coordinates for many places, in the north-east of Italy, but the area could expand in the future. This coordinates will come from some ...
0
votes
1answer
19 views

How to use ST_Transform when inserting new row?

I have written a script which reads a CSV file with lat/lon coordinates in WGS84 and inserts them into a table in PostGIS. What I want to do now is to change the insert query in order to make a ...
1
vote
1answer
43 views

QGIS 2.6 how to prevent user to drop a postgis table

Does anyone know how to prevent user to drop a postgis table? I have a vector layer imported from a postgis2.0 database, and one of my users drop it accidently. Fortunate I had a backup, but i don't ...
0
votes
0answers
30 views

GIS Data from osm visual in google maps

I have download from openstreetmap data for my project in a workshop i use den coordinates from a roads network ,but i have problem with visualization the cord in google maps same roads is not drawn ...
1
vote
0answers
14 views

Spatially joining 2 point layers i.e. pole and customer points using spatial join of PostGIS/PostgreSQL?

I created a 20 meter buffer around pole then tried to intersect with customer layer, using the query below, but it was taking a huge time to process. SELECT ...
1
vote
2answers
37 views

postgis - get nth point of a polygon

I would like to create a postgresql function to correct geographic coordinates inside a polygon that are outside the -180 to 180 range of longitudes. To do this, I thought I would create a function ...
1
vote
1answer
19 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
28 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
16 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
36 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
12 views

Displaying Postgis Database points in Google Maps [closed]

`I've created a postgis database named assets.and it contains columns gid,id,name,assetname,asset_name,geom.I've created the postgis connection and displayed the postgis database table contents in ...
0
votes
0answers
16 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
41 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
78 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
74 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
35 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
13 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
150 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
32 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
51 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
81 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
34 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
30 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
30 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 ...