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

learn more… | top users | synonyms

1
vote
1answer
29 views

Convert data type from bytea to polygon psql

I was trying to convert data type of my column from bytea to polygon, ALTER TABLE polygon ALTER COLUMN geom type polygon using geom::polygon; But I got an error saying cannot cast type bytea to ...
0
votes
0answers
40 views

Creating curved lines between two points in QGIS

I am trying to create curved lines between two point in QGIS. There are a few posts that show how to create these lines (hyperlinks below). However, I am having trouble executing the code in QGIS. ...
2
votes
2answers
443 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
1answer
261 views

Error printing pdf in OpenGeo Suite client SDK app

I am using OpenGeo Suite 3.0.2. I created an app using Client SDK and stored the raster and vector data on postgreSQL/PostGIS. The print tool is not working, giving error the following error: ...
2
votes
0answers
42 views

QGIS Road Graph export doesn’t work to layer postgis database

I have a layer of road and I calculate a shortest path with the road Graph plugin. I tried to export a shapefile, a sqlite database, a new temporary layer > I have no problem, the result is correct. ...
2
votes
1answer
37 views

postGIS - Error: couldn't load library C:/Program Files/PostgreSQL/9.5/lib/postgis-2.2.dll: %1 is not a valid Win32 application

Environment - Windows10(x64), PostgreSQL 9.5(x64) I installed GDAL, PROJ.4 and GEOS (via OSGeo4W ) Then I installed postGIS via Stack App Builder (I have tried both versions - x32 and x64). In both ...
3
votes
2answers
72 views

Calculate distances between records in two tables

I need to identify the nearest 3 childminders (approx 500 records) to the nearest school (approx 120 records). Both the childminders and schools layers reside in PostGIS. Can anyone offer any ...
3
votes
2answers
253 views

How to remove spikes in Polygons with PostGIS

I'm trying to validate the topology of a shapefile. I managed to repair cases of overlap and gaps, but i can't resolve cases of spikes. The image shows one example of this situation. I used the ...
1
vote
1answer
115 views

Finding all polygons inside of a polygon

How to find all the polygons inside of a polygon? I tried ST_Intersects and ST_Contains but they are booleans variables. I have a list of polygons in WKT format, so I am trying to pull all the ...
1
vote
0answers
31 views

Pg_dijkstra empty results

I am currently working on PgAdmin, and the pgrouting extension, in order to get the length and the path of the shortest path between every LNG terminal over the world (I have them as a table of points)...
0
votes
1answer
44 views

ST_Transform error

