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

learn more… | top users | synonyms

0
votes
1answer
18 views

geometries with different SRIDs errors (even after setting SRID)

I've looked at existing questions about this (including this one) and followed the advice that was shared there. I'm still seeing this when I run some queries: RuntimeError: Postgis Plugin: PSQL ...
0
votes
0answers
22 views

How to deal with grid data?

I'm trying to create an application that will show (approximate) population in a given area (the area is quite simple, just a circle with user-supplied coordinates and radius). I've imported this ...
2
votes
2answers
31 views

Querying PostGIS and OSM to get only major stations and subway of UK?

I am working with Great Britain OSM data. I have read the classification of UK railway stations. There are a lot of classes in there such as subway entrance, halt, station and many others. I want to ...
0
votes
0answers
34 views

box2d spatial type

I'm storing data that defines a box. I created a column by adding it to my table as follows: SELECT addgeometrycolumn('grid', 'grid_geometry', 32650, 'GEOMETRY', 2); I then insert my data in using ...
0
votes
1answer
53 views

PostGIS: Ensure Intersection of 2 Polygons results in a Polygon

I want to ensure that the result of ST_Intersection(polygon1, polygon2) is also a polygon. I initially filtering by ST_Overlaps(polygon1, polygon2) but that seems to only ensure that both features ...
2
votes
1answer
62 views

PostGIS cannot create new feature

I have a PostGIS database - using the main user I can create/update new features no worries. I have created a series of new logins and given them all full access to select/insert/update etc all the ...
0
votes
0answers
17 views

Ways of editing Postgis tables from remote desktops (WFS?)

I've got like 500 postgis tables and i would like to serve then as WMS and especially as WFS to be able to edit that info. To do so i read that the easiest way is Mapserver + TinyOWS. Mapserver works ...
2
votes
1answer
25 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 ...
0
votes
0answers
20 views

Trouble setting up Postgres PostGIS database with GeoServer [closed]

Last weeks I created an application. I want to import from PostgreSQL a database to GeoServer, so that I will call WFS-T service after to my project using JavaScript. For the first time I have to ...
2
votes
0answers
10 views

Geoserver : create a rasterized polygon / dynamic fill for polygons with features from database

I decided to post here because I couldn't find any answer to my problems on the internet. So I am using geoserver 2.7-SNAPSHOT, everything is working fine but I need to implement a new function or ...
1
vote
0answers
19 views

Postgis routes diagram point-to-point

I have a set of centroids to which are related a set of points characterized by linename. The table with the points contains these fields: id ¦ linename ¦ lat ¦ lon¦ I would like to make a diagram ...
1
vote
0answers
48 views

PostGIS: Merge any and all adjacent polygons

I would like to do adjacency tests on a parcel (polygons) layer and merge them if they fit certain criteria (could be size). Per the picture below, I would like to merge polygons 1,2,3 and 4, but not ...
3
votes
1answer
33 views

Finding all segments that makeup a road in OSM

I've spent 2 days trying to figure this out and I'm afraid that it's something that's not possible. If that's the case then I'm thinking the wrong with with respect to OSM data. Let's say I have a ...
0
votes
0answers
29 views

How to speed up PostGIS-Raster based map algebra?

I am testing map algebra with PostGIS (2.1) on two images, and found it to be rather slow. For example, dividing two images of 7200 * 3600 pixels took 110 ~ 120s on a desktop with i7 3.4 GHz CPU; the ...
2
votes
2answers
48 views

How to encode a point geometry in Geojson?

I have point geometry in posgresql which I query as follows: select ST_AsText(geom) as pointgeom from pointable. I'm using python as server side script. I want to pass the result as Geojson response ...
0
votes
1answer
8 views

ST_MakeEnvelope vs casting BOX as box2d

When I'm filtering by bounding box, I've found that I can either do SELECT id, the_geom FROM my_table WHERE the_geom && ST_MakeEnvelope(minlng,minlat, maxlng,maxlat); as well as SELECT ...
0
votes
1answer
16 views

Learning pg_routing - shortest_path error

I'm learning PostGIS and pg_routing to help in our project planning and grant applications at my transportation agency (we wanted to move beyond the limitations of the 1/4 mile walking buffer we use ...
2
votes
1answer
20 views

