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

learn more… | top users | synonyms

0
votes
0answers
9 views

Can't set cache on tilestache

I've successfully installed tilestache on my server and able to load a geojson from it. But when I change the config file to use disk cache, the server return 500 on requesting the tiles. What I add ...
0
votes
0answers
27 views

PosGIS: Longest line connecting point to line

I have a point and around it lines and polygons in the rule of obstacles. I want to connect the point to each of the lines, with a line, such that this connecting line is not intersect any obstacle ...
0
votes
1answer
17 views

Intersection of two vector tables data in postgresql

I have satellite raster data is converted in to pixels using create table gtru_tile_pix as SELECT (ST_PixelAsPolygons(rast)).val, (ST_PixelAsPolygons(rast)).geom FROM ...
1
vote
1answer
39 views

A few PgRouting database design questions

Does someone know how the cost field in PgRouting is calculated? What are 'source' and 'target' good for? 'osm_source_id' and 'osm_target_id' contain the same information using different numbers. Is ...
1
vote
1answer
46 views

Percent total from postgis clip

How would I calculate the percentage of streets that have sidewalks summarized by census tracts using PostGIS. My sidewalks file has an id that links it to its adjacent street and I've worked out how ...
1
vote
1answer
35 views

PostGIS connect points to 1 closing/bounding line

I have this points represented as geom: And when I apply: ST_MakeLine(points.geom) I got this: When I need something like closing/bounding line (and even better the whole area as 1 geom): ...
0
votes
1answer
31 views

PostGIS: Simple query selecting nodes of polygon

I know it's very simple but anyway: (Asked also at stackoverflow) INPUT: Regular OSM buildings .shp table PostGIS Point location RADIUS (around above location), lets say 500m. RESULT: I want to ...
1
vote
1answer
17 views

Tile server return empty features

I have successfully installed tilestache. I also has succesfully add a layer using shapefile from here. But when I tried to use my own shapefile, the server always return empty featurecollection. I ...
1
vote
1answer
22 views

QGIS is not starting because of deleted file libgeos_c.so.1,How can I fix it

QGIS is not starting because of deleted file libgeos_c.so.1,How can I fix it It was originally running but some how I have deleted this file for some porpose installation of postgis for postgress but ...
3
votes
2answers
148 views

How to classify a raster using QGIS Plugin interacting with PostGIS?

I'm developing a QGIS plugin where users can enter some parameters (like distance, depth, area...) and by submiting the plugin interact with a PostGIS database and extract informations form vector and ...
0
votes
1answer
27 views

transform MULTILINESTRINGs to curves in cartodb

