PostGIS is an extension for the PostgreSQL object-relational database that adds support for geographic objects.

learn more… | top users | synonyms

0
votes
1answer
16 views

Speeding Up pgr_dijkstra using bounding box in PostGis2.0

I'm using PostGIS for the first time to calculate distances between two points, for a driving school booking system I am working on. I have loaded in all of the maps for Australia, but the query I ...
1
vote
0answers
17 views

Import shapefiles into PostGIS using Python with psycopg2

I want to import shapefiles to PostGIS using Python with arcpy & psycopg2 to connect to PostGIS. I don't want to use the existing shapefile loader nor ogr, just write my own import tool. My steps ...
0
votes
1answer
34 views

Can't import shapefile to PostGIS

Sorry if my question is double post with the previous. I have tried to browse but I think I still can't find the solution. I am using postgresql 9.4.1 and postgis 2.1(pg 94) and also qgis 2.4.0. All ...
0
votes
1answer
25 views

Problem with importing WKT to PostGIS

I'm trying to import WKT (http://polygons.openstreetmap.fr/get_wkt.py?id=2413177&params=0 - boundary of one of districts of Łódź) into PostGIS database and convert it to geometry. I've created ...
0
votes
0answers
15 views

suitable column Data-type for geojson data storage and processign in PostGis

I have a MySQL table with 2 columns, id, a unique geometry id, and GeoJSON stored as a varchar, eg, {"type": "Point", "coordinates": [116.4, 45.2, 11.1]} ...
1
vote
2answers
161 views

Error in displaying wfs layer from mapserver/postgis

I have read and tested all the relative posts but I still don't have a solution for my problem. I have a layer suscribers (points) stored in postgis database with srid=32232. I would like to display ...
1
vote
1answer
215 views

SQL-query should return GeoJSON FeatureCollection

I'm trying to return a GeoJSON FeatureCollection object from a SQL-query with PostgreSQL 9.3 and PostGIS 2.1. This is my query so far: SELECT row_to_json(fc) AS p FROM (SELECT 'FeatureCollection' ...
2
votes
1answer
38 views

Can't connect to foreign SQL Server table from PosgreSQL using OGR_FDW

I'm using Windows 7, with PostgreSQL 9.3.6 installed and PostGIS 2.1.5. While I wish I could get everything into PostgreSQL, I can't and need to connect to another server running SQL Server. I need to ...
1
vote
0answers
12 views

set Default projection in postgis table

I've set the SRID 4326 for a table having geometry column, but when i insert a geometry without SRID, i get an error because no SRID specified is interpreted as -1 or 0, so how i can set a default ...
0
votes
3answers
314 views

Coordinate System Google Maps API

I am making an application in java using GMaps4JSF where the person will enter the address on the map I'll take this coordinate and consult on my postgis base regions in which region this point is ...
0
votes
3answers
320 views

Import DEM into PostGIS for QGIS

I'm a complete GIS newbie so sorry if I'm using the wrong terminology in searching for a solution to this... I'm trying to import a DEM into PostGIS and display it in QGIS. The data is from the EU-DEM ...
1
vote
1answer
52 views

How to create dissolved buffers in QGIS with PostgreSQL/PostGIS?

Creating a dynamic buffer in QGIS I use the following query: CREATE VIEW buffer40units AS SELECT gid, st_buffer(geom,40)::geometry(polygon, 31492) AS geom FROM point; Now I want to dissolve ...
0
votes
1answer
24 views

Displaying KML data with a user selection

I want to web map some historical cyclones data which are now in KML files, file/year. So I want the user to select a year from a button and the KML files will be displayed on interactive map). I ...
2
votes
1answer
550 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
1
vote
1answer
38 views

Map-matching GPS points to the road network!

I am quite a newbie in Postgres and Postgis so please be simple and clear :) I am trying to do a simple map-matching (or path-inference if you wish) of some GPS points. I am using postgres(postgis). ...
2
votes
0answers
21 views

ST_Buffer with segment AND endcap parameters

