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
2answers
199 views

Extract a LineString from LineString by two Points

I am using PostGIS2.0 and PostgreSQL9.3. I have LineString in Spatial-Ref 4326 like geom:= ST_GEOMETRYFROMTEXT('LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 ...
3
votes
0answers
61 views

Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. ...
0
votes
0answers
86 views

Error while executing Populate_Geometry_Columns() Postgis

I loaded data into postgis using easy loader(MAPINFO). Now when I run SELECT * FROM Populate_Geometry_Columns() I get error : WARNING: Could not convert '"SP_GEOMETRY"' in ...
0
votes
1answer
105 views

postGIS (?) - ST_Difference preserving attributes

EDITED QUESTION: PROPER SYNTAX FOR ST_DIFFERENCE BETWEEN TABLES? I have two huge polygon datasets from shapefiles, call them 'baselevel' coverage and 'deluxe' coverage. They each contain over 2.4 ...
2
votes
2answers
2k views

Error when trying to run Create Extension postgis

I have installed PostgreSQL 9.x and PostGIS 1.5/2.0 several times and have never had this problem. I just got a new CentOS 6.3 server up and running and and I have Postgres 9.3 functioning as ...
0
votes
2answers
81 views

Change column order in postgis 2.0

Is it possible to change the column order of a table in postgresql/postgis 2.0? If so, how is it done?
2
votes
1answer
340 views

How to save data from QGIS 1.8 to PostGIS without shapefile intermediate?

Is it possible to save data directly into an existing PostGIS database from QGIS without having to first save it as a shapefile? I know about the SPIT plugin but that requires a shapefile. I want to ...
0
votes
1answer
144 views

Error 'Invalid geography. Antipodal edge…' with Postgis

I have a table in postgis like this CREATE TABLE locations (id int, name VARCHAR(255), pos geography(POINT, 4326)); with a couple of points. E.G. INSERT INTO locations (name, pos) VALUES ...
0
votes
0answers
60 views

Import PostGis osm2po data to spatialite db

I would like to import a table form my postgis SQL database into a spatialite db. I created a new db in spatialite and wanted to create also the used table. But I got an error by using LineString. ...
1
vote
1answer
113 views

Is postgres 9.1.9 supported by ArcGis 10.1 Service Pack 1?

I want to install Postgres and Postgis. Now we use ArcGis 10.1 So I install Postgres 9.0.5 But there is not exist Postgis for this version. I try install postgis 2.0.3 But I fail(it is only 32 bit ...
4
votes
2answers
406 views

Why is any pgr_* routing function taking forever based on OSM data in an pgrouting enabled DB

I loaded the German OSM dataset into the pgrouting DB by using osm2po 4.7.7. Everything works fine i have osm2po set up via it's config and it's working like a charm through it's Java part. I had the ...
3
votes
1answer
498 views

osm2pgsql loses connection at end of import for large PBF, north-america-latest.osm.pbf

I just wanted to check and see if anybody else out there encountered this issue before I started diving into the code. I'm using osm2pgsql to import OSM data into my Postgres database. I encounter the ...
1
vote
3answers
114 views

PostGIS intersect on insert?

I have a large amount of point data that I have in CSV form. I am able to insert it all into a PostGIS table no problem. What I want to do though, is split the data up on insert into multiple separate ...
1
vote
1answer
136 views

Calculating area of MultiPolygons within 250m buffer of points

I am using using PostgreSQL 9.2 and PostGIS 2.0. I have two tables: 1) a geocoded table of home addresses (address_list) and 2) a table containing data on tree density in the same geographical area. I ...
0
votes
2answers
90 views

What queries can I use to select data?

Which queries can I use to select the following information: How many towns are within a distance of 3km of both a road and a railway and are within 6km of the coast? And any towns that have both a ...
1
vote
0answers
237 views

How to use pgRouting (pgr_drivingDistance) with GTFS?

I used gtfs2pgrouting to import gtfs data in postgresql, then I have these tables List of relations Schema | Name | Type | Owner --------+-------------+-------+---------- gtfs | ...
4
votes
3answers
375 views

What does the “service” box in the PostGIS connection dialog stand for?

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB. QGIS Lisboa and Postgres are installed.
1
vote
0answers
512 views

“Schema does not exist” error trying to load raster using raster2pgsql

