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

learn more… | top users | synonyms

18
votes
3answers
6k views

How to reproject all geometries in a PostGIS table?

I created a spatial table with SRID:4326. Now I want to change total projection to SRID:32644 into a new table. The old table should remain unchanged.
2
votes
1answer
359 views

How to do Reverse Geocoding from MySQL/PostGIS Sql ???

I want to do reverse geocoding from MySQL or PostGIS SQL. I have shapefile up to town level of India. So I have a geometry boundary for each town. What I want is to first find the nearest point ...
4
votes
1answer
292 views

extracting pixel value from a table in postgresql

I have a table in postgresql that contains ID, row number, column number, pixel value and centroid of the pixel in WGS84 lat-lon system(4326). How could I extract the pixel value by giving a point in ...
6
votes
0answers
702 views

Getting ST_Difference between two different tables in postgis [closed]

One table has a series of grid squares in it, and the other has millions of voronoi polygons in it. I need to create a table that has the difference between the two of the them so that I effectively ...
10
votes
1answer
637 views

How to render a table with mixed geometry types in QGIS?

I created a table with geometry type "GEOMETRY" AND inserted data of point, line and polygon type. My question is how to show this spatial data Qgis not supporting for geometry type "GEOMETRY".
1
vote
1answer
446 views

PostGIS Create Table with Geometry

I have written a query that will create a table and perform a GROUP BY from an existing spatial table, but the table does have the geometry. I am wondering where, and what, in this query I put to ...
2
votes
2answers
1k views

How to import shp files into postgresql with PostGIS?

I'm a new user of postgreSQL/postgis but I'm having a problem. I'm trying to import some shapefiles (which open perfectly in QGIS or ArcGIS but create an error when i import them). The problem is not ...
2
votes
1answer
330 views

Why is my PostGIS transformation not working?

I am using a PostGIS query to find the intersection of two streets, and then transform the results into lat/lon. The street database's current SRID is 6856, a projection I added to PostGIS myself; and ...
2
votes
0answers
214 views

Error recognising password; importing OSM to PostGIS in QGIS

When selecting OSM Tools (Import into PostGIS) , attching my .osm file in the Input option, selecting my OSM Database, and then clicking run, I am prompted to enter a password for connection. "Enter ...
6
votes
2answers
499 views

Find points of interest near a path?

Imagine a table of points of interest along with lat/long. The user identifies two of these points. I want to do the following: Calculate a great-circle path between these points Find all POIs that ...
4
votes
1answer
174 views

Is there a Postgis SQL Coding Style Guidelines?

Most programming languages have Coding styles. Some have defined standards, other have just some code of conduct that the majority of programmers follow. Standard coding styles are have obvious ...
3
votes
1answer
104 views

Why can't I add numeric(n,m) field values to PostGIS geometries in QGIS 1.7.1? [closed]

Actually I'm using QGIS 1.7.1 to create and visualise some geodata hosted by PostgreSQL 8.4 and PostGIS 1.4.0. The geodatatable is defined like this: CREATE TABLE u2_baum ( baum_id integer NOT ...
2
votes
2answers
801 views

What's the fastest way to search for polygons that intersect with others?

I'm querying the database for searching polygons that intersect with others, but is very slow research, wanted to increase the speed. I thought of using sphinx, solr, elastic search googled but did ...
3
votes
1answer
201 views

How to use Sextante with PostGIS

Is there any way to use analysis from Sextante with PostGIS Geometry Type? Edit: I am trying to create a webapp that make some analysis (like interpolation for example) and returns the results. So I ...
2
votes
0answers
280 views

Postgresql Query Plugins Not Returning Results in QGIS

I'm using the Fishnet function as described here to create a grid. If I use the following SQL to call the function to position a grid where I want it (I'm using NZGD2000 SRID = 2193) the query ...
1
vote
0answers
93 views

Calculating spaces between roads from PostGIS database

Is it possible to calculate the spaces between the roads using a select statement in a PostGIS/PostGre Database? I tried using some combinations of the predefined functions as ST_Intersects & ...
10
votes
2answers
498 views

