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

learn more… | top users | synonyms

0
votes
0answers
82 views

Error adding Geoserver store from PostGIS

I cant get a connection up when creating a PostGIS-store. Geoserver is running fine on IP:80/geoserver. PostGIS is running and working fine with psql commands Created database/table 'mydb' and ...
0
votes
1answer
59 views

an efficient way to find the pgrouting edges contained within an isochrone

So I am working with some pgrouting road network data in postgis2.0/postgresql 9.1. I am interested in routing around certain types of disasters like tornados or such. If a disaster event happens at ...
1
vote
1answer
69 views

ERROR: line_locate_point: 1st arg is not a line

My test scenario is to confirm the image below, I select the points on the line in order of the direction the line was drawn. I used the sql: Select testepoint."id" FROM testepoint ...
1
vote
1answer
54 views

can I add additional data to an existing pgrouting postgis database using osm2pgrouting?

This is just a simple question but I could not find the information in the documentation. If I have an existing pgrouting database table named routing, can I add additional OpenStreetMap data to this ...
0
votes
1answer
116 views

POSTGIS raster/Java with GDAL bindings - Load byte array in Gdal Dataset Object

I would like to load a raster as java.awt.image.BufferedImage (or equivalent class that would allow to perform some display) out of my PostGIS database. My Raster is inDb (loaded with raster2pgsql) ...
0
votes
1answer
222 views

Error importing shapefile into postgreSQL using shp2psql

I've tried this a few different ways and keep getting the same error. I have a shapefile currently in WGS84 UTM Zone 15 which is SRID 32615. I used the ArcMap multipart to singlepart tool to create a ...
1
vote
0answers
50 views

Point in Polygon operation for 100G of data

I have lat/lon point locations for over a billion points, all based in the US. For each point I would like to generate a dataset that links them to their county and to their MSA according to US Census ...
0
votes
1answer
61 views

Sql to view points of intersection with line not working

I have two tables one called test lines and other points called testepoint with some geometries drawn in QGIS to test my sql. Are as in the image below: I want to select the points that inteceptam ...
4
votes
2answers
149 views

How to connect points (bus stops), which don't lie on the lines (LINESTRING), to a network?

I need to connect bus stops (points) to a network layer (OSM data). These bus stops do not lie directly on the lines (see screenshot) nor should their location be moved. I use PostGIS, pgrouting and ...
1
vote
1answer
161 views

How to calculate the track length of GPX files with PostGIS?

I am trying to calculate the length of a GPX track. The original GPS data looks like this: <?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <gpx ...
0
votes
0answers
28 views

postgis — return records sorted by size of st_intersection

I have two sets of spatial records in two different tables. I'm in rails so I'll show my code in that way seeing that its source: one set is CensusPlace records, which are US Census Tigerline ...
0
votes
1answer
85 views

Import raster into PostGIS using Python

I am trying to import information from a Bathymetric Attributed Grid (BAG) file into PostGIS using Python and psycopg2. I'm working, for now, on a Windows box with pre-compiled packages, so I don't ...
0
votes
2answers
94 views

ST_Expand return different results depending on meters [duplicate]

I am very confused by getting different results from st_expand (srid 4326). I want to do a search within a bounding box, therefore I pass a point and I'd like to provide distance in meters in order to ...
1
vote
0answers
43 views

PostGIS automatically creating geometries after importing using QGIS DB Manager

I have a shapefile consisting of linestrings, in which some of the features have null geometry. Yet, after importing it to PostGIS, using QGIS' DB Manager, a geometry is created for those features ...
0
votes
1answer
93 views

Add GPS tracks directly to a PostGIS table

Disclaimer: I am a total GIS newb and I have a use case I have not seen elsewhere. Background: I drive country roads looking for old building, cemeteries, school houses, etc and I record the ...
3
votes
1answer
143 views

Local Copy of OpenStreetMap of my City in PostGIS Database

I would like to use OpenStreetMap vector data for land cover analysis in my city. Here is my goal: I set up a PostGIS database with the city area extent (around 20x20 km) on my server. I will ...
2
votes
1answer
118 views

Using PostGIS functions in ArcGIS Desktop for Layer Definition Query?

