Tagged Questions

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

learn more… | top users | synonyms

0
votes
1answer
12 views

Using AJAX to run a PostGIS SQL statement and display result via GeoServer

I am learning Web GIS, and I can't find a good example that gives a big picture of a web interface of running spatial analysis using PostGIS. What I am looking for is a graphical/GIS version of ...
0
votes
0answers
7 views

return state of point from postgis / mapnik pgsql db

I realize that I can confirm whether or not a point lies within a state like this: SELECT ST_Contains(poly,pt) As testr FROM ( SELECT ...
1
vote
0answers
15 views

PostGIS Unknown colormap keyword

I'm working with thematic maps with ST_ColorMap function smoothly until I try to create my own thematic map(colormap). WITH canvas AS ( SELECT ST_Raster( ...
2
votes
0answers
34 views

Export PostGIS line to AutoCAD with graphical direction information

Some time ago I managed to export from PostgreSQL to AutoCAD DXF format a line (LINESTRING) using ogr2ogr program with a PostgreSQL Query, and it works (I can visualise it by the QuantumGIS). Now I ...
1
vote
0answers
13 views

How to export a postgis table to a pbf file?

I need a tool like osm2po or osm2pgsql but that does the opposite thing, convert a postgis table to a pbf file. I think qgis can do this but I can't find that option.
1
vote
0answers
13 views

Adding PostGIS query layer says Query class name is invalid?

I am having issues with adding postgis query layers in ArcMAP 10.2.2.3552, not doing anything special just adding a layer, this works in 10.2.1 so I don't know if its a bug or something Also this ...
5
votes
2answers
35 views

How to draw radius of a circle using PostGIS

I have generated circular buffers of points in a shapefile. The generated circles and points share a common ID/key, say pt_id. My question is Is it possible to use PostGIS to generate a third layer ...
1
vote
0answers
19 views

Issues with QGIS WFS editing/PostGIS rendering

I want to be able to view and edit spatial data within a postgis database. I have tried using a WFS with Geoserver - but constantly get 'Empty Response' error and the Network log says the request ...
0
votes
2answers
48 views

Converting coordinates to 4326 for Google Maps.

I have a MultiLinestring, example coordinates, (698745.50201423 4210011.04002000) and I would like to convert them to something like (24.362 42.458) to use in Google Maps. When I try to get the SRID ...
0
votes
0answers
6 views

No results for PostGIS TIGER geocoder extension

Similar to this question, my TIGER geocoder extension in PostGIS isn't returning any results. It seemed to all install correctly, so I imported DC, and: psql -d geocoder -c "SELECT g.rating, ...
1
vote
1answer
39 views

QGIS select reversed geometries

I have a road network and a geometry for each road direction. One Geometry from A->B and another Geometry from B->A. This geometries are covering each other. Is there a tool available in QGIS to ...
1
vote
0answers
23 views

Error creating a spatial database. ERROR

I have been trying to get Postgis set up for a while now, I am stuck on one error and have not found a solutions yet. This is on Ubuntu 14.04.1. I am trying to run: CREATE EXTENSION postgis But am ...
1
vote
0answers
15 views

Invalid join selectivity error in postgis 2.1.3

I have 2 tables, one for points and one for polygons. I want to find points falling within theese polygons, so I quered: select p.id, l.id from points p inner join polys l on st_contains(l.geom, ...
0
votes
1answer
29 views

How to modify a PostGIS function?

I wish to modify a PostGIS function ST_PixelAsCentroids. What is the best way to go under-the-hood of PostgreSQL/PostGIS functions and modify and customize them as you wish? I'm not hitting the right ...
-1
votes
1answer
40 views

Geocode as soon as PostGIS table is updated

I am trying to create a map such that as soon as I enter an address into PostGIS table, it'll automatically be geocoded (and published in geoserver). The only way I could think of doing this was using ...
0
votes
1answer
28 views

PostGIS point st_within() polygon = false

so geoserver shows me a red dot within a blue polygon, i thought postgis can tell me that fact by query. i tried the following statements without success, can anyone tell me what i did wrong? select ...
0
votes
0answers
16 views

Insert several gtfs feeds into the same postgis/pgrouting database

I want to import sevaral gtfs feeds into my postgis/pgrouting database so that I can route over all my gtfs feeds. The problem is that the sources / destinations ids of my gtfs are likely to ...
0
votes
0answers
31 views

Apply raster contraints on single table with multiple files

I have a raster table (pre-created using CREATE TABLE) containing multiple individual raster files that I append piece by piece to a final table. The table itself is in its own tablespace 'gisdir' and ...
2
votes
1answer
52 views

Reading postgis geometry with shapely

I am doing a small-scale workflow in ipython notebook with geopandas and shapely, pulling a bunch of geospatial data, sometimes from shapefiles, sometimes from postgis (where more expensive processing ...
0
votes
2answers
63 views

Unable to connect to PostGIS databases after Mac OS X Yosemite upgrade

I upgraded to Mac OS 10.10 Yosemite and am unable to connect to PostGIS databases (PostgreSQL version 9.3 and PostGIS installed from KyngChaos). Typing psql my_database returns this message: psql: ...
1
vote
0answers
7 views

PostGIS 1.5 libstdc++ error

After some package updates on my Debian machine all my database queries involving postgis functions or types are returning: Error message from server: ERROR: could not load library ...
1
vote
0answers
22 views

Are there naming rules for direct connections from ArcGIS to PostgreSQL?

I don't have problem direct connecting arcgis to postgresql if my database name contains only letters, but when the name contains dashes or underscore e.g:"gisdb-dev", I receive an error when setting ...
0
votes
2answers
91 views

How to store lat/long in PostGIS database?

I have a bunch of points in a text file that are represented using lat long (116.3158516 39.9748016). I import them into my GIS enabled database and create trajectories using st_makeline() as ...
2
votes
4answers
62 views

How do you generate WKT from a graphic drawn on a map?

All, In order to do some quick analysis using SQL spatial, I'd like to generate spatial objects using the STGeomFromText / ST_GeomFromText function. With point data, I can do this by geocoding an ...
2
votes
1answer
56 views

Ideal file format for QGIS that allows mixed geometry types?

I have a spreadsheet for an archaeological project that is hosted on Google docs. This allows multiple contributors to edit and update the table as revisions and field data comes in. The table is not ...
0
votes
0answers
12 views

pgsql2shp converting nulls to spaces

Why does PGSQL2SHP convert null values to spaces when exporting a table? I would have expected empty strings in the shapefile (dbf).
0
votes
1answer
23 views

How to update raster metadata in postgis

How can I update the raster metadata in postgis? upperleftx | upperlefty | width | height | scalex | scaley | skewx | skewy | srid | numbands ...
1
vote
2answers
58 views

PostGIS syntax (function()).*

Whilst reading the documentation about using the PostGIS function ST_PixelAsCentroids() I was confused somewhat by this (ST_PixelAsPoints(rast, 1)).* syntax and as a newbie to SQL I was wondering if ...
2
votes
2answers
43 views

Can pgr_dijkstra use a boolean column for routing?

I want to use Dijkstra algorithm. I would like to have the algorithm find a route based on a boolean traffic column, using only roads where the boolean column value is true. The code below does not ...
0
votes
1answer
11 views

Is it possible to label a postgis Query Layer in ArcMap?

I've created a PostGIS query layer and I can't label it. I'm trying to work out if I'm dealing with a bug that I can't workaround, a bug that I can workaround, or if it is operator error. After ...
1
vote
1answer
50 views

Error saving polygon with hibernate spatial and postgis

I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin. Caused by: ...
3
votes
0answers
49 views

Most efficient way to intersect overlapping polylines

I have 4 multipart polyline shapefiles (download a sample dataset here). The geometries are identical, except for the length of segments in each shapefile. They represent 4 variables describing an ...
0
votes
1answer
41 views

Using QGIS and PostGIS for multi-user capabilities, similar to ArcSDE for ArcGIS [duplicate]

I have previously used ArcSDE technology with Microsoft SQL Server to allow for multi-user database editing. My ESRI licenses have recently ran out and I have been using QGIS for my GIS work. I am ...
5
votes
2answers
77 views

Need Help Converting Shapefile coordinates into lat/lon

I'm having a little trouble importing a shapefile into PostgreSQL. Using shp2pgsql, I'm able to import the non-geometry data just fine. However, the geometry data is coming in based on some ...
1
vote
0answers
25 views

Postgis - Split linestring between point A and B

I need to find the different trajectories between point A and B. In the image is possible to see 2 differents trajectories. The way i use to calculate them is: Found the min time and the max time (in ...
2
votes
1answer
33 views

View with sequence in QGIS 2.4

In postgres, I created a view with a sequence nextval() to have an unique id (called vid). I tried to vizualise this view in QGIS but it failed. It seems that nexval() causes some issue according to a ...
2
votes
1answer
53 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
0
votes
0answers
29 views

How to work with gdb from c#?

I have installed PostgreSql 9.3, PostGIS(last version) and Npgsql. I have geodatabase(tmp.gdb) how to make conection for this DB from c#? And how to connect this DB to PostgreSql? It possible to ...
-1
votes
1answer
51 views

US Census Geocoder returns different city that TIGER Shapefile data

When I geocode an address using PostGIS+TIGER 2013 I get a different city than what Census Bureau Geocoder reports. The Long/Lat are identical in both cases, but the PLACEFP is different although both ...
-1
votes
1answer
25 views

PostGIS ST_Transform question

I have a query that returns the extent of a polygon. "SELECT ST_Extent(geom) FROM nct_cov WHERE prop_name = 'SLATE HILL'" It works fine, however I want to transform it using ST_Transform, however ...
0
votes
2answers
36 views

Postgis: Point-in-polygon check + feature attributes inheritance

I have two tables in Postgis 2.1 database: Polygon features with a reach attributive information; Regular point grid; I would like to get a SQL query returning the regular point grid with ...
0
votes
0answers
6 views

OpenLayers gx_geocodercombo returns syntax error

I try to implement a gx_geocoder combobox... { xtype: "gx_geocodercombo", hideTrigger: true, emptyText: 'Enter address (streetname housenumber municipality)', width: 350, layer: ...
1
vote
1answer
24 views

Mapnik tiles have latitude distortion, projection issue?

I'm trying to work out a kink in setting up mapnik-node. My geos are in postgis, and I allllmost have them rendering properly, but my GIS experience is lacking so I can't seem to determine why this ...
4
votes
0answers
68 views

Focal Statistics for Special Neighborhood

I'm looking to calculate focal statistics for each cell of a raster, within a neighborhood of a specified criteria. Background - I have three binary rasters, each representing a single vegetation ...
2
votes
2answers
46 views

What is the recommended workflow for using TileMill and OSM?

Using osm2pgsql, I imported an OSM extract into a Postgres database. Then I made a layer in in TileMill that contains the data from Postgres. The map was exported to a MBTiles file. At this point, all ...
3
votes
2answers
40 views

How to compute weighted centroids in PostGIS?

I have a group of points and each point has an associated count value. How can I calculate the centroid of the group weighted by the values associated to each point?
2
votes
1answer
28 views

Interpolating mobile signal data

I have collected the signal strengths for the mobile operator at some places in my college campus. Now I want to spatially interpolate this data for the entire campus. I am using PostGIS. I am ...
3
votes
1answer
489 views

What does “foo” stand for in this PostGIS command?

The help page for the PostGIS function ST_PixelAsCentroids has this line of code as a usage example: SELECT x, y, val, ST_AsText(geom) FROM (SELECT (ST_PixelAsCentroids(rast, 1)).* FROM dummy_rast ...
3
votes
0answers
40 views

Postgis database query optimisation

I have a set of rasters in DTED format which I load into postgis database using raster2pgsql command line tool. Each of rasters is simply stored in a row and described by rid and a value of raster ...
1
vote
3answers
32 views

problem to use openstreetmap data file with pgrouting2.0 on PostgreSql9.3

I'm a newcomer on pgrouting, and I want to test its functionalities. I've installed and configured my computer with Postgresql9.3, pgrouting2, and PostGIS. I've downloaded from openstreetmap the ...