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

2
votes
1answer
36 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
37 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
25 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
17 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 ...
6
votes
1answer
40 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
55 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
65 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
17 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
25 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
100 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
86 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
28 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
37 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
59 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
72 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
28 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
32 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
26 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
80 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
10 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
90 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
54 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
15 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
57 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
93 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
20 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
60 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
55 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
49 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
86 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
50 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
40 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
76 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
68 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
91 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
80 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
75 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
75 views

Convert SRText To PROJ4TEXT

I'd like to convert the following for updating my spatial_ref_sys table. ...
2
votes
0answers
86 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
67 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
155 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
81 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
88 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
111 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
63 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
1answer
42 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
67 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
15 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 ...