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

learn more… | top users | synonyms

1
vote
1answer
17 views

Distance from point stored in geometry with SRID 4326

I have stored 2.5 million data points (addresses) using the geometry data type in column latlong with SRID 4326. The latlon - column has a GIST index defined. I would select all addresses within a ...
1
vote
2answers
22 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
21 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 ...
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
21 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....
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
24 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 ...
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 ...
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 + ...
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 ...
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 ...
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 ...
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 ...
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/...
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 ...
1
vote
1answer
50 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 ...
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 ...
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 ...
2
votes
3answers
64 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=...
1
vote
2answers
35 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 ...
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 ...
1
vote
1answer
34 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: ...
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 ...
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 ...
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: ...
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 ...
0
votes
0answers
23 views

QGIS crashing when trying to open PostGIS layer

I'm trying to open a fairly large dataset from a postgres database in QGIS. The table contains over 100 million rows, and it about 60gb in size. When I try to open this table in QGIS (have tried 2.8 ...
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 ...
0
votes
1answer
39 views

PostGIS Unknown Coordinates Format

I've turned a shapefile into a postgis table using shp2pgsql-gui. Then, i wanted to get the coordinates of geom column, for that i converted geom to WTK throught ST_AsText(geom) function. The ...
1
vote
1answer
18 views

Interpolation in Geoserver

I am new to use Java and Geoserver. I have a point sampling location (N,P,K Nutirients value for few fields spanning acroos few acres) on which I want to execute IDW or Natural Neighbourhood ...
0
votes
1answer
23 views

Cartodb - How to insert geojson data to table using SQL api?

I am currently using leaflet.js to generate polygons and I would like to add them to my table in cartodb. I.e. a geojson object : { "type": "Feature", "properties": { "name": "wing1" }, "...
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 ...
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
1answer
38 views

In cartodb, how to automatically update the_geom with new longitude and latitude?

I am currently posting new table row using the cartodb sql api with the following commands: update {table_name} set geom = ST_Transform(ST_SetSRID(ST_MakePoint(latitude, longitude),4326) latitude and ...
1
vote
3answers
34 views

Calculating the area of polygons within bigger polygons

I work with PostGreSQL and have 2 tables, both in EPSG 2950: Table 1 has a couple of big polygons and table 2 has smaller polygons that INTERSECTS with the polygons of table 1. I am looking for a ...
1
vote
1answer
33 views

shp2pgsql-gui not work after Ubuntu update

I'm using Ubuntu 14.04 with postgres-9.5 and postgis 2.2.2. Previously I performed shp2pgsql-gui to access the interface, but now, the terminal shows me this message: the program shp2pgsql-gui not ...
2
votes
1answer
52 views

CityGML: Calculate orientation and inclination angles from a polygon's LinearRing coordinates

I have multiple CityGML files of different cities. Only one of them is in such a good condition that it includes the orientation and inclination angles of every roof polygon (as a gen:stringAttribute)....
1
vote
0answers
25 views

Using Postgresql/PostGIS/Pgrouting in PYQGIS Processing Scripts

I have started exploring PYQGIS scripts and learning writing PYQGIS user scripts in python. I want to use pgsql/postgis/postgresql in the script. Please suggest Also Can anyone suggest That the ...
0
votes
0answers
36 views

Is ST_Geom included in AWS RDS postgres 9.5?

I have a database instance on AWS RDS using postgreSQL 9.5. I am using ArcGIS desktop 10.4 and connecting to this database. The Arc docs mention needing to place the ST_Geometry.dll in the postgres ...
0
votes
1answer
25 views

OSM Carto Street Numbers style rules for OSM Bright

I'm running an OSM tile server stack using Mod_tile, renderd, mapnik, osm2pgsql and a postgresql/postgis database on Ubuntu Linux 14.04. I've chosen OSM Bright for my tiles, but i would like to ...
1
vote
1answer
59 views

From a lat/lng point, load data clusters of other lat/lng points within radius using PostGIS

Very similar to how Zillow's mobile app mapping search works, I'm trying to pass in the lat/lng points & radius (meters) of a single user and then, on the fly, generate clusters to enable passing ...
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' ...
2
votes
1answer
57 views

Shapely & RTree vs. PostGIS/PostgreSQL?

I would really like some insight to the pros and cons of one approach versus the other. I recently wrote some python code that inspects two layers of the same test ESRI GDB file using RTree (bounding ...
1
vote
0answers
24 views

Import Corine Land Cover in PostGis

I've imported a shapefile from the Corine Land Cover dataset in PostGis. I'm working on a software which will allow for diverse simulations on the territory. This software integrates a function to ...
0
votes
1answer
28 views

Updating OSM data

I'm trying to keep my OSM PostGIS data up to date by reading this tutorial http://wiki.openstreetmap.org/wiki/Minutely_Mapnik The time periods are minute, hour and day, but I think a daily update is ...