I have a table with a column that contains MULTILINESTRINGs, where every string contains the longitude and latitude of a starting- and an end point, e.g.: MULTILINESTRING((97.0253024 ...
0
votes
1answer
24 views

Average distances between two point sets bound by polygon

I have a table of boundary polygons, a table of points and a table of other_points I want to work out the average distance between points contained within and other_points for each polygon. So far I ...
0
votes
1answer
38 views

Couldn't Excute command line PostGIS pgsql2shp

I am using postgres 9.3 with postgis 2.1 on Ubuntu 14. When I tried to dump pgsql table using pgsql2shp, I get the following error. Error: pg_wrapper: pgsql2shp was not found in ...
2
votes
1answer
38 views

How can I export a shapefile from PostGIS with a GeoJSON query?

I tried to export a shapefile from my PostGIS installation using pgsql2shp as follow pgsql2shp -f tiles.shp -h <host> -u <user> -P <pass> <database> "SELECT id, the_geom FROM ...
1
vote
2answers
45 views

Rasters loaded in Postgres/PostGIS using raster2pgsql contain blank lines

I recently set up an Ubuntu Server as a Postgres/PostGIS database server. In an effort to serve a collection of aerial photos to my colleagues, I loaded 608 GeoTiffs (non-overlapping 1km tiles each ...
4
votes
1answer
47 views

Slow Planning for Postgis ST_Intersects

I am trying to run the following query: SELECT * FROM fences where ST_Intersects(geom, ST_GeomFromText('POINT(-73.990452 40.994184)', 4326)) When I run Explain Analyze I get the following: "Index ...
1
vote
0answers
23 views

PostGIS: Compute isovist

I'm using PostGIS with OSM table of buildings. How can I compute isovist from single location point while only the buildings (represnted as geom's) are the obstacles. Thanks,
2
votes
2answers
55 views

how to snap points to lines in QGIS/PostGIS?

I'm attempting to snap approximately 900 points to a line table. I've tried recreating what I have found from a couple of PostGIS answers but not having much luck. To test, I've created two ...
1
vote
1answer
28 views

add geometry to MULTILINESTRING in cartodb

I have a table that contains a column with MULTILINESTRINGS (which are the coordinates from two places (i.e. long0,lat0,long1,lat1), like this: MULTILINESTRING((97.0253024 4.3685491,8.5618685 ...
1
vote
1answer
31 views

Convert Postgresql Polygon to PostGIS POLYGON

I have an existing table in postgres which contains a plain old posgresql polygon. I have added a new column using SELECT AddGeometryColumn ('public','fences','geom',4326,'POLYGON',2); I would ...
1
vote
0answers
22 views

Collect near polygons [closed]

I have the following data: The data have 5 level (in tones blue). I want to collect only the nearest polygons with the same level and sum the number (represent client number). When I collect only ...
1
vote
1answer
50 views

Performance Improvement of Postgres vs PostGIS

I am trying to run the following query thousands of times per second to determine which is any polygon contains the passed in point. SELECT * from areas WHERE poly @> ? Poly is the name of the ...
2
votes
0answers
32 views

How do I optimise performance on a local QGIS + PostGIS installation?

I'm learning how to manage a local PostGIS (ver 2.1) database, with spatial indexing enabled on the shapefiles that I've imported (using the PostGIS Shapefile Import/Export Manager). I have imported a ...
0
votes
0answers
19 views

GeoWebCache Speed SQL Server Store

How to increase GeoWebCache speed, Am using geoserver 2.7.2 for tile cache and data store creating from a SQL Server database it will take 1 day and above to complete cache and it terminated several ...
1
vote
1answer
28 views

How to store multi-valued attributes in PostGis using Postgresql [closed]

I have a with meterid,meterreading,reader and date read.I wish to store this data using Postgis database. I used this code via postgresql to create the table CREATE TABLE MeterRdg( meterid ...
1
vote
1answer
52 views

Converting from kilometers to degrees distances?

We have geometries in a Postgis database with SRID WGS84 and we have found lookups directly in degrees to be much faster than in kilometres, because the database can skip the projections I would ...
0
votes
0answers
12 views

how to use st_intersection() with re-projection in POSTGIS?

This is a shipping route from 'portland to busan' and I want to check the route against land_polygons like how much distance is traveled by a route through land.And the problem is while checking the ...
0
votes
1answer
33 views

Multipolygon From Multilinestring PostGis

I have been looking for a answer for days. I dont even know if its possible. Tried: ST_AsGeoJson(ST_MakePolygon(ST_transform(geom,4326))) ERROR: Shell is not a line ...
0
votes
0answers
24 views

PostGIS dijkstra routing - specifying source and target as bigint instead of int4?

I'm currently working on a problem where I have to use PostGIS's pgr_dijkstra to calculate the shortest route from a starting point to a destination, and then use ST_AsGeoJSON to convert the route to ...
0
votes
1answer
30 views

Alpha Shapes in pgRouting - missing FROM-clause

I am attempting to follow Anita Grazer's post on creating alpha shapes in pgRouting. The article was written several years ago, so some of the functions have been updated and names have changed. I ...
5
votes
2answers
198 views

Password Protect QGIS project

On a shared computer, I have a QGIS project which links up to a PostGIS database that contains my data. If a user wants to access layers from the db, they have to enter the db credentials, so that's ...
0
votes
0answers
10 views

collada2pgsql: importing 3d models into postgis

I have been researching for a tool (open source) for importing collada (.dae) file into postgis and i have found this collada2pgsql command. I really don't know where to find it but it seems to be ...
0
votes
0answers
26 views

Aggregate/merge data upon insert into PostGIS (via gdal)

I am working on a project where I take a large raster file (1.5GB+), put it through a number of image-processing operations, and finally convert it to vector data. Being that the raster is large, I am ...
0
votes
2answers
33 views

PostGIS Multipolygon - holes

I have MULTIPOLYGON in my PostGIS database to store countries (with islands etc.). But I need to add holes to my borders for lakes. How can I store multipolygon with holes? I am using ...
0
votes
1answer
28 views

Getting uploaded shapefile into geometry field on PostGIS table

I am working with a PHP web application where we have a user submitting a ShapeFile. I am able to convert that ShapeFile then to a format of geojson. What I am wondering now is how I can best get ...
2
votes
1answer
35 views

How to set/update columns by using a trigger?

I want to set/update attributes (alignment_horizontal, alignment_vertical) of a PostGIS geometry (point) by using a trigger. CREATE TABLE point ( gid serial NOT NULL, geom geometry(point, SRID), ...
0
votes
2answers
47 views

How can I import a csv file with varying numbers of values per row into postgres?

I am trying to import a csv file into postgres using this statement: COPY T00_import FROM E'C:\\temp\\CSV\\Aberdeen City 9051_20150212_C_01.csv' CSV; The Table T00_import is a simple table with 17 ...
1
vote
0answers
11 views

Shapely's object.project method dealing with overlapping polyline

So I am interested in knowing how far along a polyline a given point sits. Python's shapely package has a method to do such a thing, see the below code: from shapely.geometry import LineString ip = ...
1
vote
0answers
26 views

need to split some linestrings by points

please help me, i'm new in gis 1) i have а table with geom railways, which are multilinestrings (for example there are 2 ways one of which is interrupted, so this way will be multilinestrings ...
0
votes
0answers
19 views

To find a substring of a linestring in postgis to be used in playback in map

I have gps coordinates as point outside the linestring/road. I have interpolated to the closest point in the line using ST_Line_Interpolate_Point(). Now I need to draw line through these points and it ...
3
votes
1answer
77 views

What tools do you recommend to draw historical shipping routes?

I´m working on a project where I have to draw historical shipping routes of trade, whaling, etc. ships from the XIX century. I´ve done some research and checked some questions in this forum but I ...
0
votes
0answers
30 views

How can i create a table in pgAdmin using python?

i am using below SQl query in python cur.execute('''CREATE TABLE Ambhara_Survey (id SERIAL PRIMARY KEY, geom geometry, chalta_no TEXT, ror_area TEXT, ...
0
votes
0answers
27 views

CartoDB “Error loading rows, check your SQL query” & “There is a pb with your connection”

I have been trying to install my own CartoDB server for a few weeks. I succeeded to install each part with no error (after few corrections) with this tutorial. Make check with CartoDB-SQL-API and ...
1
vote
1answer
39 views

How to get bounding box from a postgis database in terms of degrees?

How do you obtain the bounding box for a postgis database in terms of degrees (latitude in degrees and longitude in degrees)?
1
vote
2answers
24 views

Does the Postgis UpdateGeometrySRID function update the column structure as well as the data inside it?

I had to manually insert a geometry from a shapefile which had SRID 0, and my column had SRID 4326, so I had to use the UpdateGeometrySRID function to update my column to SRID 0. I inserted the ...
3
votes
2answers
54 views

Is the PostGIS st_intersection function viable for very large data-sets?

I am running an area intersection query on two large multipolygon tables (a few million rows). SELECT r.geom FROM public.my_table r WHERE EXISTS ( SELECT gid FROM public.my_table_intersection ...
1
vote
1answer
35 views

Set Tolerance in Postgis

is there anyway to set tolerance in Postgis, in Arcgis tolerance is the minimum distance which could separate two points, if the distance between them is smaller than the tolerance so the points are ...
2
votes
2answers
108 views

Cleaning geometries in PostGIS?

I am trying to do some processing on some very large polygon layers. However I am running into various geometry errors such as: NOTICE: Ring Self-intersection at or near point 470396.52017068537 ...
0
votes
1answer
36 views

Import shapfile to Postgis using Python and ogr?

Iam not able to import a shapfile to PostGIS using the same library(ogr). I am using below link but it give me error. Import shp to Postgis using Python and ogr Error : Traceback (most recent call ...
5
votes
2answers
128 views

QGIS expression builder include relation attributes

I have a set of symbols based on a table in postgis such as this id|type|action_1|action_2|geom In QGIS I have this table symbolised using a rule expression which works effectively. However this ...