I receive a "schema does not exist" error when trying to load a raster to a PostGIS database (see full error at the bottom). The schema does exist in the database. This is the syntax I'm using: ...
1
vote
1answer
146 views

Can't view PostGIS rasters after changing schemas

I have loaded a few rasters into the Public schema of a PostGIS 2.0 database. Using the db manager in QGIS 1.8.0 I can add the rasters to the map canvas. After moving the rasters to another schema in ...
1
vote
1answer
162 views

Travelling salesperson in pgRouting without starting point

I'm a beginner with PostGIS and it's the first time I try pgRouting. I work for a regional transit agency and I'm trying to develop a mean to evaluate the easiness or difficulty to offer a bus ...
0
votes
0answers
82 views

Routing from individual start point to individual destination point

I'm doing routing on android using OpenStreetMap. The routing is working well. But the problem is that I do not know how to use the individual points of the user. I use osm2po to convert the OSM data ...
4
votes
3answers
350 views

Very poor performance of QGIS and PostGIS2. User error or feature?

I have a large table in Postgis2. It has >500 million polygon, line and point features all happily living in there and the table performs brilliantly in other GIS. I am now trying to just add that ...
1
vote
1answer
532 views

PostGIS Select Union of Polygons

I have a Postgres 8.4 PostGIS 2.0 enabled database and I've loaded it up with a bunch of shapefiles. I'm trying to get the database to do on-the-fly unions of geometries. Here is the query I'm ...
0
votes
0answers
70 views

osm2pgrouting can't get ways.the_geom srid

When I try to launch osm2pgrouting osm2pgrouting -file ~/Téléchargements/mayotte-latest.osm -conf /usr/share/osm2pgrouting/mapconfig.xml -dbname routing -user gisuser -passwd fred1490 -clean I get ...
0
votes
2answers
321 views

How join attributes for point feature from nearest points in road network

I have two layers: 'linear' - road network and 'point' - points in each linear features intersections. Point layer have in attribute table name for each point features: A,B,C,D,E,F, etc. How add in ...
1
vote
0answers
98 views

PostGIS raster functions aspect and slope slow

I am trying to compute the raster and slope values from a DGM table (8184 x 5159) imported from tif file tiled in 500x500 tiles. In my query in which I merge the DGM table with a vector (point type) ...
2
votes
0answers
120 views

Hitting Memory Limits of PostGIS ST_ConcaveHull / Incomplete Shrink Wrap

I am trying to use PostGIS 2.0 on Postgres 8.4 to do some mapping. I am working with the NOAA Shapefiles, specifically their US States & Territories file located here: ...
0
votes
1answer
153 views

Help loading Raster to PostGIS 2 .0

