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

0
votes
1answer
84 views

PostGIS Transform distance or create a view

I have a postgis table that is updated on a regular basis so it is not practical to cast my geometry column to geography So can I modify the following query to convert a distance say 0.5k into ...
0
votes
1answer
77 views

Installation extension functions to pgRouting

I'm trying to find sql source of functions routing_dd.sql and routing_dd_wrappers.sql I'm working on Windows 7 32bit. The only one link to that wrote by Underdark is empty: Both are available ...
5
votes
0answers
90 views

What PostGIS [topology] provided tools may be used for data quality assurance?

I'm learning about techniques to ensure GIS data quality. Googling around, I've found a few papers about theory and best practices (here and here), and a couple of short presentations about the topic ...
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
1answer
51 views

What is the complexity of neigborhood search in PostGIS?

I have a point with coordinates x and y. I want to know all the points in a square around this point, with side L. For this, in postgresql/PostGIS, I use: SELECT * FROM table_of_points WHERE ...
3
votes
1answer
320 views

osm2pgsql: Import data in custom projection

I have osm-file and I want to import it to the postgresql via osm2pgsql with custom projection EPSG:20022. I look to the help and found out any keys like -E EPSG: but when I try to do with it I get ...
2
votes
1answer
365 views

PostGIS: Calculate the length of just the portion of linestring that intersect with a polygon

I want to calculate the portion of the linestring that lies within the limits of a polygon. Better with an image What is the length of the portion of linestring within Province A? and within ...
4
votes
1answer
201 views

Update PostGIS after updating GDAL?

I am using PostGIS 2.0 and I want to use the raster functionality through mapserver. It seems as if the latest official GDAL release 1.9.1 has an unstable PostGIS raster driver, as pointed out in a ...
1
vote
2answers
1k views

How to find the nearest line from a point?

I have a table of Roads in PostGIS which geometry is "geometry(MultiLineString,4326)". Its attribute are gid osm_id name ref type oneway bridge maxspeed geom Now i want to know ...
7
votes
2answers
2k views

Postgis 2.0 upgrade problem with postgres data [SOLVED]

I have a serious problem: on Wednesday, April 2 OpenSUSE 12.1 is updated, and the package was to update the PostGIS-a version 1.5.3 to 2.0.0. After this operation, Postgres does not display records. ...
0
votes
1answer
193 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 ...
1
vote
2answers
1k views

What is the unit used in ST_Distance()?

I wonder what the unit is of the float being returned from ST_Distance. In the documentation it says: ...cartesian minimum distance (based on spatial ref) between two geometries in projected ...
0
votes
1answer
25 views

How to join two LinestringM into one without dropping M value?

I have, for example, two Linestrings with M value: LINESTRINGM(1 0 2, 2 0 4, 4 0 7) and LINESTRINGM(4 0 7, 6 0 9, 10 0 10) How can I merge them into one Linestring and preserve the M value? Expected ...
18
votes
1answer
2k views

Comparison of geocoding solutions (such as Gisgraphy & PostGIS 2.0)

