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

learn more… | top users | synonyms

1
vote
0answers
29 views

GeoJSON, Google Maps, and 'lazy loading'

One of my projects involves a 'live-fetch' of geoJSON-ified data from a GIS-capable PostgreSQL server: I'm examining its performance as an alternative to tiling. Our tiling goes all the way to zoom ...
2
votes
2answers
366 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
61 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
522 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
45 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
131 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
20 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
15 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
27 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 ...
1
vote
0answers
18 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 ...
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
59 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
13 views

Column value in image name [on hold]

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
41 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
66 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
220 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
305 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
21 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
25 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
270 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
249 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
593 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
23 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
42 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 ...
0
votes
0answers
15 views

Openlayers popup to relate table

I've a postgis layer (lines) and a table with a cardinality from one to many and I'm using geoserver to serve a WMS with the geographic table from postgis. So, what I'm triying to do is to use ...
1
vote
1answer
26 views

How to customize DB Manager default parameters

I'm using QGIS 2.10 and DB Manager plugin. I regularly use this plugin to display tables from a PostgreSQL - PostGIS database. I particularly use the integrated SQL Window to filter a table's content ...
0
votes
0answers
12 views

Password Authentication failed when using shp2psgsql

I want to load shp data in my postgis enabled database. I am typing the command: shp2pgsql -s 4326 -G -I "shapefile_name" public.table_name | psql -h localhost -p 5432 -d gis -U postgres and I am ...
1
vote
1answer
249 views

Is there any method to retrieve SQL queries into a GeoJSON file using JSP?

I want to display the contents of my PostGIS database of various shape-files in leaflet pop-up dynamically. I know there are static methods available that retrieves attributes. But I need to by ...
14
votes
5answers
19k views

How to create PostGIS template?

I am following a tutorial to install pgrouting. However, I didn't get the part when it says Start pgAdmin and create a new database based on your PostGIS template Where can I get this postgis ...
0
votes
0answers
13 views

OpenLayers will not show PostGIS layer hosted on Geoserver [duplicate]

I'm new to this. When I try to create an Openlayers map using the Web App Builder in QGIS of a PostGIS layer hosted on Geoserver I get the following error: Server for layer does not support JSONP. ...
0
votes
1answer
45 views

PostGis: Add new geometry column & insert into it newly created polygon - violates check constraint enforce_srid

I added a new column by: SELECT AddGeometryColumn('table_name', 'column_name', 4326, 'POLYGON', 2, false); Which means 2D polygon in WGS84. Then I inserted a new polygon into specific row by: ...
6
votes
1answer
919 views

How to use the linear referencing plugin from QGIS with postGIS data?

I need a guide how to use this plugin properly, I'm a newbie on PostGIS and I'm trying to use the linear referencing plugin of QGIS. I've created a database on postgreSQL with the postGIS extension ...
1
vote
1answer
202 views

OpenLayers WFS no FID being passed from TinyOWS

I have a webapp - OpenLayers<->tinyows<->postgis. With 1 layer I have a problem. On localhost all works well - here is a snip of the XML I get back: <gml:featureMember> <tows:trad ...
0
votes
1answer
33 views

pgrouting to calculate distance using a chosen highway system

I am working on a research to calculate the distance of firms (scattering around the nation) to several metropolises via selected national highway system. Then I overlay the highway map with firms' ...
0
votes
2answers
293 views

PostGIS pgr_dijkstra function does not find node that appears in ways table

I am having a problem with pgr_dijkstra algorithm not finding some of the node vertices in my table. I have a large dataset of survey travel diaries and am trying to determine their shortest paths ...
3
votes
2answers
173 views

How to compare polygon boundaries in PostGIS?

I've to compare two polygon layers, 'land_use' and 'land_parcels', in PostGIS. My aim is to create linestrings, where boundaries of 'land_use' polygons do not match boundaries of 'land_parcel' ...
1
vote
1answer
243 views

What is the difference between ST_GEOMETRY and WKT?

What is the difference between ST_GEOMETRY and WKT? Is ST_GEOMETRY just a database type and WKT (well-known text) is a textual representation of the data?
0
votes
1answer
21 views

How to count point attributes that fall within a polygon in postgis?

I have a point shapefile called pointA that has a field called fieldB, and a polygon file called polygonC, and I want to calculate the sum of fieldB for all the points that are within polygonC How to ...
0
votes
0answers
16 views

Upload raster to postgreSQL

I have a raster and I need to upload it via web interface into PostgreSQL table when I need to upload my file CREATE TABLE public.eau_param_hydro ( rid integer NOT NULL DEFAULT ...
0
votes
1answer
10 views

White PNG pulled from mapserver stored in PGSQL using leaflet

I have a polygon layer stored as a table within PostGIS/PostgreSQL using SRID 3857. I have created a MapServer layer pointing to this layer. However, when I try to load this layer into Leaflet as a ...
1
vote
2answers
41 views

St_Azimuth : Difference between Google Earth and Postgis

I'm using Postgis to find angles between sites. End users will use Google Earth to play with these results. According to st_azimuth, I have exactly 315.002 degrees between these two points : SELECT ...