Version 2.0 of PostGIS brought a heavy set of new extensions for the PostgreSQL object-relational database, adding greater support for spatial objects.

learn more… | top users | synonyms

1
vote
0answers
23 views

Error saving polygon with hibernate spatial and postgis

I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin. Caused by: ...
3
votes
0answers
24 views

Loading raster data into postgis database

i would like to add raster data to my postgis database. when i try to check if postGIS is responding to requests using the following command psql -c "SELECT PostGIS_Version()" ,i get an error message ...
0
votes
1answer
20 views

Delete all data from a PostGIS topology

I need to delete everything (faces, nodes, edges, anything I'm not thinking of) from a PostGIS topology, but I want to keep my database schema (schemas, tables, columns, sequences, etc.) intact. Is ...
0
votes
0answers
48 views

Importing a Raster into PostGIS 2.1 (Windows 7)

I am trying to learn how to import rasters into PostGIS (2.1). I have read through all the material I can find on doing this and know that the recommended tool for this is the raster2pgsql tool. I ...
1
vote
2answers
51 views

How to update PostGIS 2.1 to use `ST_DelaunayTriangles()`

The error "lwgeom_delaunay_triangulation: GEOS 3.4 or higher required" arrives on my terminal, running psql with SELECT PostGIS_Lib_Version(); -- 2.1.4 SELECT postgis_version(); -- 2.1 USE_GEOS=1 ...
2
votes
1answer
35 views

How to populate geography point using ST_MakePoint(long, lat)

I have a table called customer_campaign, and there is an empty column geom(geography) in it. So I want to fill it up by using ST_MakePoint(long, lat) in PostGIS, lat and long are two columns in the ...
0
votes
1answer
16 views

Is PostGIS-2.x raster in text format (WKT) only?

I was reading PostGIS FAQ and this tutorial. From all that I can tell, it seems that PostGIS raster is a text format, i.e. WKT or well-known-text. I was wondering if PostGIS raster data are ...
1
vote
0answers
37 views

Does qgis support postgresql range types?

I added a postgis layer with date range column in Qgis but that field is not listed in Qgis.
1
vote
1answer
22 views

Only my geometry layers are exported from spatialite to postgis

I have a spatialite database (v4.1.1 / SQlite v3.7.17) consisting of one geometry table and several attribute tables linked to the geometry table by foreign keys. I want to export all tables to a ...
2
votes
1answer
26 views

How to make my PostGIS vector layer in QGIS visible?

I have loaded a shp file (simple polygon with one entry) into PostgreSQL 9.3 (with extention PostGIS v2.1.3). I now want to load this layer into QGIS (v2.2.0 Valmeira) via the "load Postgis layer) ...
0
votes
0answers
12 views

What do pixeltypes in PostGIS raster mean?

I'm trying to build a raster in PostGIS from a vector layer and I was curious as to the meaning of pixeltypes in the raster geometry? How does it effect my raster?
1
vote
1answer
21 views

Collecting multipolygons into a single multipolygon with ST_Collect() in PostGIS

I would like to collect 50,000 individual multipolygons into one big multipolygon. Unfortunately when I perform ST_Collect(geom) it bundles them into a geometry collection and cannot be cast as ...
1
vote
1answer
48 views

PostGIS query losing geometry column information

Using PostGIS I want to collect all attributes into one polygon. The old table looks like this: Column | Type ---------+------ xyz_cols | `xyz` geometry | geometry(MultipolgyonZ, 2193) Performing ...
1
vote
0answers
53 views

How to count the number of coordinates within x meters grouping by distinct ids?

I have a table "items" of about 1 million rows and 40.000 distinct ids like the following: idx | id | point | lat | lon | the_geom 1 | 1 | 76 | 51.463388 | -0.16869856 | 0101000020E... 2 | 1 | 53 | ...
1
vote
0answers
22 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
0answers
36 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 ...
2
votes
2answers
194 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. ...
1
vote
1answer
59 views

raster2pgsql does nothing

I try to load rasters through raster2pgsql. I try to call it through pgAdmin command line, but when I call any raster2pgsql command (even raster2pgsql -G), it does nothing, I just get another line to ...
1
vote
1answer
60 views

PostGIS: ERROR: lwpoly_from_lwlines: shell must have at least 4 points

I have achieved to close lines in order to build a polygon with: st_addpoint(st_makeline(geom ORDER BY .cd_noseq), st_pointn(st_makeline(geom ORDER BY cd_noseq), 1)) but then, when I try to make a ...
1
vote
1answer
46 views

Implementing Wrapper of PostgreSQL?

How can I implement the Wrapper of PostgreSQL? I found this useful looking wrapper from a FOSS4G routing with pgRouting Workshop but I do not know how to implement it!
1
vote
1answer
46 views

postGIS: what is more efficient: single or two-point search

I have seen different approaches to conducting searches. Which is the best approach in storing the data for database efficiency: saving both longitude and latitude points longitude latitude vs ...
3
votes
2answers
61 views

problem merging polygons based on a column value - using Spatialite

edit: as I am unfamiliar with any tools I decided to try my luck with PostGis. I imported my data. and executed the query : create merged as select delomrade_code, st_union(geometry) from grunnkrets ...
4
votes
1answer
68 views

Binary insert into Postgis geography column results in value being inserted as geometry

When writing WKB as a value (and as a binary parameter) to a geography column, the persisted value is not geography. Example Java is also available here: ...
1
vote
1answer
29 views

Local Coordinate System

I am currently evaluating the use of PostGIS (version 2.0) for: a project that will store 3D coordinates (x, y, z) data the data will have it's own local coordinate system which does not correspond ...
0
votes
1answer
63 views

Routes Consult with pgrouting / openlayers [closed]

I'm starting with pgrouting. After suffering a bit unable to put the data in osm postgis using osm2po with the excellent tutorial http://anitagraser.com/2011/12/15/an-osm2po-quickstart/ ran the sql ...
0
votes
1answer
26 views

Not empty geometry having blank text

i'm having problem with geometry column, for some rows i have geometry with blank text, this query will describe more the problem : select geom, ST_AsGeoJSON(geom), ST_Isvalid(geom), ST_IsEmpty(geom) ...
0
votes
1answer
28 views

Expression with postgis

I'm using mapserver and PostGis and I want to draw a geometric table in mapserver. The trouble is when I connect mapserver to PostGis and I want to draw the objects but in different colours. I mean I ...
0
votes
2answers
64 views

UpdateGeometrySRID and ST_Transform are the same thing?

UpdateGeometrySRID actually transforms the coordinate system of my data? For in the PostGIS documentation it appears the trim ST_Transform (Returns a new geometry with its coordinates transformed to ...
0
votes
0answers
55 views

Function ST_Transform postgis 2.0

I've read many forum posts on the function ST_Transform but unfortunately was unable to resolve my doubts so I posted a new question. I have a spatial table SRID = 101010 and want to transform it to ...
0
votes
1answer
37 views

Empty geometry resulting from pgrouting function

Let me start by saying I'm assuming I'm missing something very silly but I can't see it. I have a table of points and I'm trying to generate a polygon around each point that estimates a maximum of ...
1
vote
2answers
102 views

Find out whether geography point lies within geography bounds

I have three points: Point A Point SW Point NE I want to know if Point A resides within the bounds determined by points SW (for south-west coordinates) and NE (for north-east coordinates). I've ...
2
votes
1answer
79 views

Is there any random data generator supporting geometry in PostGIS?

I found few random data generators for PostgreSQL (such as this one), but none supporting PostGIS geometry type, other than point. Making points would be quite easy, but for lines with multiple nodes ...
0
votes
0answers
75 views

within using Hibernate Spatial

I'm doing this query using postgis and working properly SELECT "public".zona."id", "public".zona.zts FROM "public".zona WHERE ST_Within ( Geometry ( st_GeographyFromText ...
0
votes
3answers
158 views

ST_transform postgis

SQL within that zone is a point SELECT "public".zona.zts FROM "public".zona WHERE ST_Within ( ST_Transform ( ST_GeomFromText ( 'POINT(-30.033514 ...
1
vote
1answer
113 views

How to have PostGIS 2.1 and the Python osgeo library installed together without compiling from source?

My python application makes heavy use of the osgeo library. We're looking to upgrade from PostGIS 1.5 to PostGIS 2.1, and I'm having issues. I'm installing packages from the Ubuntu GIS PPA. Before, ...
0
votes
0answers
32 views

rasterize a geography polygon using postgis 2.1

I am still bit new to Postgis 2.1. I am trying to rasterize a polygon, meaning that I have a polygon of Syria and I want to create an empty raster that contains the shape and geography reference of ...
1
vote
1answer
40 views

Break line into 100m segments

I have a line geometry in PostGIS and I am wondering how I would break the line into 100m segments. Is there a function for this?
0
votes
0answers
47 views

pgrouting pgr_drivingdistance() query gives inconsistent results

So I have been working on a query(with the help of other stackexchangers :)) to get the edges in an isochrone from a particular point and then update the count_events field of those edges by some ...
0
votes
0answers
59 views

Displaying 3D city model from PostGIS 3D backend

I know that openlayers doesnt support 3D yet. I heard about Kartograph has 3D features but Does Kartograph support reading data from backend database especially PostGIS? I would like to create a 3D ...
0
votes
1answer
82 views

How can I find the segment of a line that lies within a polygon using Postgis?

Given a "road", represented by a line, that crosses a "state", represented by a polygon: What is the SQL query I can use to find the segment of the road that is within the state? A concrete example. ...
0
votes
2answers
68 views

How to select the cross streets in postgis spatial table?

I've used ST_Intersects and ST_Crosses but between two different tables. I have a table of streets and intersections want to know them. For example select all streets that cross the Street A. Can ...
0
votes
1answer
42 views

query to get predicted location after traveling on pgrouting route for some hours, postgis 2, postgresql 9.3

I am using Postgis 2.0 on Postgresql 9.3 on Ubuntu 14.04 x64. I am trying to find an efficient way to fulfill this routing request. So I am able to get the shortest route using the source and target ...
2
votes
0answers
99 views

how do I create a RESTful PostGIS web Service Framework?

I have PostGIS tables that store vectors that want to show on Google Maps. Read the post http://gis.stackexchange.com/questions/22354/how-to-display-a-postgis-table-on-google-maps But one thing that ...
1
vote
0answers
36 views

Import raster to postgis and add a foreign key constraint

I use raster2pgsql to import raster files into a table with this command line: C:\Program Files\PostgreSQL\9.3\bin>raster2pgsql -s 4326 -M -F -a c:\temp\mun.tif public.basqui_raster | psql -U ...
1
vote
3answers
46 views

PostGIS2 have automatic BBOX indexing?

I need to compare millions of geometries by the && operator (BBOX). When CREATE TABLE see geometry type on PostGIS2, it do also something like INDEX ON t USING GIST(g)? or I need to express, ...
0
votes
1answer
58 views

Get latitude and longitude of each point forming a MultiLineString

A MultiLineString is formed by a sequence of points and each point has latitude and longitude. Use the sql below to get the latitudes and longitudes of each point so that my MultiLineString: SELECT ...
-1
votes
1answer
164 views

how to build and install pgrouting-2.0 on postgresql-9.3 on ubutntu 12.04 Lts precise?

I try to build following instructions from this link https://github.com/pgRouting/pgrouting after downloading from the github. I have done the cmake command and there is my error output: ...
2
votes
1answer
93 views

PostgreSQL : how do I make this sum [closed]

I have this huge table with all the addresses of my country in it. Every house is an object, and there is a column for the streetname (or street ID) and a column for the housenumber. I want to make a ...
1
vote
2answers
64 views

How can I speed up these queries

I am trying to make some calculations using PostGIS and PostgreSQL. There are 3 important tables : wbn, wgo and wvb. These tables have about 500.000 objects in them (geometries). The problem is that ...
1
vote
0answers
41 views

PostGIS 3D Extrude function

I selected buildings from OSM (which represents my city). I insterted a new column 'height' and I filled with a random number exactly number 2, so every building have 2metres altitude. Buildings are ...