As I am sure many of you are aware, PostGIS has finally released Version 2.0 and included within this version they have also built a geocoder (see: http://postgis.net/docs/Extras.html). Although I ...
9
votes
1answer
472 views

How to get the length of a line inside a polygon

How can I get the length (brown marked part) of the "Road 7" inside the red polygon? My start: SELECT ST_Length(way) FROM lines WHERE road = "Road 7" AND ST_Intersects(line, polygon)? With that, ...
7
votes
6answers
2k views

Unable to connect Postgis from QGIS 1.8.0

I have installed PostgreSQL and PostGIS on my laptop (Win 7 64 bit OS). I am running QGIS 1.8.0 on my machine . When I am trying to connect Postgis I am getting connection failed error then I tried ...
0
votes
1answer
205 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
2answers
198 views

Postgis 2.0 - How to get a Point from given LinestringM and a measure?

If I have a cable route linear referenced and stored in a LinestringM with M value is the length (in meters) from the start of the route - for example: LINESTRING M (0 0 0, 10 0 20, 12 0 40, 20 0 50, ...
0
votes
2answers
66 views

Adding shp files to PostGIS in QGIS 2

I followed this tutorial to set up Postgresql 9.1 and PostGIS 2 on my Ubuntu Server 12.04. I also installed pgAdmin III on my Windows 7 client. I set up a database landarch and user chadmwade, ...
0
votes
0answers
96 views

Split lines at polygon intersection with attributes saving

This relates to this question but what about keeping the attributes. Having line_layer (id, geom, attribute1, attribute2) poly_layer (id, geom, attribute3, attribute4) How do I split the lines ...
0
votes
1answer
51 views

pgrouting 2: missing pgr_findnearestnodedwithin function

With the PgRouting 1.5 I was using the find_nearest_node_within_distance function and it works, but now I'm moving the project to PgRouting 2 + Postgis 2 + PostgreSQL 9.1, and now that function, I ...
0
votes
1answer
237 views

Pgrouting functions and geoms type not found. Install failed?

I have installed a postgresql 9.1 and postgis 2.0 from source. I couldn't launch this : # Add pgRouting launchpad repository ("stable" or "unstable") sudo add-apt-repository ...
1
vote
0answers
41 views

Selecting a bounded area within a raster

I am new to postgresql. I have imported a 256kb sample raster (.tiff) into postgres with tilesize 100x100. Now I need to select the area (rectangle) from the center of the image using sql query. Then ...
0
votes
0answers
45 views

Django application “GeoNode” gives message “DLL load failed” on windows

I'm trying to install GeoNode which is a Django application on windows through these simple steps on this page. I've reached a point where is the GeoNode is installed and I've created my postgres ...
0
votes
1answer
111 views

How to run ST_Intersects on a geometry from text and an existing table

I am developing a location based application that stores longitude and latitude coordinates in a string. I then (using PostGIS 2.0) need to use these coordinates and run ST_Intersects on it with the ...
1
vote
0answers
38 views

Is it possible to have run-time dynamic table updates to visualization using javascript interacting with postgis and geoserver

I have an idea of/have seen implementations, of dynamic map retrieval/updating using wms on openlayers by using updates to a postgis database which was hooked into geoserver and having a refresh ...
0
votes
0answers
16 views

Can't connect QGIS 2.0 to postgresql 9.3 remote server with postgis 2.1 [duplicate]

I am trying to connect qgis to my postgresql server using the add postgis layer option in qgis dufour. I am not getting any details from qgis other then 'connection failed check settings.' However, ...
0
votes
1answer
80 views

Difference between azimuth degrees when i use st_project in postgis

I have two points p1 and p2. SELECT ST_GeomFromText('POINT(92.78488163381019 55.9757874622428)', 4326) as p1, ST_GeomFromText('POINT(92.78482645521103 55.97564239375992)', 4326) as p2 ...
0
votes
0answers
41 views

drupal cartaro ask me postgis 1.5

I would install drupal cartaro, I have a host service with postgis 2.0 and a service with geoserver installed. Cartaro recommend me to use postgis 1.5. Do you know some solution for to use pg 2.0? I ...
1
vote
0answers
28 views

What is the best way to manage permissions as root installing postgresql and postgis?

I've encountered an issue numerous times where I lock myself out of my postgres installation as a result of modifying my pg_hba.conf file and therefore screw up my postgres installation because I ...
1
vote
0answers
102 views

Is the postgis layer option in qgis 2.0.1 Dufour two way? Was the spit plugin built in?

I am trying to install postgresql with postgis on a remotely accessed terminal only installation of ubuntu 12.04 that I want to use to connect to qgis 2.0.1 and hopefully have a two way transfer ...
0
votes
1answer
111 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 ...
1
vote
2answers
224 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 ...
1
vote
2answers
505 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
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 ...
3
votes
0answers
66 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. ...
1
vote
1answer
142 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
0answers
87 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 ...
1
vote
1answer
722 views

PostGIS and geometry column

I have a csv table. Each record includes a start node (lat1,lon1) and an end node (lat2,lon2). I have already imported the .csv into Postgresql 8.4. Now I would like set the geometry column. I tried ...
0
votes
2answers
85 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?
11
votes
4answers
7k views

Loading a raster into a PostGIS 2.0 database on Windows

I'm trying to figure out how to load a raster into a PostGIS2.0 database (I have asked previous questions on this topic here and here). I am trying to use the raster2pgsql.exe program provided with ...
2
votes
1answer
361 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
154 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
61 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
115 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
443 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 ...
0
votes
2answers
332 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 ...
7
votes
2answers
1k views

How to run two PostGIS versions in parallel on Windows?

I'm trying to understand how to install PostGIS2.0 on Windows7. The PostGIS site has the following suggestions: PostGIS Experimental Binaries PostGIS 2.0.0SVN Binaries with Raster, Topology ...
1
vote
3answers
116 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
0answers
251 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 | ...