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

learn more… | top users | synonyms

1
vote
0answers
14 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', ...
2
votes
2answers
43 views

Buffer multiple roads to find points within and compare?

What I am trying to do is buffer a main st and a side street and get all of the points that intersect that buffer, however they need to be mutually exclusive. In the example below, my results would ...
1
vote
0answers
21 views

Is the Azimuth on the equator equal to the one not on the equator? [duplicate]

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 ...
3
votes
2answers
5k views

How to install PostgreSQL 9.2 with PostGIS 2.0 on Ubuntu 11.10 (or higher)?

I have read this question: Install PostGIS v2 for PostgreSQL v9.2, but it didn't resolve my problem. I added the PostgreSQL backports PPA and installed the postgresql-9.2 package, but there is no ...
0
votes
0answers
27 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
10 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 ...
4
votes
1answer
1k views

Union, Dissolve, Buffer — multiple layers, all in one step?

I'm a new user of Quantum GIS (1.7.3) and I need to repeat a task multiple times, so I'm wondering if there is a quicker way to do the following (with three or more polygon layers - each layer has a ...
1
vote
1answer
40 views

Is there a PostGIS function to get a tangent and normal line?

I'm looking for a function that will return a tangent (and normal) for a LINESTRING in PostGIS. I think this is the 3rd time I've come across the need for this function and everytime, I end porting ...
5
votes
2answers
50 views

Working with address data extracted from *.osm

My goal is get all the addresses from a certain country, ideally - from all countries, but for now - only from one. I downloaded an *.osm file from here http://download.geofabrik.de/ for a certain ...
2
votes
0answers
21 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 ...
0
votes
0answers
9 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 ...
1
vote
0answers
17 views

Query PostGIS database without creating primary key [on hold]

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 ...
1
vote
0answers
33 views

Join/append multiple, identical polygon layers into a single layer whilst retaining all attributes?

I have run some analysis (zonalstats) on different raster layers using the same analysis polygons. I want to concatenate all these different layers together, i.e. retain a single polygon and have a ...
3
votes
0answers
30 views

PostGIS - Interpolate point between contours

Using PostGIS, what is the best method to interpolate the z value for points (the orange dot in the image below) located between each contour layer (blue lines and red lines in the image below)? So ...
2
votes
1answer
35 views

<#> doesn't give a useful distance

I'm new to postgresql/postgis and trying to measure a distance. So st_distance() may be the most accurate, it's the slowest too (as I've read). I read that one can use geometric (instead of ...
3
votes
1answer
42 views

Find the closest line vertex from the linestring using PostGIS

How to find the closest line vertex from a linestring? ST_ClosestPoint will give a point which is not from the linestring.
8
votes
1answer
1k views

One to Many Relationship in QGIS with PostGIS

Does anyone know of any tool that can do a One-to-Many relationship in QGIS. I have my data in a PostGIS database. I would like to be able to query spatial layers that are related to spatial or non ...
6
votes
2answers
168 views

How to sample a 3D raster along a 3D path (or 4D raster along 4D path)?

I have a 3d raster dataset of atmospheric variables (lat x lon x altitude). I would like to sample this raster dataset along a 3d path. Any idea how I can achieve this, preferable with qgis or ...
1
vote
1answer
49 views

How to easily remove loose/isolated edges from pgRouting network?

I wondered if there's an easy way to 'clean up' a pgRouting network by removing those edges that do not connect with the global network. Otherwise you risk to end up with cost values of -1, meaning ...
1
vote
2answers
50 views

select intersection of 2 geometries, polygon and polyline

I'm searching how to have a result of 2 geometries (villages and wetland) which don't intersect. When I write: select distinct v.name from villages v , wetland w where ST_intersects(w.geom,v.geom) ...
1
vote
0answers
21 views

Postgis / QGIS Snap Point to Line

I'm trying to snap points to lines in postgis for use in QGIS, but cannot get it to work. I have one line in my line table (although it was created by merging multiple lines together) and about 600 ...
1
vote
0answers
34 views

PostGIS - Intersects feature to split into linestring

I would like to know if it's possible to intersect feature datasets (multipolygon, polygon, multilinestring and linestring) to get a result as a set of linestrings being split at each intersection ...
7
votes
2answers
3k views

What is the best way to do reverse geocoding with PostGIS?

Is there a way to do reverse geocoding with PostGIS? There's a lot of information on the Web but I found it very confusing... I have imported osm data into my own Postgres with PostGIS database. Now ...
1
vote
1answer
12 views

postgis - managing single dataset, multiple coordinate systems

I am setting up a forest inventory database that aims to store information about forest plot data from various countries. The current project is in Mozambique, others are in Laos, etc. Each project ...
5
votes
1answer
387 views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
3
votes
1answer
101 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
3
votes
1answer
29 views

PostGIS ST_ConvexHull for cube corners not as expected

I'm new to PostGIS and am wondering whether ST_ConvexHull will be of use in a particular work problem. Trying out some simple cases to make sure I understand what it's doing, I didn't expect this: ...
6
votes
2answers
315 views

How to avoid duplicate GIDs when copying features from one PostGIS layer to another?

When I enter new elements (features) in another Postgres layer, I can do it in two ways: Drawing new element(s) (with 'Add feature') which I do rarely or Copying (or cutting) some elements from ...
0
votes
1answer
147 views

error printinf pdf in opengeo suite client sdk app

I am using OpenGeo Suite 3.0.2 I created an app using Client SDK. Stored the raster and vector data on postgreSQL/PostGIS print tool is not working, giving error i.e. "Java.io.IOException: the ...
3
votes
1answer
42 views

How to model a geodesic grid in PostGIS?

Abstract I've decided to use PostGIS for a hobby game project. It requires a lot of units allocated on the surface of a planet. I'd like to model not only the units (simple points), but also their ...
3
votes
1answer
768 views

How to use the pgRouting TSP function?

For more than two days I'm trying to make the TSP algorithm work in PostgreSQL/PostGIS. My problem seems to occur when I'm trying to take into account the road network for TSP algorithm. I know that ...
0
votes
1answer
34 views

Conflicts while installing postgresql9.3-postgis2.1,QGIS and gdal-bin

I want to use postgresql9.3-postgis2.1 and gdal-bin parallel . I have refer instruction here for installing postgresql-9.3 on ubuntu 12.04. I have install qgis from here While installing gdal-bin it ...
1
vote
1answer
114 views

Error in displaying wfs layer from mapserver/postgis

I have read and tested all the relative posts but I still don't have a solution for my problem. I have a layer suscribers (points) stored in postgis database with srid=32232. I would like to display ...
1
vote
2answers
82 views

adding geometries to a source, target table for multiple rows in pgrouting

I am having an issue trying to perform the pgr_dijkstra algorithm and getting back a line in my table for multiple rows. I have a table that has a columns of source, target node id's but I cannot ...
1
vote
0answers
24 views

Postgis Raster Unions Color Issues

Can someone explain to me what I am doing wrong here as I think I do not properly understand postgis raster bands. I have a set of geometries that I want to merge with a raster and created a raster ...
0
votes
1answer
16 views

Trouble installing PostGIS PlugIn for OpenJump

I’m trying to install PostGISPlugin version 1.52 in OpenJUMP 1.7.1 release 4004. I moved the JAR file into my installation’s lib/ext directory, but I’m not sure how to access the plugin-specific UI ...
0
votes
2answers
98 views

Import shapefiles on my postgis table using R

Using R, I would like to import shapefiles that are in a directory on a geometric table i have on postgresql / postgis. What is the instruction that allows me to do it? EDIT: here is my code to ...
2
votes
1answer
27 views

SDO_Inside equivalent in PostGIS for 3D objects

I am looking for a solution for querying a point whether it is located inside a 3D object or not. If the point is located on the surface of 3D, I could use ST_3DIntersects or ST_3DIntersection. But, ...
2
votes
1answer
154 views

Geoserver configuration for large layers

I'm having problem with geoserver configuration. Currently I'm running geoserver 2.4 on CentOS and Tomcat 6 with 24 cores CPU and 48 GB RAM. I have uploaded 4 layers to PostGIS (PostgreSQL 9.3/PostGIS ...
0
votes
1answer
383 views

SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'); not work

I'm using using OSgeo 6.5 dvd and studing pgrouting workshop (link) for get shortest path. I created network topology call "pgrouting - workshop". There are three commands to execute in section 5.2 ...
1
vote
1answer
27 views

Merge polygon based on other line shape file PostGIS

I have a polygon shape file and a line shape file. I would like to merge two polygons which shares the same border along with line shape. Finally the line should be removed in polygon shape file. In ...
2
votes
1answer
175 views

Using ST_MakeEnvelope over the dateline

I'm using ST_MakeEnvelope in PostGIS to try and make geometries that cross the international dateline, but they are making a shape that wraps the other way around the globe. The geometry I want is ...
6
votes
3answers
1k views

Can Polygons be generalized to MultiPolygons in GeoDjango?

I set up a model with models.PolygonField in geodjango, using postgres as database. I try to import shp into postgres. The problem is, shp (compiled with QGIS) mixes polygon and multipolygon, hence it ...
0
votes
1answer
14 views

Postgis make error on MacOS

I could compile it with the following command on Macbook mavericks. ./configure --with-sfcgal=/usr/local/Cellar/sfcgal/1.0.4/bin Then, I receive following results along with lists: PostGIS is ...
3
votes
2answers
6k views

Click a marker icon to open a pop-up, using OpenLayers

Background Looking to create a pop-up that performs an Ajax request when the user clicks a marker on an OpenLayers map. The markers, however, have different icons. The following is working code that ...
0
votes
2answers
142 views

How to get the linestring of a way in postgis with pg_snapshot schema

I have loaded some data from openstreetmap using osmosis and its pg_snapshot schema. This results in a table wayswhich contains a list of nodesreferenced by their ids: select w.nodes from ways as w ...
2
votes
2answers
59 views

Problem with running PostgreSQL 9.3 after installing pgRouting

I have PostgreSQL 9.3 installed on the server. It worked just fine. I also had a webservice which connected to a database. That also worked like a charm. Later, I decided to install and use pgRouting. ...
0
votes
0answers
32 views

Connect to PostgreSQL from ArcMap 10.2 failed [duplicate]

I have a database server PostgreSQL and Postgis. I want to connect to database from ArcMap 10.2 , I tried Add Database Connection from arcmap menü. I typed my connection informations and clicked ...
1
vote
3answers
47 views

How can I insert a bounding box or polygon in a PostGIS geometry field?

I have a field in my table called 'geometry' that was created thus: CREATE TABLE "public"."sites" ( "id" int8 DEFAULT nextval('sites_id_seq' :: regclass) NOT NULL, #... A few MORE fields ...
1
vote
1answer
37 views

Is MongoDB more suitable than PostGIS as backend for geo-enabled Django website?

I am trying to select a backend for a geo enabled website written in Django. Is MongoDB an easy possibility or stick with PostGIS? What are the key considerations to choose one or the other if ...