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
26 views

ST_Dwithin Source Code

I am looking for the st_dwithin postgis source code. I want to learn the way postgis determines whether a given geometry is within a given radius to another geometry.
0
votes
0answers
17 views

Problem importing sqlite into Postgres (with PostGis) using ogr2ogr

I am trying to import a very large sqlite file into Postgres SQL 9.3. The first tool I tried to use was OGR2GUI (http://www.ogr2gui.ca/). The 64 Bit version does nothing, whilst the 32 bit version ...
2
votes
1answer
69 views

Trouble using ST_Difference to remove overlapping features

I am trying to use ST_Difference to create a set of polygons (processing.trimmedparcelsnew) that do not contain any of the area covered by another set of polygons (test.single_geometry_1) using ...
4
votes
1answer
148 views

Updating SRID (Update_GeometrySRID) does not alter polygons (when it should)

I am trying to change the SRID of polygons layer, but I'm having trouble visualizing the result. I the SRID is misreported the shapefile I used to import into PostGIS. The metadata says the ...
8
votes
1answer
101 views

Building a polygon over a reachable area

I am currently working in the field of isochrones and the underlying algorithms. What now causes problems is not the calculation if the isochrone itself, but the visualization of the results. The ...
1
vote
0answers
31 views

What is the fastest way to select oldest, unique geometry from a table containing duplicates in PostGIS?

I have an output from an ArcPy arcpy.Union_analysis operation and for the overlap polygons that were created I need to select out the oldest feature (along with the attributes). The result is 75740 ...
1
vote
0answers
28 views

PyQgis - Adding attributes to a POSTGIS layer

After reading @underdark's answer to this question on creating a new vector layer and @Matthias Kuhn's to this one on field calculation, I wrote a script that allows me to calcultate the mean ...
0
votes
0answers
18 views

find nearest point to a point in another table

This similar, but not quite the same as this question. I need to pick, regardless of distance, the closest 'n' points to a given point in another table, using postGIS. Imagine a table with city ...
0
votes
1answer
21 views

PGR_Djikstra function error

I'm trying to find a shortest path between 2 nodes using djikstra method but it keeps saying ERROR: Error, query must return columns 'id', 'source', 'target' and 'cost' this is my query: ...
1
vote
1answer
61 views

connecting Arc 10.3 to a PostGIS database “the coordinate system identifier is invalid” [closed]

Has anyone had any success directly connecting Arc 10.3 to a PostGIS/postgres database, where the geometry type is 'geometry'? I am able to connect and view the tables, but I am unable to view them - ...
0
votes
0answers
41 views

Why is Geoserver publishing my WMS layer in WGS84, when I have specified WyLAM?

I am trying to publish a WMS layer from Geoserver, based on a table in a PostGIS dastabase. The projection of the original source data is "WyLAM" (EPSG:8155). It seems that no matter which options I ...
2
votes
2answers
51 views

Is it possible to georeference raster stored in Postgis?

I'm looking to store a huge raster aerial image (400 Gb) into Postgis, but before storing it i like to know how i could georeference or rectify raster stored in postgis ? is there any Qgis plugins ...
0
votes
1answer
41 views

how to insert coordinate of province to postgresql?

i need insert to database this area sample: [ [ [ 50.227886556627098, 31.15709614260982 ], [ 50.227886335531331, ...
0
votes
0answers
39 views

How do I design a database for storing GPX tracks and supporting spatial queries?

I have a series of GPX files that contain 1...n tracks. Each track contains roughly 5k - 10k points. The GPX files do not contain waypoints or routes. I want to design a database with the following ...
1
vote
0answers
18 views

Can the correct TIGER Line Id be returned for an address from the PostGIS Tiger Geocoder?

After reviewing the PostGIS Tiger Geocoder documentation, I don't see a method of returning the TIGER Line Id for the address. I would assume this is information is available internally as part of ...
7
votes
1answer
49 views

Why is there an upper limit to the SRID value in the spatial_ref_sys table in PostGIS 2.1?

I was trying to insert a reference system in PostGIS from http://spatialreference.org/, and got a constraint violation for spatial_ref_sys_srid_check. I checked that constraint and found that, when ...
1
vote
2answers
74 views

How to transfer large amount of OSM data to postgis using osm2pgsql?

I am new to using Openstreetmap data and PostGIS database. I learned how to use osm2pgsql and transferred osm data for a small city to PostGIS database and worked fine. The problem is that when I try ...
1
vote
1answer
780 views

How do I resolve “relation does not exist”

I have a view, named PointsForGpxExport, that contains points I want to export to a GPX file. The ogr2ogr command I'm trying to use for the export is included below. When I run the command, a GPX file ...
0
votes
0answers
19 views

map doesnt shown up in css page

I use postgreSQL 9.2, postgis 2.0 and 2.1, pgrouting 2.0, and I connect it with css page (localhost) but the map from pstgreSQL database doesnt shown up, can anybody help me? MAP NAME PADANG # ...
0
votes
0answers
37 views

Publishing Geoserver WMS on Drupal 7 using openlayers module not working

I'm unable to overlay my WMS layer published from geoserver on map. Im using openlayers module in drupal 7 configured with geoserver + postgis. Im using EPSG:3857projection. Also the Geoserver module ...
1
vote
1answer
25 views

geometry_column table not automatically exist

I use PostgreSQL 9.2 but geometry_column table not automatically exist like spatial_ref_sys table, but if I use PostgreSQL 9.1 it's exist. How to make geometry_column automatically exist in PostgreSQL ...
1
vote
1answer
115 views

Why doesn't my spatial index work?

I have a table with 50 million test points. The points are stored as latitude / longitude with SRID = 4326. The create script for the table: CREATE TABLE points ( name character varying, point ...
4
votes
3answers
108 views

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 ...
1
vote
2answers
40 views

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 ...
1
vote
1answer
53 views

How do I project a point stored as Lat / Lon to a state system?

I have some points stored as WGS84 (EPSG:4326) data. I want to write a SELECT statement to return the projected values, in EPSG:2811, and unprojected values. Here is my table SQL: CREATE TABLE ...
1
vote
0answers
64 views

Is there PostGIS equivalent to arcpy.sa.Slice() function?

I have an existing system built on an 8.3 PostgreSQL database which uses a ArcGIS - Spatial Analyst for a couple of raster operations. The system is moving to PostgreSQL 9.2 and I'm evaluating if the ...
1
vote
1answer
109 views

Creating GeoJSON from Postgres

We are transitioning from Google Maps to Mapbox. Mapbox is a proponent of geoJSON and uses it extensively, so we are considering adopting it for all of our maps. An issue is the creation of the ...
1
vote
0answers
36 views

Postgis - st_MakeLine and st_lineLocatePoint

Lets explain, I have 4 points (1,2,3,4), and I need to visit clients (A, B, C, D). So, I need to use st_makeline with (1,2,3,4,3)... Now I have to get % position from A,B,C,D; but in visit order. ...
0
votes
0answers
42 views

Add new feature to postgis via geoexplorer

I have a polygon table in postgres/postgis and I set up some fields to not allow null values. My problem is when I add a mew polygon via opengeo geoexplorer (myviewer sdk) and keep these fields empty ...
0
votes
1answer
28 views

problem in PostGIS Name of the system used for Points and how to get distance between to point?

I have started to work on a project in PostGIS. I have a table with a geometry points in which points saved like this : "010100000089F511C671C01E4162327E2A83545341" and I have translated this ...
0
votes
2answers
98 views

Neighbors within distance from every row

I have a research project of 180,000 entries and I need to calculate the number of neighbors (points from the same table) that exist within a 300 meter radius for each point. My method is very slow, ...
0
votes
0answers
12 views

PSQL: Setting maxspeed to all highway tags having 'highway' text= NULL AND 'maxspeed' text = NULL?

Hello everyone, I am trying to create a procedure in postgresql using functions of postgis extensions where I can first search and find all the rows having an empty 'highway' tags AND ...
1
vote
1answer
190 views

PG::UndefinedFunction: ERROR: operator does not exist: point = unknown

Recently, I developed a feature to save and fetch points(lat and lon) from DB. It is working fine on my local, but on production database it is giving error: PG::UndefinedFunction: ERROR: operator ...
0
votes
1answer
65 views

OpenLayers WFS-T tinyows insert transaction: error GID value

I try to implement insertion of new point using Openlayers v2.13 saveStrategy calling tinyows which implements the WFS-T transaction; I use the example from ...
0
votes
0answers
17 views

postgis 2.x geometrycollection and multi

I want to gather differents geometries in a table. So I transformed a multipolygon geometry in a geometrycollection. Now if I can insert differents geometries, I lost the capability of insert ...
0
votes
1answer
78 views

How to create buffer around point having projection 4326

I am trying to create buffer (in meters) around point(long lat alt) which is in projection 4326 with below code. But it is not giving expected output. SELECT ...
1
vote
1answer
182 views

Unable to create Polygon using Geodjango admin interface

I am new to GeoDjango. I have created Admin interface for my Model. It loads correctly. I am also able to draw the Polygon on map(At client side) but when I save It tells me Invalid input and throws ...
1
vote
0answers
34 views

Problem with ST_SummaryStats, ST_Buffer, and casting between geometry/geography types

I have a test raster that covers the world ((-180 90), (180 -90)). The SRID is WGS 84 (EPSG:4326). Values for cells in the north-western quadrant ((-180 90), (0 0)) are random integers in the range 1 ...
1
vote
2answers
93 views

How to get the number of polygons of a geometry in PostgreSQL

How can I get the number of polygons that form a geometry in PostgreSQL? For example U.S map has a lot of islands in addition to its main lands. I want to count these islands plus the main lands.
1
vote
1answer
73 views

How to create Spatial Reference System in QGIS?

I have some Attribute and the coordinate and the coordinate reference system. I want to create a DBmanagamet form my spatial data. To do that I want to create one table with name Spa_ref_sys, but I ...
1
vote
1answer
59 views

Incorrect lat / lon conversion from utm

I used this website to determine that the SRID for my shapefile is 3857. Following that information, I used the shp2pgsql utility to convert my shapefile into the sql I need to insert into PostreSQL ...
1
vote
1answer
141 views

How to detect gaps in a MultiPolygon table with Postgis?

I have mapping of land use. In it, I need running topology to detect gaps between polygons. Is there postgis's function to do this? Thanks
1
vote
0answers
54 views

Automatically generate random polygons with a given number of vertices

Updated to make it clear. What would be the fastest way to generate a random polygon in PostGIS with a specific number of vertices? I want to create a PostGIS function like GeneratePolygon(1000, ...
1
vote
1answer
48 views

Can I make tiles of a raster in postgis?

I am doing some work on dtms in postgis. To import the dtm, I snipped it into tiles and the work directly on the dtm works fine. Then I calculated aspect and slope of the dtm and got some bad ...
1
vote
0answers
89 views

Create polygons enclosing same number of points on PostGIS

I have a geodatabase on Postgis with points representing customers, what i need is give a number of customers, lets say 100 and it need to generate polygons enclosing 100 clients each one. I only ...
0
votes
2answers
91 views

Find closest points in routing network for a set of points to pick shortest route

I have the following WITH SQL Query which does select a set of filling stations along a route within the distance of 1000m. In the SQL statement I fetch 1 Point from the station and search the closest ...
3
votes
1answer
111 views

How to import a GeoTIFF into PostGIS without raster2pgsql

I know that one can import GeoTIFF into PostGIS via raster2pgsql. I was wondering if there is any easy way (as a sequence of SQL statements) to do the same without resorting to the command line tool? ...
3
votes
1answer
90 views

PostGIS strange difference in distance calc from different point defenitions

I have a working POSTGIS database, loaded Dutch CBS data using shp2pgsql and now I want to map lat,lon coordinates to multipolygons. All examples I see use lon lat coordinates but if I do so I get ...
0
votes
0answers
93 views

ERROR IN sudo PGUSER=postgres make installcheck step

I am trying to setup cartodb on Ubuntu 14.04. I installed all the dependencies & requirements. Postgres 9.3 and postgis 2.0 are also installed. Whenever I try to execute following Steps : ...
1
vote
3answers
101 views

Convert SRText To PROJ4TEXT

I'd like to convert the following for updating my spatial_ref_sys table. ...