Similar questions have been asked, but since my reputation is not enough I am unable to comment on answers. (The following is from an answer by nickves for this question Loading raster data to ...
2
votes
1answer
52 views

Compare features in PostGIS with updating attributes

I have two polygonal layers: "existing" and "modified". Attribute table of "existing" and "modified" layers have same column "feature_id" - number of feature. Please help me create query which write ...
2
votes
1answer
66 views

How to compute the distance from the beginning of a line for every points using postgis

I have a line, for which I need to know, for every point that compose it, what is the distance from the beginning. The data is stored in PostGis 2.0 For example, for the line with the point a, b, c, ...
0
votes
1answer
518 views

How to find the intersection point of polygon geometry and multilinestring geometry in postgis

I have a polygon geometry and multilinestring geometry. How do i find the intersection of both these geometries. Both the geometries are in same reference system. Does st_intersection gives me the ...
3
votes
1answer
57 views

Speeding up raster to point set function

I have written the following function that takes a raster (always non-skewed) and returns a set of points. As I'm executing it millions of times in my queries, I'd like for it to be super-optimized ...
3
votes
1answer
225 views

For which operations a PostGIS Geography index is useful?

I need to do KNN- and within-region queries for POI data. I store the POI locations in a geography column. Since I understand that ST_DISTANCE doesn't use the geography index, I added a geometry index ...
2
votes
0answers
52 views

Optimize ST_CoveredBy performance

I have a PostGIS 2.0.3 table with 113,862 records with multipolygons represented both as geometry and geography. There is a gist index on each of them. I'm running the following queries: SELECT *, ...
0
votes
0answers
55 views

pgRouting Win 7 installation problem

I have run into a problem installing pgRouting. Following Anita Grasers guide, I have gotten as far as to execute the three .sql files. The first sql file (routing_core) runs fine, but for the second ...
0
votes
1answer
184 views

How to calculate x, y, z, m in Postgis

Somebody know how can I calculate the x,y,z,m parameters from a MultiLineStringZM in Postgis? I would like to know x,y,z and m from the points what are made the polyline. When I try calculate it by ...
0
votes
1answer
45 views

Difference between st_length() and st_m()

My question is about the differences between st_length() and st_m() in postgis. The reason I ask this is because in a MultiLineString I can´t calculate st_m(), but I can st_length(). Thanks.
3
votes
1answer
76 views

Force a collection of unknown number of points to be a polygon

I am working with point clusters and want to create the rough shape of the cluster in the form of a polygon using ST_ConvexHull(). I'm having problems with single outliers though, as they don't ...
1
vote
2answers
49 views

Does OSM2po handle squares and places?

OSM2po is converting data from OSM to postgresql. But how is it handled with places or squares? Not every places, square has pedestrian way routes on it. But for routing I need nodes and pedestrians ...
0
votes
1answer
196 views

Why postgis st_overlaps reports Qgis' “avoid intersections” generated polygon as overlapping with others?

I am implementing a postgis trigger on polygon layer to check and reject newly created polygon if it overlaps others. The problem shows when I digitize new polygons adjacent to others in Quantum GIS ...
1
vote
1answer
281 views

how to split a line by a point which is on the line but not in the linestring itself?

i need some help with the following: i have a linestring - geom i have $lat,$lon (using some php syntax) i have an osm table with the roads geom, i am trying to get closest point, and then split ...
1
vote
0answers
85 views

Working with ambiguous AddGeometryColumn functions

I'm using PostGIS to add geometry columns to tables, but keep receiving the error: ERROR: function addgeometrycolumn(character varying, character varying, integer, character varying, integer) is not ...
1
vote
1answer
2k views

How can I enable PostGIS Shapefile and DBF Loader 2.0 plugin in PgAdmin III?

I am on Windows and I want to download/enable the plugin "PostGIS Shapefile and DBF Loader 2.0". I installed PostGIS 2.0 using StackBuilder of PostgreSQL installer.
1
vote
0answers
41 views

How to load a raster from in-memory bitmap (not from file) into PostgreSQL

I have a bitmap in memory that I would like to load as a raster to PostgreSQL. An unfavorable option is saving the bitmap to file and then use raster2pgsql, but as we have several cameras that ...
1
vote
0answers
73 views

Unable to Add Features to PostGIS Layer in Quantum GIS 2

I am testing out Quantum GIS 1.9-master and I've noticed that I am only able to add features to a PostGIS 2.0 layer if that layer is in a schema with the same name as my login. For example, if my ...
0
votes
1answer
315 views

ST_Touches for more than just one geometry

I'd like to select some neighbor polygons with ST_Touches. Therefore I found the following statement: SELECT b.name FROM layera as a JOIN layera as b ON ST_Touches((SELECT a.geom FROM layera as a ...
1
vote
1answer
409 views

How to populate the geometry column in a PostGIS table?

After loading a polygon shapefile into PostGIS, the geometry column (geom) is blank for several features. In one case, only a single feature has the geometry calculated and all others are blank. I'm ...
1
vote
2answers
261 views

Start postgresql+postgis without installation on Windows

I have used Windows7x64 and want start PostgreSQL+POSTGIS without installation process. I copy PostgresSQl\9.1 folder from other laptop to c:\opt. I need create .bat file with enviroment variables and ...
1
vote
2answers
462 views

Trigger to fill attributes (data, client ip) in table for each new objects, PostGIS

In PostgreSQL/PostGIS database stores shapefiles. Client users software - QGIS. Please help me write PostgreSQL/PostGIS trigger, which for each newly added/updated feature in layer added 'time create' ...
0
votes
2answers
179 views

PostGIS, distance between two users

I have a simple table (location_test) with three column (name, geom , jid). geom is a geometry column with SRID 27700. I set the user's geometry position with: UPDATE location_test SET geom = ...