Version 2.0 of PostGIS brought a heavy set of new extensions for the PostgreSQL object-relational database, adding greater support for spatial objects.
Questions tagged [postgis-2.0]
446 questions
6
votes
1 answer
How to snap line string start & end vertex to the nearest point?
I have a point layer and a line layer. The points are road junctions, collected using DGPS, while the lines are the connecting roads, collected through Handheld GPS in tracking mode. As a result, the lines are not actually connected to the…
thelastray
- 2,864
- 3
- 24
- 43
5
votes
1 answer
nearest neighbor within table using PostGIS
using PostGIS 2.0 and PostgreSQL 9.1 I have a table of photographic observations, sco_photos. The location column contains a PostGIS geometry point specifying where the observation was made. The table is not enormous (about 7,000 rows).
I am trying…
Andrew Perrin
- 51
- 2
5
votes
3 answers
How can I export points as GPX?
I have some point data in PostgreSQL / PostGIS. How do I export the data to a GPX file? I looked for commands similar to ST_AsGML and ST_AsKML but could not find anything to convert to GPX (like a ST_AsGPX).
DenaliHardtail
- 3,177
- 4
- 34
- 68
5
votes
1 answer
Postgis Difference with Geometry union
I've got two GIS tables, let say A and B. I would like to do the difference of A using B. While it's pretty straightforward to do it with QGIS (using geoprocessing->difference), I've got much more troubles to do it with PostGis.
Below a visual…
Arnaud Geotribu
- 223
- 2
- 7
4
votes
1 answer
Postgis 2: Polygon/MultiPolygon in a single column
Storing MultiPolygon and Polygon features in a single column used to be as simple as not creating or removing the geometry type check constraint.
Is there a similar simple fix in PostGIS 2?
Dylan Hettinger
- 520
- 1
- 4
- 10
4
votes
4 answers
Importing data with SRID 4269 to GEOGRAPHY type of PostGIS?
In PostGIS, we are importing various US census bureau shapefiles (with SRID = 4269) using shp2pgsql loader. I have medium-sized database with several tables containing fields of type geography (lat/lon points, polygons, multipolygons, etc) that…
GISuser
- 41
- 1
- 2
3
votes
1 answer
PostGIS: How to ST_Clip() a raster with a polygon?
I have done:
Import a SHP file into PostGIS by PostGIS SHP loader GUI.
Import a raster into PostGIS:
\raster2pgsql -I -s 4326 landsat.TIF -t 500x500 public.landsat > query.sql
After importing all into postGIS, I have tried exporting raster to…
Jackie
- 303
- 1
- 3
- 10
3
votes
0 answers
operator does not exist: geometry <#> geometry
I'm running PostGIS 2.0 for PostGreSQL 9.2, and I have a customer who wants to know how close a provided geometry is to the nearest feature in a table. So I'm playing around with the "<->" and "<#>" operators. My problem? The "<#>" operator isn't…
Jeff Dege
- 31
- 2
3
votes
1 answer
Are there strategies for dealing with TopologyException errors in PostGIS 2?
Are there strategies for dealing with TopologyException errors in PostGIS 2? Nearly every function I run against two geometries results in a TopologyException (e.g. ST_Intersection, ST_SymDifference).
I always try ST_Buffer(the_geom, 0) first, then…
Dylan Hettinger
- 520
- 1
- 4
- 10
3
votes
2 answers
Change of geometry type and buffer
I have a layer.
I want to transform the type of geometry from point to polygon while creating a buffer around points proportional to the population of cities.
I'm testing :
ALTER TABLE city
ALTER COLUMN points TYPE POLYGON USING ST_buffer…
fcka
- 923
- 4
- 10
3
votes
3 answers
Determining if line A is subset of line B in PostGIS?
I have two datasets of linestring features, both of which are from the same source and nearly identical but with minor changes. One of the changes that I need to identify is when one line feature is split into multiple separate features, but with…
wmebane
- 660
- 4
- 17
3
votes
5 answers
Loading data using QGIS to PostgreSQL database
I am trying to import a shapefile using desktop QGIS to postgreSQL database using the import shape file to postgresql database tool but it raises the following error:
Problem inserting features from file:
E:/MOA/sample point…
amsalu
- 31
- 1
- 2
3
votes
0 answers
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 saying:
psql: FATAL: role '"blessy" does not…
user3401031
- 41
- 2
2
votes
1 answer
PostGIS ST_SummaryStats
I need some help writing the sql for returning the "MEAN" value from a raster(in postgis db) that intersects a defined(inquery) polygon(in postgis db).
The polygon layer is called: public.farmpaddocks
The raster layer is called: …
Haydlew
- 417
- 1
- 4
- 13
2
votes
1 answer
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
degree between points equal 200.824
and distance…
Vsevolod Avramov
- 41
- 4