How do I get the closest point on a road to a point when I have imported OSM data using osm2pgsql?

I have been trying to use OSM data to find the closest point to a road for a given point. I imported the OSM data into postgis using osm2pgsql, and I am getting results back, but they are at the ...
1
vote
0answers
50 views

Create GeoServer SQL View with variable number of arguments ( double precison [ ] )

I was trying to create a PostGIS procedural function which will perform a particular operation depending upon the user's provided coordinates. But since the user can provide any number of coordinates, ...
3
votes
3answers
105 views

Plotting Geo Points with “by arc centered at” Instructions

A recent Supreme Court decision redefined the legal boundaries of California along the Pacific Ocean: http://www.theverge.com/tldr/2014/12/15/7397085/supreme-court-california-boundaries-map I am ...
0
votes
0answers
23 views

How can I prevent ogr2ogr from trying to get the SRID from PostGIS?

I'm running ogr2ogr for a PostGIS to GeoJSON export like this: ogr2ogr -s_srs EPSG:4326 -f GeoJSON unique_geoms.json "PG:host=localhost dbname=local_data user=local_user password=local_pass" -sql ...
2
votes
2answers
37 views

pgrouting - network distance many-to-one shortest paths

I want to find the distance (km) between each origin point to the closest destination point (restaurants) using pgrouting. I have 3 tables my road network with nodes and edges 140 origin points - ...
2
votes
1answer
43 views

osm: relation tags to nodes

I filter an osm planet extract using osmfilter. I am only interested in nodes belonging to route=subway relations. After performing this operation, I use osm2psql to load all the data into my postgres ...
2
votes
0answers
32 views

filling the attributes according to intersection of two layers (Postgresql)

How to automatically fill attributes of a point layer according to the exact position in the polygon layer? I mean how to write a command in PostgreSQL to automatically fill the attributes by the ...
0
votes
0answers
13 views

PGeo: MDB Tools driver not found

I'm trying to load a Access .gdb(.mdb) database into postgis using ogr2ogr. I'm running Ubuntu 14.04 with gdal 1.10. I've install both unixODBC and mdbtools as per the instructions at ...
1
vote
1answer
38 views

Correct installation of postgresql and postgis

Goodmorning everybody! I'm new in this forum and I hope you would help me in solving my problem. I'm practicing the use of Qgis and i need to setup postgresql and postgis on my mac yosemite 10.10. ...
2
votes
0answers
13 views

What are the problems of loading overlapping (or the same) tifs into postgis?

