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

1
vote
1answer
46 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
15 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
18 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
22 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
55 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
8 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
25 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
16 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
11 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
37 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
33 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
7 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
39 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
44 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
38 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
60 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
38 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
30 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
60 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
52 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
61 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
71 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
51 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
52 views

Convert SRText To PROJ4TEXT

I'd like to convert the following for updating my spatial_ref_sys table. ...
2
votes
0answers
56 views

pgrouting librouting.dll library is supposedly missing when it is not

Yesterday, I successfully installed pgrouting from the most recent x64 2.0.0 binaries, at least this is what I thought. I was able to perform first query - select pgr_createTopology() from the ...
2
votes
1answer
51 views

PostGIS replace pixel value by lookup table?

I was wondering if it is possible to write a PostgreSQL statement to replace the value of each pixel in an input PostGIS-raster with a value obtained from a look up table. For example, suppose I have ...
4
votes
1answer
128 views

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 ...
0
votes
2answers
51 views

How to get the closest point from a table in PostGIS?

I have a table of pgrouting nodes, structured like this: CREATE TABLE ways_vertices_pgr ( id bigserial NOT NULL, cnt integer, chk integer, ein integer, eout integer, the_geom ...
3
votes
1answer
64 views

Confused about ST_DWithin function postgis

First Time here. Anyway, I have a database that I want to use to store user locations. I want to be able to get all the users with in say 15 miles. How do I do this. I'm using PostGIS 2.1. My SQL ...
0
votes
1answer
75 views

Why is result of ST_Area or ST_Distance in SRID 4326 so small

there is one thing I do not understand when using the following Query in geometries which are all SRID 4326. WITH s AS (SELECT * FROM de_sim_points_start WHERE id = 6545) SELECT e.*, ...
0
votes
0answers
49 views

Query for finding nearest distance and driving time from objects in a different tables

I have 4 postGIS tables: employees_wgs Facilites and (created by osm2po): at_2po_4pgr at_2po_4pgr_vertices_pgr What I want to do is: make a query to populate two columns in "employees_wgs" ...
1
vote
1answer
43 views

Is product purchaser in distribution area?

I am going to be using PostGIS 2 to create a lookup service. Given a point (lat/lon), I need to either find if a product can be distributed there, or b) a list of products or distributors. I am ...
3
votes
0answers
36 views

Prevent PostGIS Topology from splitting edges on line insert

I'm dealing with a large amount of road data represented with PostGIS Topology types. Anytime I add an edge over another edge, the edge is automatically split and a new node is created at the ...
1
vote
0answers
58 views

What is causing invalid spatial reference error using ogr2ogr converting PostGIS to FileGDB in a Feature Dataset?

I am trying to use ogr2ogr to convert a layer from PostGIS to a FileGDB. I want the layer to be created inside a Feature Dataset. The spatial reference of the source layer is EPSG:3500. The spatial ...
1
vote
1answer
14 views

Original Size from Tiled PostGIS Raster

Does anybody know of a quick and easy get the original height and width (rows and columns) of a tiled raster in PostGIS? Using a combination of items I know this can be calculated so just wondering ...
3
votes
1answer
232 views

Postgis is Broken after installing Nominatim

I followed Nominatim Tutorial to install PostGIS and after that I can't access PostGIS at all I already trying reinstalling and installing everything over and over again with no success. Everytime I ...
1
vote
1answer
39 views

importing shapefiles to postGIS on QGIS1.8

I am trying to import a shapefile into postgis from within QGIS 1.8. The QGIS is based on a server that is not managed by myself. I have requested an upgrade to QGIS 2.0 ...but this may take ...
2
votes
2answers
30 views

PostGIS 2.0 and Self Intersecting Features

I have a polygon feature class created by open streetmap that is returning a self intersection error. Is there a way to filter out these feature? Can I just use a sql statement to find the error ...
1
vote
1answer
404 views

Error saving polygon with hibernate spatial and postgis

I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin. Caused by: ...
3
votes
0answers
39 views

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 ...
0
votes
1answer
77 views

Delete all data from a PostGIS topology

I need to delete everything (faces, nodes, edges, anything I'm not thinking of) from a PostGIS topology, but I want to keep my database schema (schemas, tables, columns, sequences, etc.) intact. Is ...
0
votes
0answers
104 views

Importing a Raster into PostGIS 2.1 (Windows 7)

I am trying to learn how to import rasters into PostGIS (2.1). I have read through all the material I can find on doing this and know that the recommended tool for this is the raster2pgsql tool. I ...
2
votes
2answers
113 views

How to update PostGIS 2.1 to use `ST_DelaunayTriangles()`

The error "lwgeom_delaunay_triangulation: GEOS 3.4 or higher required" arrives on my terminal, running psql with SELECT PostGIS_Lib_Version(); -- 2.1.4 SELECT postgis_version(); -- 2.1 USE_GEOS=1 ...
2
votes
1answer
73 views

How to populate geography point using ST_MakePoint(long, lat)

I have a table called customer_campaign, and there is an empty column geom(geography) in it. So I want to fill it up by using ST_MakePoint(long, lat) in PostGIS, lat and long are two columns in the ...
0
votes
1answer
24 views

Is PostGIS-2.x raster in text format (WKT) only?

I was reading PostGIS FAQ and this tutorial. From all that I can tell, it seems that PostGIS raster is a text format, i.e. WKT or well-known-text. I was wondering if PostGIS raster data are ...
1
vote
0answers
47 views

Does qgis support postgresql range types?

I added a postgis layer with date range column in Qgis but that field is not listed in Qgis.
1
vote
1answer
48 views

Only my geometry layers are exported from spatialite to postgis

I have a spatialite database (v4.1.1 / SQlite v3.7.17) consisting of one geometry table and several attribute tables linked to the geometry table by foreign keys. I want to export all tables to a ...
2
votes
1answer
39 views

How to make my PostGIS vector layer in QGIS visible?

I have loaded a shp file (simple polygon with one entry) into PostgreSQL 9.3 (with extention PostGIS v2.1.3). I now want to load this layer into QGIS (v2.2.0 Valmeira) via the "load Postgis layer) ...
0
votes
1answer
31 views

What do pixeltypes in PostGIS raster mean?

I'm trying to build a raster in PostGIS from a vector layer and I was curious as to the meaning of pixeltypes in the raster geometry? How does it effect my raster?
1
vote
1answer
94 views

Collecting multipolygons into a single multipolygon with ST_Collect() in PostGIS

I would like to collect 50,000 individual multipolygons into one big multipolygon. Unfortunately when I perform ST_Collect(geom) it bundles them into a geometry collection and cannot be cast as ...