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

learn more… | top users | synonyms

1
vote
2answers
95 views

Applying OSM z-order after osm2pgsql with qgis

I've trying to find a solution to applying the OpenStreetMap z-order in QGIS after using osm2pgsql. Everything is working perfectly, until I add the each layer to the canvas, where the z-order is not ...
1
vote
2answers
19 views

Updating linestring geometry by replacing its points

I have a linestring on my postgis. and I want to update a point in this linestring. I mean I want to update the geometry of the point in the line string by an other points
2
votes
0answers
20 views

postgis query performance

The db structure is more or less like this and can't be modified. I can only add some indexes but can't set for example foreign keys: CREATE TABLE adresspoint ( id character varying(3999) NOT ...
0
votes
1answer
219 views

Issue using pgr_dijkstra from Postgres pgRouting

I am using Postgres with Postgis extension to retrieve streets (only for pedestrian use) and several "natural" points. I need to make updates every minute and i am working on a small bounding box. For ...
0
votes
1answer
1k views

How do I explode a MultiLineString using ST_Dump() in PostGIS?

I want to do what this blog post does: explode a MultiLineString into individual LineStrings. I'm using CartoDB but don't get individual LineStrings as the result of my query. I still get a ...
2
votes
0answers
26 views

ST_Intersects with degenerate LINESTRING

I have, in PostGIS, a bunch of LINESTRING Z object (which represent poles), and I want to find which ones are inside an area (represented by a POLYGON). For the purpose of this exercise, we can safely ...
12
votes
5answers
478 views

What in-depth spatial database systems tutorials exist? [on hold]

Is there a good tutorial that explains in depth the internals of a GIS and a spatial database system such as PostGIS with examples and without any background assumption? I'm specifically looking for ...
2
votes
0answers
19 views

PostGIS: Select Certain Columns returns Blanks

So I have a pretty stupid question. Suppose I have a table of the US called us_states. I created two new tables called wy_test which is created using CREATE TABLE wy_test AS SELECT * from us_states ...
0
votes
1answer
26 views

Union PostGIS tables turns blank

I have a simple tasks that regarding combining multiple Postgis tables. Let's say I have 4 tables called tx_shape, ca_cd_1_shape,wy_shape, and ma_suffulk_co_shape. Two of which are states, one is a ...
0
votes
1answer
19 views

Filling table matches multilayer from buffer in PostGIS?

I have some tables in Postgis of differents geometries (Points, Lines, Polygons). I create a buffer of 1 kilometer of one point with this: ST_Buffer(ST_GeomFromText('POINT(3056563.45195278 804692....
1
vote
1answer
240 views

Display WFS (GeoJSON) from GeoServer with OpenLayers on Django

I want to display point data from PostGis to my Django application. I created WFS service from GeoServer and want to display using OpenLayers. I went through many posts but none of them worked My ...
0
votes
0answers
9 views

Error while creating development user CartoDB

While creating development user I get this error: [pool] Found a connection for localhost:cartodb_dev_user_ec9cc5c4-2863-4fc6-acbf-95bcb52ea902_db:5432:postgres:sequel (4) (0.000178s) BEGIN PG::Error:...
0
votes
1answer
23 views

Odbc_fdw.control is missing

I am using cartoDB and Postgres 9.3 including PostGIS. When I try to create development user in cartoDB I get this error: 'CREATE EXTENSION IF NOT EXISTS odbc_fdw SCHEMA public;' ERROR: could not ...
1
vote
2answers
297 views

Get points along a line at defined distance

I was reading a lot of similar questions here but no one ask about postgis (or I didn't find it). I have a line in postgis and I want to get the point along the line at defined distance. It is ...
1
vote
1answer
21 views

Problems with conversion of multilinestring to linestring

I'm trying to convert a column of datatype multilinestring to linestring using sql: ALTER TABLE streets_nordeste ALTER COLUMN geom TYPE geometry(linestring,3857) USING ST_GeometryN(geom, 1); But ...
0
votes
0answers
18 views

How to connect PostGIS to GeoServer dynamically with PHP script? [on hold]

I am little bit familiar with GeoServer Graphical Interface and I know how to connect and display PostGIS db over it, but I have no clue how could that be possible over a script. All data should be ...
0
votes
3answers
40 views

GDAL merge warp has black block can't remove

I have been using the gdal to merger a lot of *.tif files to get one big arear, I always get the blackblocks I tried GDAL merge and GDAL warp but none of them seems working. Does anyone know where ...
4
votes
2answers
305 views

Building a ol3 web application with dynamic content and user registration

My set-up: Currently I’m using a PostGIS database, with a GeoServer service and displaying the data with OpenLayers 3. I use WFS data to display the features in clusters and I’m able to edit them ...
1
vote
0answers
16 views

Intersection of 4D Trajectory with 4D Polyeder (3D + time)

I have worldwide small polygons (lat/lon WGS84) for different heights (z-coordinate) for several timestamps (m). I want to store them in a PostgreSQL/PostGIS database as 4D objects (2D polygons + ...
2
votes
2answers
368 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 ...
0
votes
1answer
62 views

Displaying Point Cloud footprint/wireframe as footprint/wireframe from PostGIS using GeoServer and OpenLayers

I'm using PDAL to import LAS files into PostGIS. The tutorial provided by boundless is great, and shows how to display the data in patches, but it doesn't cover displaying the table 'footprint'. ...
1
vote
1answer
292 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 ...
1
vote
2answers
524 views

Starting Tile Sever Rendering Error: OSMBright.xml

I was following the entire process found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ I have an error though on Testing your tileserver part where i run the ...
0
votes
1answer
47 views

How to install gdal postgresql driver in Ubuntu

I want to use Python to load PostGIS table by ogr. But after I try ogr.open in python (it works if loading a shapefile), I can only get null value. Now I have tried GDAL debug, the output shows like ...
25
votes
3answers
10k views

Reprojecting all geometries in PostGIS table?

I created a spatial table with SRID:4326. Now I want to change total projection to SRID:32644 into a new table. The old table should remain unchanged.
0
votes
1answer
133 views

PostGIS Get the POINT that is x meters away from a fixed point on the route (LINESTRING)

We have a route network stored in the routes table (LINESTRINGs). Basically every sedment (between two vertexes) is inserted as a separate row in this table. Among that we have a locations table (...
0
votes
1answer
23 views

Download boundaries from OSM to Postgis

I need to download some cities boundaries polygons and store them in a Postgis database. Is this possible? Using what tools?
0
votes
1answer
16 views

Cannot load postgis query as layer in QGIS using create table command

I've a multilinestring object and a points object , where the points are located on the line. The user can set a start and end point on the line and my goal is to return a subset of the points that ...
0
votes
1answer
31 views

carto.com when 2 points have the same location

Carto.com: We are mapping homicides and when two deaths occur at the same location, how do I prevent 2 points with the same lat, lon from overwriting each other? I want to be able to view each point ...
8
votes
2answers
4k views

Converting PostGIS table to Shapefile in Python?

I want to convert a PostGIS table into a shapefile (without using pgsql2shp). In order to create a geometry in the shapefile I have to give the Xmin,Ymin and Xmax,Ymax, and the geometry which I have ...
2
votes
3answers
62 views

Incorrect srid in postgis

I downloaded .shp files from Diva-Gis (EPSG:4326) representing the map of Germany in order to use them in Mapbox Studio. I did conversion via ogr2ogr like that: ogr2ogr -f "PostgreSQL" PG:"host=...
0
votes
0answers
15 views

Column value in image name [closed]

I'm trying to assign a image with a "dynamic" name to a style. <se:ExternalGraphic> <se:OnlineResource xlink:type="simple" xlink:href="house${id_proj}.png"/> <se:Format>image/...
1
vote
1answer
48 views

Restoring PostGIS 2.1. dump in PostGIS 2.2

I tryed to restore my old PostGIS dumps (Postgis 2.1, PostgreSQL 9.1) at my new system (PostGIS 2.2 and PostgreSQL 9.5) I was using pgadmin3 to dump the databases and was now trying to restore it ...
2
votes
1answer
68 views

Tracking OSM “Planet” Extract dates

I'm trying to build a GUI that allows replacement / update of the PostGIS database that holds my OSM extract (which I use for rendering, typical mapnik / tile server arrangement). I'd like to show ...
0
votes
0answers
23 views

Strange behavior of ST_length and ST_difference in POSTGIS

I've a LINESTRING that represents the route between Los Angeles and Austin. I calculated the total length of this linestring using ST_Length. Then I calculated the difference between a MULTIPOLYGON ...
4
votes
2answers
221 views

Is it be possible to re-render parts of a tile pyramid when postgis table updates?

I have this idea of using postgis together with a tile renderer for serving my organization with tiled maps. As I believe my data will be partially altered almost on a daily basis it does feel like a ...
0
votes
2answers
309 views

PostGIS broken after Ubuntu 16.04 upgrade

I upgraded Ubuntu from 15.01 to 16.04 and PostGIS is broken. Below are the errors: psql (9.5.2) Type "help" for help. osm=# select version(); version ------...
2
votes
1answer
180 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 as:...
1
vote
1answer
22 views

Setting names for attributes in properties in json returned by postgresql

I am trying to make a webmapping app that uses on the server side node.js and postgresql(PostGIS). what I am doing is retrieving data from the Postgresql database using node.js and sending the result ...
3
votes
2answers
550 views

How to obtain closest point of point over polylines layer in PostGIS 1.4 (without st_ClosestPoint)?

I´ve got a polylines layer (pipes) and a points layer (valves) and In Postgis 1.4 I would like to obtain the closest points but exactly on the closest polyline. In other words, i need to locate each ...
0
votes
0answers
26 views

MapServer - Geotiff files into separated Servers

I have a server which keeps large GeoTiff files and I need to add a second server into network with MapServer in order to use wms capabilities. It's not possible to keep mapserver and geotiff files ...
6
votes
3answers
271 views

How to do a spatial join in PostGIS that returns on the minimum value of point intersecting polygon?

I have a polygon table (buffer) and a point table (dem_points), and I want to do a spatial join on them. I need to join the point with the minimum elevation (dn) to its spatially corresponding ...
0
votes
1answer
85 views

Cannot find information about my.table table in raster_columns [closed]

I am running PostgreSQL 9.4 and PostGIS 2.1 and have loaded a small piece USGS SRTM data for North America successfully into my database. I am attempting to export a small piece of of the rasters I ...
1
vote
2answers
34 views

Unable to insert data into table using geocode()

I am new to the world of PostgreSQL. I am using PostgreSQL 9.5. I have installed PostGIS 2.2.2 plugin and along with that came Tiger, Tiger_data schemas. But the Tiger_data schema does not have any ...
2
votes
1answer
255 views

GeoDjango, distance filter based on database column

I have a geodjango model with fields coverage = 10 * 1609.344 reference_point = Point(-72,45) #or some other lat lng class ServiceArea (geo_models.Model): center = geo_models.PointField(default=...
1
vote
1answer
32 views

PostGis: Calculating distance in different methods, What's the difference?

What is the most efficient (or just "best practice") way to calculate distance between 2 points, assuming we are on 2D world without big circle etc. phenomenon (distances up to 300 meters). Method 1: ...
1
vote
1answer
594 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
0
votes
0answers
180 views

Can I do full SQL expressions through the “WHERE” clause in UpdateCursor? [closed]

Run as a standalone python script for a shapefile in a toolbox on ArcMap. For example: psql_url_pop = '''SELECT shapefile.NAME_# + shapefile.WIKI_URL FROM public.shapefile''' rows = arcpy....
0
votes
0answers
24 views

Can PostGIS be used to monitor an area? [closed]

I am developing a system that monitors a specific geographic area with many GPS tags inside it and I need that the system alert the user when any GPS tag goes out from the area. I already know that ...
3
votes
1answer
43 views

Geoserver and “inverting” a multiPolygon to dim the rest of a map

I think it is time to re-design the result presentation of my reachability analyses (which are computed using multimodal isochrones). Right now I am just showing a multipolygon on a leaflet map that ...