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

learn more… | top users | synonyms

2
votes
0answers
35 views

Use of postgis with hibernate

We have an existing postgis database. Our application is developed in Java, but queries database through a jni dll, which appears to be not very effective for our purpose. I've managed to migrate to ...
3
votes
1answer
87 views

Using OpenStreetMap for simulation of commuter routes

I'm seeking some advice on how to build a simulation based on OpenStreetMap Data for my masterthesis. My knowledge of spatial data is very limited, since I come from another field of science, namely ...
2
votes
2answers
192 views

Problem with running PostgreSQL 9.3 after installing pgRouting

I have PostgreSQL 9.3 installed on the server. It worked just fine. I also had a webservice which connected to a database. That also worked like a charm. Later, I decided to install and use pgRouting. ...
5
votes
2answers
68 views

Working with address data extracted from *.osm

My goal is get all the addresses from a certain country, ideally - from all countries, but for now - only from one. I downloaded an *.osm file from here http://download.geofabrik.de/ for a certain ...
2
votes
1answer
52 views

ST_Within for TIN or 3D objct in PostGIS

I would like to query if a point is located in the TIN object. My TIN object is closed (convex hull) object (i.e. surface of a round object). I tried to use ST_Within, but the error message returns ...
3
votes
1answer
33 views

PostGIS ST_ConvexHull for cube corners not as expected

I'm new to PostGIS and am wondering whether ST_ConvexHull will be of use in a particular work problem. Trying out some simple cases to make sure I understand what it's doing, I didn't expect this: ...
1
vote
1answer
32 views

function ST_Line_Interpolate_Point with multilinestring

Is there a function like ST_Line_Interpolate_Point but using a multilinestring?
3
votes
2answers
234 views

Importing .shp to postgreSQL

I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd: shp2pgsql -s 4326 worldCountries.shp worldcountries ...
2
votes
1answer
84 views

How to calculate the shortest distance for multiple source and targets using PgRouting?

I have a table with points and a road network which includes driveways (where you enter the highway). I want to find the point which is closest to a driveway. So I was thinking I can calculate the ...
3
votes
1answer
72 views

Moving SpatiaLite Table into PostgreSQL using ogr2ogr?

How can I move a Spatialite table from a Spatialite db to a PostgreSQL db using ogr2ogr?
2
votes
0answers
83 views

Rotation by attribute in Geoserver SLD style

