Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
36 views

How can I render the postgis layer to the openlayers map viewer?

I have a postgres table which is storing the dynamic GPS point data. The geom column has been created. Is it possible to render the last 10 mins GPS data to the OpenLayers map? Is there an example? ...
1
vote
1answer
35 views

PostGIS get geometries within a radius of n meters using WGS84 [duplicate]

select * from zones z where st_intersects(z.geom, st_Buffer(ST_SetSRID(ST_Point(2.336031, 48.863172), 3857),1)); It looks like the 1 in the st_buffer is being interpreted as degrees, I need to find ...
0
votes
0answers
15 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, ...
1
vote
0answers
40 views

What is wrong with my WFS-T protocol setup?

So I want to transfer some Vector Layer Features from javascript code to my geoserver and then to postGIS, my code looks like this: saveStrategy = new OpenLayers.Strategy.Save(); ...
2
votes
0answers
45 views

How to get user and password of a PostGIS layer

I wonder if it is possible to get the user and password for a PostGIS database if they are stored in the PostGis connection information. I get the connection information at the moment from the ...
1
vote
2answers
52 views

Viewing large set of polygons in PostGIS using OpenLayers?

I am prety new to GIS. I have set up a postgis database with al large dataset and a openlayers front-end to display it. But since the dataset is getting prety big I am looking for a way to only load ...
0
votes
1answer
22 views

Delete all data from a PostGIS topology

