The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
9 views

postgis installation gone awry

[cross-posted from stack ove On a Ubuntu 14.04 staging server a MySQL connection protocol had to be installed for full-text searching for a separate application. This led to installing, uninstalling ...
0
votes
0answers
5 views

Setting Column Privileges in Postgis Fails to Commit Changes in a Read/Write Column

Background information. I'm running Postgresql 9.5 and Postgis 2.2 on a Windows 7 platform. Read-only privileges applied to a table. One column in the table receives read/write privileges. Editing ...
1
vote
1answer
45 views

Why does this PostGIS query take so long to run?

I am new to PostGIS and SQL in general. I am running a query on polygons which, I hope, only selects distinct geometries and then repair (ST_MakeValid()) those distinct geometries. Thereby removing ...
1
vote
0answers
16 views

PostgreSQL: Improve system performance, KNN modification with GiST Index

In my PostgreSQL 9.5beta2, Postgis 2.2.0 compiled by Visual C++ build 1800, 64-bit I am running a Nearest-Neighbor-Query with the additional complication of unique assignment. I am running this on ...
2
votes
1answer
46 views

PostGIS - indexing - speed up query

I have this query (called from PHP, hence the $ variables): SELECT a.name, St_AsText(a.geom), b.name AS name_b, b.id FROM a LEFT JOIN b ON b.id = a.b_id WHERE ...
4
votes
0answers
63 views

Using SELECT to call a function in a jdbc migration

I'm looking to set up some Postgres/PostGIS migrations with clojure/jdbc. running side-effect functions with SELECT is proving to be an issue, with most migration libs eventually throwing the A ...
2
votes
1answer
60 views

Using an index on a Postgresql integer range causing trouble

Unfortunately I was not able to create a usable example / fiddle. But I am using a Postgresql 9.4 table that looks somewhat like this: CREATE TABLE table1 (id INT PRIMARY KEY NOT NULL, dtype TEXT, ...
0
votes
0answers
12 views

trying to find closest road segment to a node I have

I am trying to find the closest road segment to a point that I have and return an attribute from the closest segment to the given points. I know in POSTGIS I need to use ST_ClosestPoint, St_distance ...
0
votes
1answer
42 views

RHEL Postgresql 9.4 and PostGIS

I'm a dba new to postgresql. I have Linux RedHat 7 without openshift. I have to install some DB on 9.4 version with postgis. My sysadmin has published the following repositories : RHEL 7 server ...
0
votes
1answer
28 views

Postgis radius search

I have a table setup with the following columns, and it containts about 100K listing of data. Column: address | Type: Text Column: geo_point | Type: geometry(Point,4326) My question is for ...
1
vote
0answers
21 views

PostGIS radius search performance

In my Postgres database, there is a listing table, inside that table, I have a column called geo_point, which stores latitude and longitude information. The column type is geometry(Point,4326). I ...
2
votes
0answers
43 views

Access points of geometric path data in PostgreSQL 8.1

Summary: I would like to perform basic operations on the points of geometric path data contained in a PostgreSQL 8.1 server which I do not have administrative access to. In particular I would like to ...
0
votes
2answers
24 views

Using PostGIS to compute graph data

I have a query which return me two dimension data: SELECT POINT(value , extract(EPOCH FROM datetime)) AS pseudo_geom FROM table gaves me pseudo_geom --------------- (18,1439679940) (29,1439680000) ...
-4
votes
1answer
261 views

Error subquery uses ungrouped (columns correlation)

Recently I tried to create a query to obtain some statistical data, but I got this error: subquery uses ungrouped column "vegetacionpotencial.ident" from outer query select veg_pot , ...
0
votes
0answers
42 views

accessing postgis extension capabilities

The context is pertinent as it demonstrates behaviour different than other (more manual) successful attempts. Deploying a rails application with postgres and postgis extension to AWS EC2 instance, ...
0
votes
0answers
23 views

postGIS dump size seems strange

I have this table on postGIS 2.1.5 (postgres 9.4.3). A pg_relation_size shows a size of 300MB. However when I try to dump the schema containing this table (and only this table), I end up with a 27GB ...
0
votes
1answer
20 views

Copy postgis layer from S3 to Heroku

I have a dump of a postgis layer (layer.dump), which I am trying to add to my heroku database (mydatabase). The postgis layer is stored on S3 (https://s3.amazonaws.com/layer.dump). I would like to add ...
3
votes
1answer
130 views

RDS raising unwanted PostGIS NOTICEs

I have an Amazon RDS instance that is producing unwanted NOTICEs. I have never seen this behaviour before. mydb=> select current_setting('client_min_messages'); current_setting ...
1
vote
1answer
21 views

postGIS schema qualifier - best practice

There are a number of cases where the EXTENSION for postGIS is created iwth a schema qualifier. CREATE SCHEMA postgis; CREATE EXTENSION PostGIS WITH SCHEMA postgis; why is that? what are the ...
6
votes
1answer
131 views

moving large PostgreSQL/PostGIS database

I need to move and upgrade a very large (~320 GB) PostGIS database from server1 (PostgreSQL 9.1, PostGIS 1.5) to server2 (PostgreSQL 9.3, PostGIS 2.1). The upgrade process is well-documented. The ...
1
vote
0answers
10 views

PostGIS Intersects Query takes lot of time to get the result

I am developing a webmapping application in which I used PosgreSQL with PostGIS plugin as my DB. I have this two tables namely; evidensapp_polystructures and evidensapp_seniangcbr. Both tables ...
1
vote
1answer
47 views

Unexpected results with soundex() function when combined st_distance()

select soundex(A.name), A.gid, A.name, soundex(B.name), B.gid, B.name, st_distance(B.the_geom,A.the_geom) * 111.325 as dist from (select name, ...
1
vote
0answers
110 views

PostgreSQL suddenly using all my disk space

Today I fired up my linux mint via my virtual computer (host is windows 8), left for 30 minutes, and when I was back, I got an error saying I was out of disk space. Yesterday I had about 20 free GB ...
0
votes
0answers
68 views

PostgreSQL becomes very slow after heavy utilization

I have built a Python web application and I am hosting it in a 2GB RAM Debian Server. My application uses PostgeSQL 9.1 with PostGIS. One of my tasks involves importing data from big csv files. ...
0
votes
0answers
28 views

Adding postgis geometry with rake task

I have a postgres table test with a geometry column: Column | Type | Modifiers ...
0
votes
0answers
61 views

How can I create a copy of postgis db from one windows machine to another

I have postgres 9.3 database with postgis extension. I want to create a new database on different computer and import all the tables from the source database. In mssql it would be simple , just ...
1
vote
0answers
40 views

Install PostGIS without Internet Connection

Hi I have binaries but am working on a machine that is on a network not connected to the internet, and I need to install and run PostGIS without Stack Builder or an internet connection. I've tried ...
0
votes
1answer
68 views

Problem with UNION ALL

I have to process 200 points (lat, long) to calculate the minor distance of same object (street in this case). So, I made a simple query to obtain 1 result, and replicate the same to the other 199. ...
1
vote
0answers
261 views

Can I export a PostgreSQL database from Heroku and Import as a PostGIS database in Digital Ocean?

Disclaimer: This may be a dumb question. This is honestly way over my head... one of the pitfalls of using Heroku for too long. I have a PostgreSQL database on Heroku. Now I'm migrating to Digital ...
1
vote
0answers
94 views

rt_raster_to_gdal: Could not load the output GDAL driver

I have already set the environment in windows SET postgis.gdal_enabled_drivers = 'ENABLE_ALL'; Even I tried by adding following in environment path- POSTGIS_GDAL_ENABLED_DRIVERS=ENABLE_ALL But ...
1
vote
1answer
129 views

Error in PostgreSQL/PostGIS Access to offline bands disabled

I am using postgis functions i.e. ST_Clip, ST_PixelHeight. But I am getting this error - ERROR: rt_raster_load_offline_data: Access to offline bands disabled Actually, I have loaded my raster ...
1
vote
1answer
170 views

Installing PostgreSQL and PostGis on Mac OS X

I downloaded and installed PostgreSQL and PostGis from http://www.kyngchaos.com/software/postgres, I work on OS X 10.10. When I go into the terminal now and type psql it says -bash: psql: command ...
1
vote
0answers
134 views

How to optimize inefficient query in PostGIS

I'm doing some queries on a PostGIS, and some of them take a really long time ( > 60 secs). My queries are like this, except querying different tables (like osm_placesbelow). This query takes about ...
0
votes
1answer
299 views

How to make a single row result query to return multiple rows

I have the following WITH SQL Query which does select a set of filling stations along a route within the distance of 1000m. To have the measurement in meter I cast the geometries to geography. I also ...
0
votes
1answer
30 views

PostGIS 1.5 Error with PostgreSQL 8.4

I am trying to add PostGIS functionality to a database that I created in PostgreSQL using the following command: psql -d <db_name> -f /location/to/this/file/postgis.sql However, I receive a ...
4
votes
0answers
251 views

ST_GeomFromGeoJSON() Causes postgres to crash

I'm running into a strange problem which I can't solve. The server crashes when executing some postgis related queries. After some debugging, using the examples provided by postgis, it appears the ...
0
votes
0answers
194 views

MongoDB to store vehicle tracking information

I am building an app similar to Uber for tracking vehicles. Since the update frequency is so high (accounting for several users), I want to know the general practices involved for making writes faster ...
1
vote
1answer
68 views

Are PostgreSQL dynamic arrays more wasteful than plain text?

Today, someone was helping me to make a function in PostgreSQL. I was wanting the function to return in arrays of 100+ geometries per two columns instead of delimited text to make it easier to ...
0
votes
1answer
108 views

Trying to map postal codes to their respective cities, but running into some issues

The Problem I am creating a database of Countries, Regions, Cities and Postal Codes. Here's an example to give an idea of the database structure as it is now: Now, let's take Tuskegee University ...
0
votes
0answers
135 views

How to deal with finding nearby locations when given a zip code or city?

I am using PostgreSQL and PostGIS for this. I have downloaded dumps from Geoname, and built my tables from allCountries, alternateNames, and countryInfo. I've created my PostGIS geometry column, and ...
2
votes
2answers
44 views

PostgreSQL query slows due to ORDER BY even with an index

I have the following query to find offices that service a given area. When I run this query without the "ORDER BY" clause, it takes a less than 0.1 seconds. When I add the ORDER BY clause, it takes ...
1
vote
0answers
73 views

I am not able to create/reindex a unique index in a table

I have a table that contains user locations (called public.user_location) and is the following: Column | Type | Modifiers id | ...
3
votes
2answers
2k views

PostGIS vs. SQL Server for GIS data

So I'm recently starting at a new company and have a lot of ArcGIS users who seem really keen on going forwards with a PostGIS instance to serve some data to our customers. While I don't have an issue ...
2
votes
2answers
477 views

Adding standard set of constraints (rules) to PostGIS `raster` type column

Following on from my related prior question, let me elaborate this topic a bit. raster2pgsql is a raster loader executable that loads GDAL supported raster formats in PostGIS. It has a -C flag ...
1
vote
2answers
258 views

Creating a unique constraint on a PostGIS 'raster' type column

I am using the following command to add constraints to one of the raster image in PostGIS-2.1.3 (PostgreSQL-9.1.14). ALTER TABLE schema1.table1 ADD CONSTRAINT enforce_scalex_rast unique (rast); But ...
0
votes
1answer
564 views

PostgreSQL 9.3: pg_dump fails due to tiger.direction_lookup

I am trying to dump the schema from one of my PostgreSQL 9.3+PostGIS databases: /usr/lib/postgresql/9.3/bin/pg_dump --schema-only -h stg-db.....rds.amazonaws.com ...
3
votes
1answer
1k views

Problems installing Postgis extension on Ubuntu 14.04

I have Ubuntu 14.04 with Postgres 9.3 and I'm trying to install Postgis extension. One of the most recommended and straightforward ways I found is very simple: sudo apt-get install postgresql-contrib ...
3
votes
1answer
216 views

Very large btree index with few rows (openstreetmap gis data)

I tried to import a subset of open street map data to a Postgres database using the standard tool (osm2pgsql). I then tried to rebuild the indices on the table using plain sql (dropping them, then ...
0
votes
1answer
163 views

PostgreSQL, PostGIS: Copying a schema with a geometry column

According to the PostGIS manual, geometry columns should not by added directly, but using AddGeometryColumn(): AddGeometryColumn — Adds a geometry column to an existing table of attributes. I ...
-2
votes
1answer
1k views

postgres: how to use subquery correctly?

I have the following query CREATE TABLE test_buffslip AS SELECT ST_INTERSECTS( (SELECT ST_Buffer(geom, 0.005) FROM segments where class = 7) ,geom) FROM segments; resulting in ...