Making a QGis plugin that buffers a line and I want to declare a high number of segments and a flat endcap. ST_Buffer(geom, 40, 25, 'endcap=flat') This doesn't work with both parameters entered, ...
2
votes
3answers
1k views

Spatial index to speed up the query

I have spatial table in PostgreSQL 9.2 / postgis 2.0 that I have to extract some information from it. But my query is hopelessly slow. How could I make use of spatial index to improve the performance ...
2
votes
1answer
128 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
2
votes
1answer
52 views

Create common vertexes between shared polygon boundaries in PostGis?

Given two polygon tables L1 (blue) and L2 (red) that share a common boundary but different amount of vertexes, how can one make the shared boundary identical (they should share the same vertexes) ? ...
0
votes
1answer
20 views

QGIS GPS not editing offline database

I have a set of layers from PostGIS that I have converted to offline. I am attempting to edit them via GPS. If the layer is point data, then I can add in that data without issue. However when I go to ...
2
votes
1answer
210 views

qgis-2.2.0 database tab missing

I have recently installed QGIS-2.2.0 but the Database tab in the top-menu bar is missing. It looks the main reason is missing libgdal1h library. But when I am installing it, it's removing ...
0
votes
0answers
12 views

PostGis - ST_AsRaster returning raster smaller than reference raster

I am trying to convert a point geometry to a raster using a reference raster: SELECT ST_AsRaster(my_points, ref_raster) FROM my_table This works fine except it is only returning a subset of the ...
1
vote
1answer
28 views

PostGIS: Is it possible to identify overlapping polygons in the same layer using their geomteries?

I have a single table containing the geometries of ~3 million polygons and I am looking to calculate the number of polygons that overlap with another. I know that you are able to do this in QGIS ...
0
votes
1answer
23 views

QGIS add layer not working

I have QGIS 2.8. I open up the database manager, connect to PostGIS, and then execute a query. The resulting query has an id column, a name column, a geom column, and a membership column. I click on ...
1
vote
1answer
45 views

Select points near polygon in Postgis

I'm trying to make a spatial query, but I think something is wrong with it: I have two tables, places (point) and cities (polygon) When I try to get the points within 500m to one point, there is no ...
1
vote
1answer
29 views

PostGIS and Mobile Devices Maps

I'm still learning the world of GIS reading this Introduction to PostGIS. So far I understand things but since I have an idea that I plan to later work on, I found something that I didn't quiet grasp. ...
1
vote
1answer
1k views

PostGIS query with Lon Lat

Need SQL syntax for ... I have a table with individual polygons like a jigsaw puzzle. Given a Lon Lat, I need to find the polygon where the lon lat in located. I am trying: select * from ...
0
votes
0answers
20 views

Point Cloud footprint/wireframe layer - PostGIS

I'm using PDAL to import LAS files into PostGIS. The tutorial provided by boundless is great, and shows how to display the data in patches, but it doesn't cover displaying the table 'footprint'. I ...
1
vote
1answer
22 views

QGIS Add PostGIS layer: restricting to single schema?

My primary PostGIS database has 12 schemas (schemae? TNIRN...), some of which have nasty-sized tables. The DB is on localhost, on my own machine. For the most part, the actual working tables are in ...
0
votes
0answers
11 views

WMS problems Qgis server with postgis

I have installed qgis and qgis server on a windows server. My plan is to use qgis server to generate a wms. It works fine when I'm using shape files in my qgis project, but when I'm adding a postgis ...
2
votes
1answer
112 views

PostgreSQL default values in QGIS 2.8.1

I have a problem with default values the are set in a PostgreSQL table. When I work on them in QGIS 2.8.1 and I save the layer, the default values were not computed, so the constraints block me. With ...
0
votes
1answer
329 views

ERROR: Operation on two geometries with different SRIDs

I'm new when it comes to GIS and PostgreSQL. I have searched everywhere for the cause of this problem but I can't find the solution. I was following the documentation here First i created a table: ...
0
votes
2answers
34 views

PostGIS raster write support in R

I want to push/write some generated raster layers to my postgres database directly in R. In theory this could be supported by the rgdal package, but sadly it isn't. In the latest version only copy, ...
-2
votes
1answer
28 views