I have a table with field calculated by function: NEW."rotationAngle" := degrees( ST_Azimuth( ST_StartPoint(NEW.the_geom) ...
2
votes
1answer
81 views

nearest facility with pgrouting

I have a postgres table of students with lat, lon and geom, , and a table of schools with the same, and a table of roads that has been converted to nodes. I'm trying to find the driving distance to ...
3
votes
1answer
48 views

How to quickly extend PostGIS's R-Tree implementation?

I am working on a problem where along with data points location, I also have information about the connectivity between points.(Think a graph of points, where an edge denotes some relationship) My ...
1
vote
1answer
54 views

Postgres/PostGIS: Dissolve multiple fields with COUNT (Point shape)

I have loaded point .shp feature classes into Postgres 9.3 db, and enabled postgis,plpgsql,postgis_topology extensions. I'm looking to dissolve multiple fields within a single table 'TABLE1' and add ...
2
votes
1answer
55 views

Delete duplicate polygon nodes with PostGIS

I'm trying to delete duplicate nodes from a shapefile with QGIS, but after running the tool to delete it, nothing happens and shows the same errors. I thought that maybe importing to postgis could be ...
7
votes
1answer
203 views

How do I calculate Manhattan distance with PostGIS?

I am using the ST_Distance function to calculate the distance between two geometries (a train station and a building) Since I know that all buildings and all train stations are in Chicago, which has ...
1
vote
1answer
42 views

Error inserting GeoJSON in PostGIS

I know there is a similar question but I am getting a different error and none of those answers have helped. I am trying the following query (the GeoJSON itself is from the PostGIS website. INSERT ...
2
votes
1answer
56 views

How to find a nearest line to a point

I have a table with many points that need to be associated with street segments to calculate an average value. should I do a relationship for all points to a street segment that is closest. I have ...
2
votes
0answers
43 views

How to get the nearest points from pgrouting linestring result?

I'm trying to get the points or landmarks near from the result of pgrouting linestring( the shortest path ). I'm using OSM map entities and working with planet_osm_point. Here's my codes. SELECT ...
1
vote
1answer
44 views

Adding SRID 3857 to spatial_ref_sys

My application is throwing the following error: DatabaseError: GetProj4StringSPI: Cannot find SRID (3857) in spatial_ref_sys I'm guessing (as stated above) that I need to add the SRID 3857 to the ...
2
votes
0answers
60 views

Weird-looking France after OSM import with osm2pgsql

After importing france-latest.osm from Geofabrik, using osm2pgsql, it seems that the polygon attributed to Metropolitan France (osm_id = 1403916) is a bit odd: I'm far to be a geography expert, but ...
3
votes
1answer
91 views

Get default values from PostGIS DB in QGIS 2.4 editor

One of my postgis tables tables automatically includes the nextval(xxx) in the edit feature form in qgis(and I think will also update ids of multiple features automatically). The other seems to have ...
1
vote
1answer
40 views

Geoserver Postgres Configuration

My imported postgres database size for plane.osm is more than 300GB under slim mode. It added four tables for Tiles Creation. planet_osm_line, planet_osm_road, planet_osm_polygon, planet_osm_point ...
1
vote
1answer
59 views

raster2pgsql does nothing

I try to load rasters through raster2pgsql. I try to call it through pgAdmin command line, but when I call any raster2pgsql command (even raster2pgsql -G), it does nothing, I just get another line to ...
-4
votes
1answer
63 views

What are some use cases for GeoServer? [closed]

I am new to GIS area and am having trouble understanding what GeoServer is. Even after reading their site and the wiki page I am struggling to understand its usage. What does it mean by -- "allows ...
2
votes
2answers
54 views

OpenGeo postgres installation not working from command line but works from PGadminIII on fresh install

Problem: I just did a default install of opengeo suite (4.1) on Ubuntu 12.04 and followed instructions exactly. The problem is that I can connect just fine to my postgresql through pgadminIII ...
5
votes
2answers
60 views

How to select random adjacent census tract

I have set of census tracts spaced out across a city and I would like to randomly choose an adjacent census tract to explore nearby demographic data. I'm not sure if there is an easy process for ...
2
votes
1answer
84 views

How to use pgsql2shp when PostGIS extensions installed in a separate schema as geometry

I have the PostGIS extension (postgis functions and spatial_ref_sys table) added to a specific schema called postgis. I'm wanting to run the pgsql2shp utility with a select query on geometries stored ...
0
votes
1answer
49 views

How to query a PostGIS database through Geoserver and OpenLayers

I've built a web application using OpenLayers, which is connected to my PostGIS database through Geoserver. Now that I'm able to successfully display all of the layers, I'd like to add ...
1
vote
1answer
60 views

PostGIS: ERROR: lwpoly_from_lwlines: shell must have at least 4 points

I have achieved to close lines in order to build a polygon with: st_addpoint(st_makeline(geom ORDER BY .cd_noseq), st_pointn(st_makeline(geom ORDER BY cd_noseq), 1)) but then, when I try to make a ...
1
vote
3answers
94 views

PostGIS importing shapefile error w/ official manager

I'm having some trouble when trying to import an shapefile of the Sao Paulo Brazil's state (I downloaded it from the web and I'm using the own PostGis manager to import it). Here's an image! The ...
2
votes
0answers
33 views

GeoServer ImageMosaic PostGIS index update

I use GeoServer where I created an ImageMosaic storage following this manual. When I create new datastore, all *.tif files are indexed into DB (PostgreSQL with PostGIS). How can I create new index in ...
1
vote
1answer
122 views

Simplifying Shapefile without risking Spatial Accuracy?

I am building a feature for a web application. Basically would use the ABS (Australian Business Statistics) data to render the regions on the Google Maps. I am able to implement the basic working ...
0
votes
1answer
45 views

How to insert a feature using WFS-T based on a criteria?

I am pretty new to WFS/WFS-T and need help with some suggestions on how the following requirement can be implemented. We have a need to insert a feature into a PostGIS database based on the following ...
2
votes
1answer
56 views

How to concatenate geometries?

I use the sql below it returns me several geom_way: SELECT St_astext(geom)FROM pgr_fromAtoB('ways',-51.1995,-30.0487604,-51.2157942,-30.0469069); Return: LINESTRING(-51.1995 ...
1
vote
1answer
39 views

I'm not able to save edited layer connected via PostGIS in QGIS

I have project and i was doing editing layers in QGIS. These layers are connected in QGIS via PostGIS. 1 layer of the 4 layers was saved correctly but other layers gave me error message. Error ...
1
vote
0answers
30 views

How to dissolve inner polygons in a multipolygon

I'm trying to get the boundary of a collection of zip codes. Here is my current sql: SELECT ST_AsText(ST_SimplifyPreserveTopology((ST_Union(geom)), .003)) as poly FROM zcta5_data WHERE zcta5 IN ...
2
votes
2answers
70 views

How do I select Census Block Groups inside a Zip code?

Long time listener, first time caller. I already have my data imported, problem is my SELECT statements aren't yielding the results I'm looking for. I specifically need all the Block Group ...
1
vote
0answers
45 views

How to calculate bus route transfer by using pgrouting?

Let say I have route 1 from A -> B -> C, route 2 from C -> B -> D, how can I write SQL for pgRouting which can let me have the result route 1 -> route 2 when I want to get the shortest path from A ...
0
votes
1answer
67 views

Geoserver+postgis+leaflet

I have been using the getfeatureinfo operation on layers published from shapefile and it works however the data which is being served from within postgis throws an internal server error. I am not sure ...
5
votes
2answers
108 views

How to replicate ArcGIS Intersect in PostGIS

I'm trying to replicate this ArcGIS process in PostGIS: http://blogs.esri.com/esri/arcgis/2012/11/13/spaghetti_and_meatballs/. This describes how to break buffered points down into polygons based on ...
1
vote
0answers
62 views

How to calculate the average distance among set of points as measure of closeness

I have three series (or tables) of points in PostGIS which I want to compare. I would like to know how "close" each series is when compared to the other two. In other words I would need some measure ...
2
votes
2answers
100 views

How to create more networking osm

Using localhost page generated by osm2po roteamente noticed that the link is made to link even disabling snapping. Logically thought to create more nodes in the network, but how can I do this ...
1
vote
1answer
45 views

Associating location data from PostGIS for a Choropleth map?

I'm trying to build my first choropleth map from data that we have stored in our PostGIS enabled Postgres database. So far I've been able to build a map on Mapbox using a topojson set of UK postal ...
1
vote
2answers
49 views

Get km route between two points with lat / lng

I'm doing the following query to get the distance between two points with pgrouting: SELECT sum(cost) AS cost FROM pgr_dijkstra( 'SELECT id, source, target, km as cost FROM ...
2
votes
3answers
60 views

How to display a table with more than one geometry column in QGIS?

In PostGIS, it is possible to use addgeometrycolumn more than once on the same table. Example: I have one table "scenes" with many attributes, and 2 geometry columns: the_geom1 and the_geom2. select ...
1
vote
1answer
46 views

Implementing Wrapper of PostgreSQL?

How can I implement the Wrapper of PostgreSQL? I found this useful looking wrapper from a FOSS4G routing with pgRouting Workshop but I do not know how to implement it!
5
votes
0answers
34 views

How to extract sublinestring from a linestring with overlapping segments

Problem statement: Given a bus route (defined as a linestring ln.the_geom), and a set of bus stop locations (pt1.the_geom,pt2.the_geom,...ptn.the_geom), divide the bus route into segments between bus ...
9
votes
2answers
291 views

What is the best hack for importing large datasets into PostGIS?

I have to import large Shapefiles (> 1 million records) into PostGIS, and I have been wondering about the best way to do it. In my question I used the word "hack", instead of tool, on purpose ...
1
vote
1answer
35 views

Does PostGIS have a Vincenty Distance calculation?

I have compared some distance calculations between geopy and PostGIS ST_Distance_Sphere, and it seems that PostGIS ST_Distance uses a calculation that is similar to the great circle distance rather ...