How to identify and simplify point clusters with regard to time in PostGIS?

I just started to work with spatial databases and I want to write a SQL(PostGIS) query for automatic generalizing of raw GPS-tracks (with fixed tracking frequency). The first thing I am wokring on is ...
1
vote
0answers
258 views

Postgres function with BOX3D error “doesnt start with BOX3D”

everybody. I created function search nearest point (pois) by using pg_routing as folowing CREATE OR REPLACE function find_pois(inn_point text, distance int) RETURNS float[] AS --point(x y) $$ ...
1
vote
0answers
153 views

post gis command prompt problem

While I'm working in post gis sql command prompt its mode changing automatically. I mean that the general form of command prompt as follows template_postgis=#(we type query's here) While working ...
2
votes
1answer
364 views

Edit Shapefiles Attribute data in GeoServer Programatically

I'm rendering a shapefile using GeoServer and using OpenLayers library to render it in the web browser. Now I have created the option of editing the attribute data in web browser. I want the edited ...
6
votes
3answers
748 views

postgis : is the operator <-> works for Geography also?

With recent postgres//postgis version, you can now use the operator <-> to find nearest rows to a point : Indexed Nearest Neighbour Search in PostGIS Correct me if I'm wrong, but according ...
5
votes
1answer
411 views

Parse error while inserting values into polygon feature

