PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.
8
votes
1answer
1k views
PostGIS 3D in Action
I was wondering if there is a website that showcases Openlayers and PostGIS 3D in Action
6
votes
1answer
141 views
How to install a patch in PostGIS
Can anybody tell me how to install this patch in PostGIS?
http://trac.osgeo.org/postgis/ticket/413
http://trac.osgeo.org/postgis/changeset/7534
I need to use the ST_OffsetCurve function. but it ...
5
votes
3answers
2k views
ST_Intersection slow query
I am trying to perform an intersection between two layers:
Polyline layer representing some roads (~5500 rows)
Polygon layer representing irregularly shaped buffers around various points of interest ...
5
votes
2answers
1k views
How to locate PostGIS AMIs on Amazon EC2?
There are nearly 7000 AMIs on EC2, but I'm having a difficult time figuring out which ones have what I'm looking for--in this case PostGIS on Linux. No specific version/configuation--I want to check ...
3
votes
3answers
1k views
Writing a plugin for Qgis using python to access PostGIS and write geometries
Sorry about the strange title didn't really know how to word it.
I currently use MapInfo to do most of my GIS work however I have recently installed PostGIS 1.5 and am really liking it so far. A ...
2
votes
1answer
859 views
How to find the nearest point projected on the road network?
I would like to know if there is a function at pgRouting that given a point (lon/lat) can give you the projection of that point to the road network .
Thanks in advance
john
12
votes
5answers
4k views
How to use ST_Intersection?
Here's a quick summary about what I'm trying to do: I have 3 tables in Postgres, 'a' and 'b', each have a Polygon column, and 'c' has a Point column. What I'm trying to do here is to get the ...
10
votes
4answers
727 views
Large shapefile to raster
I have a large shapefile (1 gb) and need to rasterise it. I have tried the following already.
1.) Import it into GRASS using v.in.ogr this failed with the error message: ERROR: G_realloc: unable to ...
9
votes
2answers
609 views
Storing GML surface in PostGIS
I'm using PostGIS 2.0.0 and would like to store a GML Surface in a way that allows calculating intersections between that surface and various points and lines. In my case, the Surface will have one ...
8
votes
4answers
867 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.
8
votes
1answer
614 views
How to add features to a PostGIS layer using Quantum GIS?
I am using Quantum GIS and the PostGIS dbms. I am able to call the PostGIS layer into QGIS but i am unable to add feature to it. I am using the method of adding features to a Shapefile but still it is ...
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 ...
6
votes
1answer
1k views
How to measure length of line accurately?
In postgis 1.5 for the below given query the answer is 1540651.62674101 meters ,
SELECT ST_Length(ST_GeomFromText('LINESTRING(77.83042478941326
9.98463896136159,78.03469506809812 23.90398909552571 ...
5
votes
1answer
542 views
How to route over (partial) edges in pgrouting?
I have made a route planning system (based on shortest path using A*) like the Google directions service using pgrouting and google maps. It includes clicking on the map to generate waypoints, ...
4
votes
2answers
3k views
How to convert MultiLinestring to Linestring?
I have a multiline string and want to convert it to a linestring in order to use some functions that only work with linestrings. I used ST_Dump() and got a collection of my geometries. If I merge them ...
3
votes
4answers
440 views
GeoServer Layer from PostGIS not updating
I created a WMS layer from a PostGIS table with a fraction of total polygons in GeoServer. Everything displayed fine.
Then, I added the rest of the polygons to the table in postgis. For some reason ...
2
votes
1answer
3k 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 ...
9
votes
3answers
366 views
How to add offsets to the route?
Edited:
I want to ilustrate my question. Suppose that you're in "Point A" and want to go to "Point B". This points wouldn't be in "at_2po_4pgr" table cause aren't source/targets nodes.
Then, I ...
9
votes
3answers
991 views
getting dxf files out of PostgreSQL
I've successfully loaded a bunch of shapefiles into a PostGIS database. I would like to be able to retrieve specific geometry and layers as dxf files based on SQL queries.
I'm using PostGIS, GDAL, ...
8
votes
3answers
1k views
Beginner PostGIS question: getting geometry from multiple tables
I am very new to PostGIS, PostgreSQL, and SQL in general.
I have 44 tables in my PostGIS database, and each one represents a different layer of vector data. Each was loaded from a separate shapefile, ...
8
votes
6answers
418 views
PostGIS: Assign ID of point in layer A to closest point in Layer B
This should have been an obvious precursor (that I didn't ask) to my other question:
PostGIS function to create spider diagrams?
If I do not know the relationship between a point in layer A (stores) ...
7
votes
3answers
203 views
Why doesn't pgRouting return the best path?
Let the next portion of a graph:
When I use the function shortest_path between the points A and B, I got the blue path. Why does this happen?
7
votes
2answers
280 views
How to catch PostgreSQL/PostGIS errors in GDAL/OGR Python bindings?
Is it possible to catch PostgreSQL output error messages in OGR after a query has failed?
For example
conn.ExecuteSQL('SELECT * FROM non_existing_table;')
In Postgres this returns an error ...
7
votes
2answers
1k views
PostGIS ST_Buffer Radius Help
I am trying to find all points within a five-mile radius of a given point. I have a query like this:
SELECT * FROM table WHERE ST_Contains(ST_Buffer(geomFromText('POINT(0 0)', 4326), ?), latlon)
I ...
6
votes
3answers
369 views
How do I get the area of a WGS84 polygon in square meters?
The following gives me the area of the polygon in square degrees:
SELECT ST_Area(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 ...
6
votes
2answers
185 views
How to add vertices to existing linestrings?
If I have
Linestring(1 2, 1 5, 1 9)
and a
Point(1 3)
Is there any function that can merge linestring and point preserving the order
so output would be:
Linestring(1 2, 1 3, 1 5, 1 9)
6
votes
1answer
354 views
Data visualization and maintenance tool
Background
Looking to leverage an existing GIS system for exploring organizational data.
Architecture
The following figure represents a high-level overview of the system's desired features:
The ...
6
votes
1answer
792 views
Performance Gain Through GIST Index for Point in Polygon Query
I have two tables: locations(id,region_id,the_geom) and regions(id,the_geom). For each location point I want to determine the region it is located in:
UPDATE locations SET region_id =
(SELECT id ...
6
votes
2answers
513 views
How do you calculate lat/lons from a PostGIS table which has a projected coordinate system?
I have a PostGIS table in a projected coordinate system (EPSG: 28355 or MGA94 Zone55). In QGIS (with the PostGIS manager plugin) I calculate a coordinate by performing the following SQL "UPDATE ...
6
votes
2answers
2k views
Creating spatial tables with PostGIS
In the PostGIS documentation it says that there are two steps to creating a spatial table with SQL:
Create a normal non-spatial table.
Add a spatial column to the table using the OpenGIS ...
5
votes
1answer
92 views
How to findout direction PostGIS
I want to find out the direction from the 2 points from postGIS database. Please see the attached image. I want to find out the direction from the mainPt to any point. But want to get the result as ...
5
votes
1answer
185 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 ...
5
votes
1answer
785 views
Merge Multiple Tables into a New Table in PostGIS
I am looking to merge a number of individual tables into a new table in PostGIS. This is an easy task when working with Shapefile data, but I am unsure how to do this in PostGIS. Any help would be ...
5
votes
1answer
682 views
Why do simplify polygon results differ between ArcGIS and PostGIS?
I am mainly interested in why and how the Simplify Polygons tool in ArcGIS handles the simplification process, including preventing and resolving topological errors better than the equivalent ...
5
votes
2answers
1k views
How to get multiple shortest paths with PgRouting in one query?
I want to run shortest path algorithm on multiple source&target pairs at once and get a result as a table and process it then.
How do I do this? This query does not work:
SELECT a.source, ...
4
votes
1answer
126 views
How to import GeoTIFF via postGIS into GeoServer?
As a simple test case, I'm trying to configure the software stack of OpenGeo such that I can display a GeoTIFF as an overlay to a normal map like OSM. So I perform the following steps:
Create a ...
3
votes
1answer
798 views
convert list of points to line or polygon
I have a list of Points in a PostGIS table. The rows can be grouped by a date
something like:
myTable
id INT
date DATE
lat NUMBER
lng NUMBER
geom GEOMETRY(POINT)
now I need a table where all ...
3
votes
2answers
465 views
Merging polygons that intersect by more than a specified amount
I am working with a dataset that contains a subset of property boundaries in a local government area, thus my dataset is made up of several thousand properties but not all are touching. Since it is a ...
2
votes
2answers
252 views
How fill length and feature count in PostGIS table for each polygons
I'am new to PostGIS/PostgreSql. I have a database which containts two shape-files :
polygonal layer towns and
linear layer of roads
To calculate the length and feature count of 'Streets' inside ...
2
votes
1answer
193 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 ...
2
votes
1answer
362 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.
...
2
votes
1answer
705 views
geoserver wfs insert error
I keep getting an insert error from geoserver when trying to save a point, poly etc etc to my postgis table. any ideas, my code is below
var Projection = new OpenLayers.Projection("EPSG:4326");
...
2
votes
1answer
585 views
Routing Application in Windows
I am making an routing web application similar to Google Maps 'Get Direction' feature. But because of the limited control and data on GMaps, I decided to use OpenStreetMap instead. This also made me ...
1
vote
2answers
223 views
Automating batch load of multiple GPX files into PostGIS
I've got 50+ GPX files that I would like to "batch load" into a PostGIS database. All of the track_points data would be loaded into a "track_points" table (with typical GPS fields like lat, long, ...
1
vote
1answer
92 views
Automatic bulk snapping with FOSS
I'm looking for a tool that would be able to automatically snap features closer than a given distance. Is there such a tool/plugin for QGIS/GRASS/OpenJump? Would it be possible to achieve that with ...
1
vote
1answer
120 views
Howto setup osm2psql
I'm following these instructions to setup osm2psql . I need it to import osm data file inside a PostGIS DB.
The following steps worked fine:
createdb -E UTF8 -O user mydb
createlang plpgsql mydb
I ...
7
votes
1answer
145 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".
7
votes
2answers
318 views
Growing a PostGIS geometry by a percentage
I'm looking for a way to add a buffer around a PostGIS geometry, but the size of the buffer should depend on size of the geometry. That is, I want each geometry to be enlargened by, say, 5%.
The idea ...
6
votes
1answer
730 views
QGIS WKT Raster Plugin error, what does this mean?
I have been playing with the WKT Raster plugin. I have installed the WKT Raster experimental binaries in PostGIS successfully and followed the instructions in the read me to the letter.
When i am in ...
5
votes
1answer
474 views
Why do TIF loaded into PostGIS lose their colormap?
I have successfully loaded a TIF image (using raster2pgsql) into my PostGIS 2.0.1 database. I can load the raster image into QGIS and it displays in the correct space. However, it has lost all colour ...