I am still early on the Postgis learning curve. I have an existing table in Postgres - it looks like this: create table "public"."mytable" ( "rid" serial primary key, "rast" raster, "filename" ...
2
votes
2answers
67 views

How to change from EPSG:900913 to EPSG:3857 in Postgresql

I didn't use the '-E 3857' switch when importing the OSM data into postgresql using osm2psql. I'm trying to set up a map server for the first time and I'm following the instructions from here: ...
1
vote
1answer
47 views

How to select geography features within a certain distance given in miles?

I am just taking the first steps in using POSTGIS, but having trouble finding a simple example. I have a database with a Key field, lat and lon fields and a GEOGRAPHY field. I just want to have a ...
3
votes
1answer
64 views

clip geometries in postgis table if they are inside a polygon

I have polygons defined in KML files just like this one, which I can easily parse. Example: <Polygon><outerBoundaryIs><LinearRing><coordinates> -91.463940,40.372660,0 ...
1
vote
1answer
36 views

how to get a line that coincident with another line?

I have 2 linestrings: Linestring 1 (-3 3, 6 8, 15 9, 22 13, 28.5 15.7) --> red color Linestring 2 (0 4.66666666666667, 6 8, 10 8.44444444444444) --> blue color Actually both two linestrings are ...
3
votes
1answer
19 views

How to extract nodes with PostGIS to a multipoint geometry

I have a line in a PostGIS table test_line. I want to extract it's nodes into a multipoint geometry. I tried the following: SELECT ST_Collect((ST_DumpPoints(the_geom)).geom) FROM test_line; But it ...
0
votes
0answers
60 views

MapServer/WFS with filter doesn't return result

I'm using MapServer version 6.4.1 with PostGIS for my GIS app. When querying a property through 'REQUEST=GetFeature' MapServer returns all the expected data correctly, but if it's set a simple filter, ...
2
votes
1answer
47 views

Is it possible to use spatial function to retrieve non-spatial data?

I'm using PostGIS in postgresql.I wish to calculate points within the radius from particular geocode.For that i have created a table with spatial column geocode having datatype as geometry and ...
1
vote
2answers
39 views

Ensuring SRID on geometry column in PostGIS

I am using a table that has a geometry type column called "wkt". Its definition in the table looks like this: create table sometable ( ... wkt geometry not null, ... ); I want to change it ...
0
votes
0answers
37 views

IntraMaps Roam - does not update database

Has anyone had any experience with this software? The QGIS project I created for use with this software has a postgis database sync'd to offline mode (i.e. stored in sqlite on my hard drive). I do my ...
1
vote
0answers
33 views

create automatically temperature or isotherms map with PostGIS?

Is there any possibility to create automatically temperature or isotherms map through a points table stored in PostGIS? I need to serve this map on a web (Geoserver). The information is updated each ...
3
votes
3answers
198 views

Which equal-area projection to use for UK?

I have a bunch of UK polygons that are saved in my PostGIS database as WGS84 projection. I would like to calculate the area of these polygons using st_area. According to this answer I can save these ...
3
votes
1answer
47 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 ...
1
vote
0answers
17 views

How to Increase the length of column type geometry in postgres(pgAdminIII)

I am just wondering is there any way to increase the default length of column type geometry in postgres. Since we are trying to save large number of vertices polygon in to the geometry column geom in ...
0
votes
0answers
18 views

Any way to speed up my postgis topology creation?

I need to do topology aware simplification, and I'm investigating PostGIS's new topology extension. However it's taking a very long time to create the topology, and I'd like to know if there's ...
1
vote
0answers
34 views

Query to Dissolve Nearby Polygons on Hive

I am using the ESRI spatial framework for Hadoop, that extends Hive to use spatial types and operations. My objective is to translate a set of simple queries on PostGIS into Hadoop, in order to ...
1
vote
1answer
87 views

How to split lines with PostGIS and view the result in QGIS?

I have two tables, one contains lines (test_line) and the other contains the points at the vertices of the lines (test_line_vertex). I want to split the line into individual segments based on the ...
0
votes
0answers
30 views

Upload SHP to PostgreSQL via QGIS

There was the error when I try to upload the SHP to the PostGRESQL. The feature is the line type. The error was: ERROR: Geometry type (LineString) does not match column type (MultiLineString) Do ...
0
votes
0answers
39 views

Cannot see line made with PostGIS ST_MakeLine() in QGIS

I am probably missing something obvious while trying to do this basic job. thetable contains gps track points. The following aims join the track points by a line: CREATE VIEW line01 AS ( SELECT ...
0
votes
0answers
48 views

Store GPS trace with timestamps, then interpolate location by time

I'd like to: Load a 1-second interval GPS trace (not GPX) into PostGIS Then query the table at sub-second accuracy (about 5Hz), and get PostGIS to interpolate the location by time. Is this ...
2
votes
0answers
55 views

Cartographic-complete Maps in PDF On Request using Open Source?

Currently I have some data in PostGIS. I want to implement the following: users will make a request via web, with parameters like location, scale, layers to be displayed, etc. and I need to provide ...
1
vote
2answers
42 views

How to get the geometry value from coordinates

I have a table with empty geometry column. I have two columns in the same table which has xcoordinate and ycoordinate values. I want to get the geometry value formed by these two coordinates. The ...
4
votes
2answers
125 views

Why is the Google Maps circle shape not matching to the distance calculated with PostgreSQL?

I am running a PostgreSQL 9.1 Database with PostGIS 1.5 extension. Several coordinates are stored in there with type GEOMETRY (SRID 4326). I'm building a web-application with Google Maps Javascript ...
2
votes
1answer
31 views

How do I get the vector and raster metadata from a PostGIS database?

im using php/postgres/postgis in a webapp, im wondering if its possible to get metadata from the db about all shp/geotiff table like (name, projection, type(ship/tiff), date, desc, owner etc ...) i ...