I am getting an error from ST_Tranform while using ST_Intersection: No function matches the given name and argument types. You might need to add explicit type casts. select ST_Intersection(...
2
votes
2answers
345 views

How to get Geography data to GeoJSON in PostgreSQL?

I am using PostgreSQL database and there is a field in a table(area), i.e., public.geography(Points,4326). It contains below type of records "0101000020E6100000BA83D89942334540780B24287ED051C0" I ...
1
vote
1answer
41 views

Correctly querying a raster mask only

I have a rasterA (whole Scandinavia, with values from 0-255) and a rasterB (in blue, a small part of south of Norway, entirely inside rasterA). I want to query the pixels of rasterA which are inside ...
1
vote
1answer
1k 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 ...
4
votes
1answer
55 views

PostGIS Intersection weird behavior

I can observe a strange behavior with my PostGIS query. I am trying to accomplish the following: I have one polygon layer I have 2 different line layers layer with horizontal lines layer with 45° ...
0
votes
0answers
43 views

Counting nodata and data pixels using PostGIS

I'm using PostgreSQL 9.2.4 and PostGIS 2.0.3. I have some raster layer and I'm trying to get the count of all pixels (including nodata), cliped by polygon. Raster was imported by raster2sql: ...
1
vote
1answer
216 views

How to update the OSM data in a PGRouting Database built with osm2pgrouting?

I'm using a PGRouting database originally built with osm2pgrouting from a *.osm file downloaded from Mapzen. If I want to update the OSM data in that database, ie. re-build my PGRouting Database, ...
1
vote
2answers
364 views

invalid KML representation on ST_GeomFromKML

I exported a table with a geography(MultiPolygon,4326) column using ogr2ogr to a KML file. When trying to re-import any of the shapes using the ST_GeomFromKML function I get the following error: ...
1
vote
0answers
27 views

PostGIS Nearest Neighbor query performance - can it be quicker?

I want to canvas the community to see if my nearest neighbor query can be optimized at all. I am happy with my current results, but I'm always up for improving. I have 2 tables, lakes and towns. I ...
0
votes
1answer
186 views

pg_dump Database that was populated with osm2pgsql

Is it possible to dump a postgres database that was created with osm2pgsql and a .osm.pbf file with pg_dump and import this into a remote postgres database? After running osm2pgsql the database is ...
1
vote
1answer
49 views

Saving Edits on a WFS layer by using OpenLayers

So with an app that I've produced by taking this into account, I've managed to create a web map with editing function using a WFS layer from Geoserver. Problem is that, unlike in the working example, ...
3
votes
2answers
115 views

Measuring length through a polyline in QGIS.

I'm working on a fiber optic project. I want to measure the length through a fiber optic cable (polyline) from a point. Does anyone have an idea to help me? For example, I'm at the point 082 CTO and ...
0
votes
0answers
31 views

Postgis Database: How can I get all gps points between specified timestamps and specified region?

I am totally new to DBMS. I have traces of vehicles in different csv files for each user. Format: name,timestamp,latitude,longitude. 1) How to implement RANGE Query which asks for all the gps points ...
1
vote
1answer
66 views

How to add more vertexes to a LineString

I created a map of LineStrings using QGis and then it was exported to a Postgis DB, then I used the query below in order to create the vertexes in the map so it could be used with the functions of ...
1
vote
1answer
265 views

Displaying postgis database data

I'm a beginner in this field and tried to display the postgis database data in localhost.But i used select query in my code .so the table got displayed.I want to display the geographical points in a ...
0
votes
2answers
525 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
0
votes
1answer
23 views

PostGIS query with external bounding box

I am editing a shapefile as wide as an island. The data are stored in a Postgres/PostGIS database. I want to display only features from my defined bounding box. The bounding box itself is a custom ...
3
votes
1answer
196 views

GROUP BY on geography in postgres 9.4.0 returns wrong/different results