I created a polygon as follows create table boundary (id int, name text); table created; select AddGeometryColumn ('',boundary', 'latlon' 4326,'POLYGON', 2); geometry column added; then i'm ...
3
votes
2answers
1k views

raster2pgsql part of PostGIS?

Hi GIS Stackoverflow people, I wanted to use the PostGIS functionality raster2pgsql, but I had to discover that the Python function was not installed with my PostGIS installation. Do you know if ...
4
votes
1answer
356 views

Storing a SketchUp file in PostGIS

I am sorry if this is a relatively dumb question, but I was wondering if there is a way to store a SketchUp file (.skp) in a PostGIS database? I was thinking about as a blob, but I wasn't sure if ...
2
votes
1answer
432 views

How to install PostGIS 1.5 on Mac OS 10.5?

I am running PostgreSQL 9.0 on Mac OS 10.5. I've installed postgis-pg90-1.5.3-1-osx through "Stack Builder" but still don't see postgis in my list of databases when I open PgAdmin. When I open my Qgis ...
5
votes
2answers
554 views

Setting up an online map site [duplicate]

Possible Duplicate: Steps to Start Web Mapping I have taken on setting up a database which stores information of an annual country-wide survey of alien aquatic weeds, linked to a GIS ...
4
votes
2answers
366 views

Adding Geometry column in Postgis

while i'm adding a geometry column in postgis by using AddGeometryColumn then the error is no function matches the given name and argument types. you might need to add explicit type casts ...
9
votes
2answers
477 views

Best design for Open Source Python / PostGIS prototype

I am writing a data intensive web application that is delivered through apache. My question is about how to best arrange processing given that there are multiple options. I have at my disposal ...
4
votes
2answers
3k views

How to select segment of linestring using PostGIS?

i have PostgreSQL+PostGIS. I have a linestring: "LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 ...
5
votes
2answers
1k views

How to convert 3D DXF to PostGIS 2.0?

I'm not very skilled on using postgis but I face a problem that I must solve, i.e. create tables to load geographical data stored as dxf. I have a thousand dxf files (3d) with polylines, points and ...
2
votes
1answer
288 views

Hyperlinking to PostGIS Layers and Zip files with QGIS Actions

I previously asked a question about hyperlinking data in QGIS that gets loaded into QGIS (see post: Hyperlinking in QGIS - Add Data to current window). A user provided me with the code, which works ...
6
votes
1answer
814 views

Error when using pgsql2shp

I try to export geographical data from a postgis database to a shapefile with pgsql2shp. Normally this works fine, but now I receive the following error. Preparing table for user query... Done. ...
1
vote
5answers
423 views

Error when starting up Postgis Manager plugin in Quantum GIS

I receive an python error when starting the postgis manager pluging in QGIS. This problem started when moving from QGIS 1.7.0 to QGIS 1.8.0 Lisboa. I reinstalled everything but that didin't fixed ...
5
votes
2answers
229 views

Shortest line for a bunch of points in postgis

I hava a very interessting problem, which I'm working on right now. I hava a dataset with a few points, and I'd like to know the shortest LINE to interconnect every point. No needs for routing etc. ...
1
vote
1answer
827 views

How to add constraints in PostGIS?

I have table that containing road network. Table structure is CREATE TABLE final_all_india_road_network ( gid serial NOT NULL, "name" character varying(254), code character varying(254), ...
1
vote
0answers
218 views

How to view error feedback in qgis when testing connection to postgres database?

Using qgis 1.8 on Ubuntu 10.04 with Postgres 8.4.13 I am creating a new (and my first) Postgresql connection in qgis. I can connect to the user and the db using the pgsql client. ...
5
votes
2answers
3k views

How can I get the geometry length in meters?

The ST_length() function returns the length of a linestring but not in meters. Is there a function like ST_Length() but in meters?. Thanks!
2
votes
1answer
163 views

How to create a network with all the track points

I have created a sample network through the use of gps visualizer. Than I used the ogr2ogr function to import this data in my database. Now I have a table which holds all the track points of these ...
1
vote
3answers
250 views

Is it possible to change the projection used in OSM2PO?

Is it possible to change the projection used in OSM2PO? I used the following command to generate a SQL file which I loaded into my database: java -jar osm2po-core-4.2.30-signed.jar prefix=at ...
2
votes
1answer
803 views

Creating proper GeoJSON from PostGIS data using node.js

I am trying to build a GeoJSON object from a SQL query to some GIS point data in a postgis postgresql database. A snippet of my node.js app.js is below. As it stands I understand building the type ...
1
vote
1answer
202 views

PostGIS Implementation of Brabyn and Skelly Road Network Travel Time Model

Is there a PostGIS implementation of the Brabyn and Skelly road network travel time model for the New Zealand road network? This model is outlined in: Brabyn L, Skelly C. Modeling population access ...
2
votes
1answer
273 views

How to get all attributes from a non geometry PostGIS layer with Python in QGIS?

I want to extract all attributes from a non geomety layer in QGIS with Python, but there is only the function uniqueValues(fieldIndex) More specific: I have a postgresql table which is loaded into ...
9
votes
1answer
616 views

How to view a 155 MB raster stored in PostGIS?

I am using the following command to load a raster into a postgres database: raster2pgsql -I -C -e -Y -F -s 3086 -I -C -M myraster.tif myraster -F -t 30x30 | psql -U postgres -d database -h localhost ...
2
votes
1answer
172 views

Finding the Geometry within which a Point falls

I have the following query, which takes on average about 4 seconds. How might one improve the query such that the same response comes back faster? SELECT * FROM geometries g ORDER BY ...
6
votes
1answer
420 views

Clarification of Logical Operators in a PostGIS Database

The following query returns this result: select count(*) from a , b where a.geom && b.geom; count ------- 66514 On a postgis 2 database. What does the logical operator AND ...
3
votes
1answer
1k views

How to find polygons inside polygon with PostGIS 2.0

I have a relation representing all the counties in my country and the other one containing all the districts - e. g. each and every county is composed of several districts. How do I select them with ...
4
votes
1answer
239 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 ...
7
votes
1answer
576 views

Speed differences between SQL Server 2012 and PostGIS UnionAggregate

There seems to be a massive difference in speed between PostGIS and SQL Server 2012 with a union aggregate function. SELECT geometry::UnionAggregate(the_geom) FROM loc GROUP BY LocalityCo vs ...
0
votes
1answer
216 views

PostGIS raster support

I have the following requirements to manage raster data 1) Convert raster-maps from BSB format to PNG or GeoTIFF 2) Cut the borders of the map 3) Merge individual maps to form a contiguous coverage ...
2
votes
1answer
863 views

Access PostGIS Raster layer through mapserver

I am trying to use a cgi script calling mapserver to display a raster layer that is stored in a PostGIS database. However, only a blank white image is returned and I don't know where the problem is. ...