I am connecting ArcGIS Desktop 10.2 to Postgis 2.0.3 with PostgreSQL 9.2.4. No SDE. I can load data with no problems and access the data in ArcMap. However I can't seem to use PostGIS functions within ...
3
votes
2answers
88 views

How do you determine how straight a LineString is? [duplicate]

I have a bunch of LINESTRINGs and need to classify them based on how strait they are. My idea is to compare the length of the LINESTRING to the distance between the first and last POINTs. I'm ...
2
votes
1answer
43 views

Postgis Raster merge geometry

I have a raster table and a geometry table in postgis. My goal is to create a single raster merging elements from both:- WITH geom_raster AS ( SELECT wkb_geometry, ST_AsRaster(wkb_geometry, ...
7
votes
3answers
1k views

QGIS, Postgis: Geometry type does not match column type

I'm trying to import some polygon shapefiles to Postgis in QGIS via SPIT. One of them can't be imported and returns this error: ERROR: Geometry type (Polygon) does not match column type ...
-1
votes
1answer
163 views

how to build and install pgrouting-2.0 on postgresql-9.3 on ubutntu 12.04 Lts precise?

I try to build following instructions from this link https://github.com/pgRouting/pgrouting after downloading from the github. I have done the cmake command and there is my error output: ...
5
votes
1answer
618 views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
14
votes
1answer
356 views

How to query OSM for all beaches facing west? - QGIS preferred

I want to identify all beaches on this planet (or a given subset of it) that are facing westwards (+/- 20-30 degrees). My idea is to use OSM as the data source. Extracting all polygons that have the ...
4
votes
1answer
158 views

PostGIS table to network analysis

I use PostGIS 2.0 and Python API (GeoAlchemy) to work with it. I want to convert topological informations (points, lines, faces) from PostGIS tables to topological network (points, lines) to study it ...
2
votes
1answer
93 views

PostgreSQL : how do I make this sum [closed]

I have this huge table with all the addresses of my country in it. Every house is an object, and there is a column for the streetname (or street ID) and a column for the housenumber. I want to make a ...
0
votes
1answer
56 views

Mapserver openlayer postgis spatial data are in postgis but label I want to display from webservice

My database of spatial data wkb is in postgis and my textual data is in sqlserver now is it possible to show labels through webservice. I have common id in both the database through which I can join ...
0
votes
2answers
78 views

QGIS Connection PostGIS and shapefile

I'm working on QGIS with a database created in PostGIS and a shapefile. Inside the database, I have geometry type data about location of some points, instead on the shapefile there some selected ...
4
votes
2answers
394 views

How to group connected linestrings in PostGIS?

I have a table of streets I've selected based on a set of attributes (let's say it's speed_limit < 25). There are groups of streets that are locally contiguous; I'd like to group these sets of ...
2
votes
2answers
145 views

How to get the data type of each column from a postgis table

I need to get the column data types of all columns in a table, including the geometry types. What I wanted to know is if there is a function or SQL that gives something like this: column_name | ...
4
votes
0answers
59 views

Compute visibility graph on sphere

I have a PostGIS table with some polygons (stored using the geography data type). They represent regions on a spherical earth. For each pair of vertices chosen from among all the polygons, I want to ...
1
vote
0answers
27 views

Use pgRouting with a PaaS

Is it a way to use a postGIS/pgRouting enabled database with a PaaS like Windows Azure? If not, do you know alternatives?
1
vote
2answers
234 views

Searching planet_osm_point by longitude and latitude

I used osm2pgsql to import data into my PostgreSQL database and it put gave me the following 4 tables, planet_osm_point, planet_osm_line, planet_osm_polygon and planet_osm_roads. I have looked at ...
0
votes
1answer
64 views

TileStache:TileStache.Core.KnownUnknown: Couldn't get a layer from data source!

I want to use tilestache to get geojson files. I hava run tilestache-server.py -c tilestache.cfg ,and it works well. However,I want to get tiles from data stored in postgis. Maybe it will need to run ...
2
votes
1answer
35 views

Only Draw Geometric Objects Above 8th Parallel North

I have many geometric objects (in both SRID:4326 - the_geom - and SRID:3857 - the_web_geom - in PostGIS extension tables of PostgreSQL), including country boundaries, for the country of Ghana and I ...
1
vote
2answers
49 views

Getting OSM data for a particular jurisdiction

I'm trying to make a street map of New York City (and only New York City). I've downloaded OSM data for the area (from here), but it contains lots of data from the suburbs. Currently, I've loaded ...
0
votes
1answer
42 views

Export .dbf maintaining column data type

I require a shapefile's .dbf to contain two types of text columns VARCHAR(n) and CHAR(n) to meet specs (attribute format) of gov receiving body. Have to send them the .shp, .dbf and .prj. Within ...
1
vote
0answers
57 views

Focal Mean of neighbors using ST_DWithin on points in PostGIS

I'm trying to calculate focal means on a grid of points in PostGIS. I know that a raster calculation would be more efficient, but I only need to run the algorithm once to get the data, so I don't ...
1
vote
2answers
64 views

How can I speed up these queries

I am trying to make some calculations using PostGIS and PostgreSQL. There are 3 important tables : wbn, wgo and wvb. These tables have about 500.000 objects in them (geometries). The problem is that ...
1
vote
0answers
41 views

PostGIS 3D Extrude function

I selected buildings from OSM (which represents my city). I insterted a new column 'height' and I filled with a random number exactly number 2, so every building have 2metres altitude. Buildings are ...
1
vote
0answers
19 views

How to simplify a polygon down to X amount of points?

If I have a polygon that has 100000 points, how can I calculate what the tolerance should be to simplify it down to 1000 points using ST_SimplifyPreserveTopology?
0
votes
2answers
121 views

How to get feature from PostGIS to OpenLayers with ASP.NET?

I need to show my feature from this table in PostGIS in my ASP.NET web page web. Has anyone done that?
0
votes
1answer
53 views

How to get a distinct pair of column values based on minimum of another (computed) column?

I have two tables with point geo data, one (sfc_obs) with weather stations (names), one (smos_grid) with satellite pixels (dggs), and I'm trying to find which dgg is closest to each name using ...
1
vote
2answers
96 views

What index to use in this situation

I am working with 3 tables with 3 x 500 000 rows. There is one column that gives each object a unique ID (UIDN), there also is a column with the geom data (the_geom). There also are some other columns ...
3
votes
1answer
95 views

MS SQL Server 2012 to Postgresql

How to use MS SQL Server 2012 spatial database in postgresql using foreign data wrapper?
2
votes
0answers
146 views

Raster slightly displaced after exporting from PostGIS database

With the following queries I've exported a raster (GTiff) from my postgis database: 1.Creating a large object: WITH buffer AS ( SELECT id, ST_Buffer(geom,50) AS geom FROM ...
1
vote
1answer
69 views

How to split/divide linestrings of larger lengths in postgis

I want to split/divide linestrings in my data. I have roads data and I want to have every road segment having length not more than 250 meter. Check the shape length of this particular line feature. ...
1
vote
1answer
87 views

Trouble using ogr2ogr w/ -s_srs to combine inconsistent EPSG files into my postgis DB

I'm having trouble combining shapefiles from TIGER and different local governments into a single postgis db to query legislative locations. I've imported all data to multipolygon geom, but found some ...
1
vote
1answer
92 views

3D functions with SFCGAL in PostGIS

I have this setup: "POSTGIS="2.1.2 r12389" GEOS="3.3.8-CAPI-1.7.8" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.8" LIBJSON="UNKNOWN" TOPOLOGY RASTER" on ...
0
votes
0answers
30 views

How to split a polygon by a polygon and apportion attributes - postgis [duplicate]

I would like to split polygons by polygons and have the numerical attributes be apportioned. For example: I have a parcel that needs to be split by region. With How to split polygons with another ...
1
vote
2answers
132 views

What is the best way to take a WKB value in SQL Server Management Studio and create a PostGIS geometry in PGAdmin III?

Normally, I would just use WKT strings but I'm investigating some possible geometry weirdness with the Text methods in SQL Server. I would like to copy/paste the WKB values from the SQL Server ...