How can I select only the points in a mixed geometry column in postgis postgres

Table "public.eating_drinking" Column | Type | Modifiers --------+-------------------------+----------- osm_id | bigint | way | ...
0
votes
1answer
34 views

How do I calculate ST_Length in miles?

I am playing around with a map of bike lanes (so, lines) and trying to calculate the total number of miles of lane in each of a couple of regions. But I'm not even sure how to use ST_Length to ...
1
vote
0answers
33 views

Calculate total line lengths within a polygon?

I have basically the same conundrum as How do i calculate line segment lengths within a polygon? but I'm working in PostGIS, not ArcGIS. Any pointers? This query seems to like it should work, just ...
0
votes
0answers
29 views

How to import country administrative boundaries from OSM Planet to PostGIS Polygons

I need to import all world countries as polygons or multipolygons into PostGIS. Specifically, I need the administrative boundaries that are like this orange bubble around the actual land borders. ...
1
vote
1answer
22 views

PostGIS raster2pgsql problem

I ran into this problem in PostGIS: raster2pgsql -c -I -C -s 4326 -N -9999 -M -Y -F ./test2/*.tif rdem2 > rdem2.sql Processing 84/84: ./test2/dem2_4326_06_14.tif ERROR: ...
1
vote
1answer
163 views

Building web application to get PostGIS query from user and view result map using GeoServer via OpenLayers?

I'm a newbie in web-map application area. I just found the small application in this tutorial interesting I am a bit confused, because when i publish a map using geoserver and openlayer, I have to ...
27
votes
2answers
6k views

How to create a regular polygon grid in PostGIS?

How to create, on the shape of a polygon, a regular grid of polygons/squares of an given size, in postgis? I have thought about a function like Create regular point grid in Postgis only for squares, ...
1
vote
3answers
113 views

How to get extent of multiple geometries?

I can query a geometry extent like this: select ST_Extent(geom) from tableName; But sometimes I am querying geometries more than one. I am getting 5 points that different locations. So I wanto to ...
3
votes
1answer
243 views

How to store data for gis system?

I'm developing a GIS solution using Postgis database and geoserver as web map server. The solution to develop will analyzes the defects (as a polygon) and process parameters values (as a linestring) ...
1
vote
1answer
28 views

I can't understand this ewkb type mask

I have the following ewkb strings from PostGIS: 01 01000020 E6100000 AECB9307F9D81240 0F2ADCE003704940 01 01000020 E6100000 7EAA0A0DC4920DC0 5AF0A2AF201F4440 I've been able to understand every data ...
1
vote
2answers
540 views

How to perform a buffer analysis in PostGIS?

Need to Implement Spatial Analysis in Postgresql. Can Any one guide me to accomplish the spatial analysis eg) 2 km buffer for road network layer.
1
vote
0answers
49 views

GeoDjango: AttributeError: function 'GDALAllRegister' not found [closed]

Im trying to get started with GeoDjango. I am using this https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/ tutorial. When I run "python manage.py migrate" This error occur: ...
2
votes
1answer
756 views

Problem in importing raster data from PostGIS to Geoserver

I am using Opengeo Suite 3.0.2, PostGIS 2.0.3 and PostgreSQl 9.2. I am trying to import raster data from PostGIS to Geoserver but facing an error. I follow this tutorial link to import the raster ...
0
votes
0answers
29 views

Find hotspot with highest density for two objects

I'm using PostgreSQL/PostGIS and I have an advanced type of query. My database contains two types of objects - let's say homes and crime. Is there a way that I can find the area with the densest ...
2
votes
0answers
28 views

How to create raster from table containing cell values in PostGIS?

I am having a table with integer values. These values are in between 0 and 2. I want to create a raster out of that table with integers as cell values. Or else how to create polygons out of that table ...
1
vote
1answer
479 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: ...
0
votes
1answer
264 views

Drawing curved lines in CartoDB?

I am experimenting drawing curved line from Origin to Destination in Cartodb. I was able to do so once, however, failed the second and third time. Could anyone offer me some insights into the ...