I need to delete everything (faces, nodes, edges, anything I'm not thinking of) from a PostGIS topology, but I want to keep my database schema (schemas, tables, columns, sequences, etc.) intact. Is ...
0
votes
1answer
36 views

selecting elements of a specific geometry type in PostgresSQL/PostGIS

I was reading a postgis tutorial and noticed that unlike working with shapefiles, one can actually store different types of geometry in postgres. In a table created with multiple geometry types, the ...
2
votes
1answer
35 views

What are the PostGIS Raster Constraints used for?

My question is quite basic, but I have not found a simple explanation of why raster constraints are useful. I have worked with rasters in PostGIS for a while but only recently I realized that I do ...
1
vote
1answer
71 views

How to change the postgresql table to support postGIS?

I have a postgresql database which there is the table have lat & long columns. The postgresql does install the postgis extension. My question is how can I change the table with lat & long ...
0
votes
1answer
34 views

How to load postgis raster layers into R?

It is easy to get Vectorlayers into R from a PostgreSQL+PostGIS solution. library(rgdal) dsn="PG:dbname=plots host=localhost user=test password=test" plots = readOGR(dsn,"Plots") But how to do the ...
0
votes
0answers
28 views

numeric issue while loading floating point-valued GeoTIFF into PostGIS

I am trying to import a floating point GeoTIFF image into PostGIS (2.1), using the following command: raster2pgsql -s 4326 -I -M -F -C tif_dir/*.tif public.map | psql -U postgres -h localhost -d ...
0
votes
1answer
61 views

How to transfer a WKT string from OpenLayers to Geoserver or PostGIS?

Supposing I have created a Vector Layer in OpenLayers and then transformed it to WKT or GeoJson, how can I export it from OpenLayers, and possible import it to PostGIS or GeoServer?
0
votes
0answers
54 views

Importing a Raster into PostGIS 2.1 (Windows 7)

I am trying to learn how to import rasters into PostGIS (2.1). I have read through all the material I can find on doing this and know that the recommended tool for this is the raster2pgsql tool. I ...
1
vote
1answer
39 views

Loading raster in postgis and link it with an existing table

Relatively new to PostGIS and I am currently exploring the options to make one of my PostgreSQL Tables spatial. Essentially I want to store a raster object in a table that also contains essential ...
1
vote
1answer
63 views

How to migrate Postgres table having Lat Lon columns to an existing PostGIS database?

I am having Postgres database table with Lat Lon columns (degree, minutes, seconds) as shown below : CREATE TABLE population ( id double precision, idno text NOT NULL, place text, state text, ...
3
votes
1answer
47 views

How to use ST_HausdorffDistance (PostGIS, QGIS)

I want to snap the GPX-track to the road network as the image below shows. I found out, that "Hausdorff Distance" is exactly what I need and that it is usable with PostGIS. But unfortunately I have no ...
1
vote
1answer
67 views

How to transfer layer data from OpenLayers to PostGIS database or QGIS?

Supposing I have a created some layers in OpenLayers containing only Geometry Points, how do I transfer my data to a postGIS database? Is there a way to turn pure javascript/openlayers to a table in ...
2
votes
0answers
41 views

How to plot heatmap/locations in Geoserver & Openlayers map from the Lat/Lon data of PostGIS table?

I am using Geoserver, Openlayers, PostGIS for Geospatial web implemenation. I have an Indian map shape files for States, Districts, Talukas. I am able to generate a map with states, districts, ...
1
vote
1answer
354 views

Why use a database when you can have all of your data in javascript/openlayers?

I have a really simple and basic question. First of all, I have to mention that I am pretty new to web applications and GIS. I am working on a web application using Openlayers, Postgresql/postGIS and ...
1
vote
1answer
12 views

Close linestring to linering in PostGis

is there a function which closes a linestring to a linering? I couldn't found such a function in the documentation. Thanks.
1
vote
0answers
29 views

Comparing and updating two large tables

I'm using CartoDB to sync the status from tables using a common ID on each one. The problem I found it's the tables are too large, over 29k rows. Here is the query I'm using and the gives me an ...
0
votes
2answers
40 views

Installing TIGER geocoder

I am trying to install the tiger geocoder for postGIS. I am using the 2.1 version of postGIS on Windows 7. I am using this set of instruction to do so. I am confused by what they mean be edit the ...
3
votes
1answer
31 views

Connection trouble GeoExt to Geoserver Layer

I'm so sorry for my english, it's not the best. I'm trying to modify my postgres geographic table with this code: Ext.onReady(function () { OpenLayers.ProxyHost = "proxy.ashx?url="; var ...
2
votes
2answers
47 views

How to convert a raster to lat/lon points

I am working with the tri.txt (terrain ruggedness index) file from this paper: http://diegopuga.org/data/rugged/ I've uploaded the raster data from the file into ArcMAP and now have it as a .tif ...
6
votes
1answer
74 views

one label for two-lane roads (osm, qgis, postgis)

I labeled my osm-lines-layer (PostGIS) with symbols for primary roads and motorways. While the symbols for the primary roads are well placed - with enough distance between each - the two-lane motorway ...
1
vote
3answers
44 views

Disconnect QGIS from database without closing the whole program

I'm making PostGIS queries to a GIS database from python and I'm using QGIS to visually check the results of my queries, but every time I want to run a new query I have to close QGIS because it keeps ...
1
vote
1answer
31 views

How to create a routable network with PGRouting

I have two sets of data Table A: Stations - contains postal code (which I can convert to lat/long), name and code. Table B: Connections - contains a possible list of connections including source, ...
6
votes
2answers
71 views

Similarity between two or more trajectories

I have the data of trucks (http://www.chorochronos.org/). This data are gps coordinates of multiple trajectories of trucks in Athens. I have to calculate the similarity between the trajetories, in ...
1
vote
2answers
59 views

take from multilinestring the start & end points

I have to use the A* algorithm and my geometry is in multilinestring and i want to take stratpoint(x1,y1) and endpoint(x2,y2) . I use this queries but the colums after the execute is still empty ...
2
votes
0answers
29 views

OpenGeo: GeoExplorer cannot upload shapefiles into PostGIS

I have installed OpenGeo 4.1 on Ubuntu Linux 12.04 following the official instructions. I then followed the tutorial Load your data with GeoExplorer. I was able to zip and upload a few shapefiles. ...
2
votes
1answer
52 views

Query to get convex hull

Is the below query correct to get a convex hull shape: DATA "the_geom from (select ST_ConvexHull(ST_Collect(the_geom)) As the_geom FROM xyz) as foo using unique id using SRID=XXXX"
1
vote
0answers
23 views

Error in querying data

I have a mapserver file as below , I get blank page with no map executing this query: NAME var DATA xyz STATUS ON TYPE POINT DUMP TRUE ...
3
votes
0answers
48 views

Create a Shape file from Sql dump file

I am trying to map data by querying a table called xyz. I need to show the the_geom data on the map. I have below query in my mapserver .map file: DATA "the_geom from xyz using unique id using ...
2
votes
1answer
59 views

Order by geometry columns

I am wondering how it really works, I mean "order by" statement when it comes to geometry/geography columns in postgis/postgresql. Besides that really need a way gather rows from a table with a point ...
0
votes
0answers
21 views

at which location to run psql2shp command in linux [duplicate]

I have linux system which I have connected remotely and I am not able to use $psql2shp command in the command line. I went to /usr/local/pgsql/data to run the command but I was unable to run. I dont ...
0
votes
1answer
45 views

Rollback error when restoring SQL dump file in postgresql using PSQL console via Pgadmin

I am trying to restore a pg_dump SQL file into my postgresql database using PSQL console , where I typed the below command: \i 'c:/../path/to/sample.sql' when I run this I get an error saying ...
2
votes
2answers
68 views

Where to type pgsql2shp command

How to convert post gis database into shapefile, I found that I need to use pgsql2shp command on postgis database query , But how to use it and where to use it. Do I have to use it in the postgre sql ...
2
votes
1answer
36 views

How to populate geography point using ST_MakePoint(long, lat)

I have a table called customer_campaign, and there is an empty column geom(geography) in it. So I want to fill it up by using ST_MakePoint(long, lat) in PostGIS, lat and long are two columns in the ...
0
votes
0answers
36 views

Geoserver ( Java.exe ) cause server to run 100%

Our server runs at 100% CPU when using map services build on geoserver + postgresql I can not find anything in geoserver logs. It is Java.exe takes 100% CPU and because of that server can not do ...
1
vote
3answers
101 views

How to export streets in a certain area from one shapefile to a new shapefile?

I have a shapefile with the roads from Europe and I want to export in a new shapefile only the roads from Greece. I tried to delete the other roads but there are too many and I have no attribute to ...
1
vote
1answer
30 views

How can I strip out M values from a MULTIPOLYGON with PostGIS?

The title is self-explanatory. I wonder if there is a simple function like ST_Force2D for the M values?
4
votes
2answers
110 views

Split lines at intersection points

I've got some linestrings covering a road network, and need to split them at the crossroads. Does anybody have any idea on how to do it? I'm using QGIS 2.4, with a Postgis 2.1.3.
1
vote
0answers
36 views

Clustering the WGS84 point features (projection transformation aspects)

My question is quite trivial and was discussed many times before (like here) but in our case it has the confounding extra requirements... The list of sparsely distributed 2d point features is stored ...
2
votes
1answer
36 views

Performing equivalent of ArcGIS Identity_analysis (line with poly) using PostGIS?

I've got a section of arcpy code that I need to port PostGIS: Identity_analysis with the in_features being a line featureclass and the identity_features being a polygon featureclass. I'm primarily ...
2
votes
0answers
41 views

Rebuilding a Polygon from the points within it, in PostGIS

This question is an update on the problem formulated here. I wanted to redefine the border of a set of polygons, in order to "smooth it". My first approach (described in the former question) was to ...
2
votes
1answer
45 views

Redefining the border of a polygon in Postgis

I have a PostGIS algorithm that writes a table with "pixelated" polygons, that I will call "clusters". My idea is to smooth the edges of these clusters using concave hulls (ST_ConcaveHull). To do ...
2
votes
1answer
53 views

Positons from GPS lanes inside a polygon

i have a lot of lanes like the orange lanes at the below picture (latitude and longitude values). Now i need all values from each lane inside the red polygon. What is the easiest way to realize ...
0
votes
1answer
26 views

A Tool for Mapping Metropolitan Statistical Areas (MSAs) to Addresses

My and team and I ran a series of zip codes from addresses within our data set against MSA to Zip Code data found on The Census' website here. We found that a relatively high number of the addresses ...
1
vote
0answers
68 views

All map services display pink tiles

I have implemented mapserver in Ubuntu 14.04 with postgresql 9.3, postgis and imposm using GitHub tutorial. After completing the tutorial all map services display pink tiles not map info. i was not ...