table definition: CREATE TABLE search ( id bigserial NOT NULL, location geography(Point,4326) NOT NULL, location_aggregated geography(Point,4326) NOT NULL, created timestamp with time zone ...
4
votes
1answer
131 views

PostGIS Out of db VRT containing JPEG2000 GDAL 2.1 OpenJPEG

Build GDAL 2.1 with OpenJPEG Build PostGIS with above GDAL build Created VRT file with SENTINEL2 Driver / JP2 files. gdal_translate SENTINEL2_L2A:...
1
vote
1answer
44 views

Why missing address IDs in postgresql/postgis query results?

I have two tables "ad" and "st" in my postgres DB. Table ad has 87 rows while st has 16,060 rows. Following code works perfectly to select st.geom (streets' geometry) within 50 meter radius with ...
2
votes
1answer
2k views

How to install PostGIS and pgrouting on Windows if Stack Builder fails to connect?

I know this has probably been covered and that there are plenty of guides out there, but for the life of me I cannot get pgrouting installed. All guides/how-tos are different or assume prior knowledge....
3
votes
1answer
251 views

Routing problem finding shortest route to line

inspiration on how to solve this problem. (Ascii art, I don't have points to insert picture) I need to find Z Z = Shortest route from X Using Road (no point exists here) O = The points that makes ...
0
votes
1answer
71 views

Return nodes along portions of edges with pgrouting

I have been experimenting with generating isochrones with pgrouting using osm data. So far, I have been able to generate isochrone polygons by getting the concave hull of the nodes returned from the ...
1
vote
0answers
50 views

Mapnik3 + python3 + Postgis

I've installed mapnik3, python bindings, and postgis (and imported a pbf file into postgis), and can't seem to even make it generate a simple map as a png file. Specifically - where can I find ...
1
vote
1answer
183 views

shape file into DataSet in postGIS using openJUMP, but getting error

I am new to this field and I want to save my shape file into DataSet in postGIS using openJUMP, but I'm getting an error...can anybody tell me solution for this?
3
votes
2answers
57 views

How do partition tables improve query performance in PostGIS? [closed]

I have static road, country and state datasets in my PostGIS database. Road networks are partitioned by their containing country. Countries, States and other areas reside in their own table and are ...
1
vote
1answer
41 views

Weird behavior with st_clusterwithin

I'm not sure I'm doing this right, I've two locations, one a point and one a point within an area. I'm running them through st_clusterwithin, and they both create 2 individual cluster groups (which is ...
0
votes
1answer
24 views

Delete tags from planet.osm with osm2pgsql and minimize size of database

I want to import into PostGIS the whole planet but I am interested for certain tags. Specifically I am not interested in nodes, ways and areas which are related with the land. Below is a small part ...
4
votes
2answers
93 views

Is Sandy Springs, GA actually Atlanta, GA (ambiguous cities while geocoding)?

I installed postGIS and the associated TIGER geocoder for work, and noticed a strange thing when geocoding some addresses in the Atlanta area. For example, when I geocode the address "8610 Roswell Rd,...
1
vote
0answers
28 views

Interative raster with PostGIS

I'm searching some solution to show raster layers from PostGIS on a Web Page. I need a solution to build a interactive map showing the values of my raster data when the user to click on pixel of the ...
0
votes
0answers
20 views

Inserting markers coordinates into postgis table with one row per marker via php

I have a leaflet map with some markers (coming from a .gpx) and I’m trying to send them in a postgis table with one row per marker. For the moment it works but only for the first marker. Here is how ...
0
votes
1answer
36 views

How to create a line into a table in Postgis?

I need to draw a line and create a new entry on an existing table in Postgis. Say I have a table called myTable and two points with coordinates 528115,181037 and 528115,181037 using the EPSG:27700 (...
2
votes
1answer
119 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 ...
11
votes
4answers
6k views

How to install PostGIS on Windows?

I want to create an application platform based on PostGIS data. I read the documentation where I saw the prerequisite to install GEOS, GDAL and Proj4. The main problem is I am using windows platform. ...
0
votes
0answers
20 views

Database modeling for big data (big set of points X big sets of possible values for each points)?

I'm building a PostgreSQL database with the intent to host modelisation results for different projects. Each project has a set of receptors points (~5000-10000 receptors) and have many results sets (...
1
vote
2answers
87 views

Creating weighted lines on map in CartoDB

I am trying to illustrate global trade flows within CartoDb. Flows are visualized by a line connecting two lat/long points on a map. The size of the flow would be represented by the width of the line. ...
3
votes
1answer
333 views

Conflicts while installing postgresql9.3-postgis2.1,QGIS and gdal-bin

I want to use postgresql9.3-postgis2.1 and gdal-bin parallel . I have refer instruction here for installing postgresql-9.3 on ubuntu 12.04. I have install qgis from here While installing gdal-bin it ...
0
votes
1answer
29 views

connecting Postgis, Python, Openlayers

I'm in the process of learning Geo-mapping and I'm curious to create a web-application Python-Django, Openlayers 3 and PostGIS. I need to know whether Django can be combined with PostGis and ...
0
votes
0answers
11 views

Alignment in ST_Intersection with PostGIS raster

Trying to intersect two rasters, but they don't have the same scale. I have to do everything in one query. The query below gets the following error: The two rasters provided do not have the same ...
0
votes
1answer
106 views

Parse and load GPX into database? [closed]

Having a PostgreSQL database, with the following tables: CREATE EXTENSION postgis; DROP TABLE IF EXISTS trips CASCADE; DROP TABLE IF EXISTS locations CASCADE; CREATE TABLE IF NOT EXISTS trips ( ...