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

learn more… | top users | synonyms

0
votes
1answer
5 views

Polygon overlap into new layer on CartoDB

New cartodb & PostgreSQL user here. I have two rows in cartodb table and each row has its own polygon. The two polygons have some overlapping area. How can I create a new polygon of just the ...
0
votes
0answers
13 views

Postgres PostGIS Exception query- geocode_intersection()

I have a table in Postgres with a set of records that are street names which needs to be geocoded to get an intersection point.Some of the records would be bad input and when using the ...
0
votes
1answer
12 views

Configuring SFCGAL to PostGIS Db in Windows

I have installed a PostgreSQL 9.3.5 64-bit on a Windows Server 2012 machine and added Postgis 2.1.3 extension. I need to use the ST_StraightSkeleton function and after some search on the web I found ...
2
votes
1answer
26 views

openstreetmap/postgis custom data

I'm a newbie and I'd like to realize a project based on a local OSM with postgis +mapnik +angular and leaflet. The project requirement is : An ACME company owns geographically distributed ...
-1
votes
0answers
13 views

How to do linear interpolation with mask in postgis

I have a point shapefile and a grid shapefile and want to do interpolation so that each of grids has it own value which is followed by the point shapefiles, also I want to add a polygon shapefile as ...
2
votes
0answers
24 views

How to create isometric 3D map with postgis

I am looking for a way to create isometric 3D maps based on data stored in a PostGIS database. My idea is to create a PostGIS function that will return a SVG image like the one below. It is easy to ...
1
vote
0answers
7 views

Import postgis layer from S3 link

I have a postgis layer (layer.sql), which I am trying to add to my postgres database (mydatabase). The postgis layer is stored on S3 (https://s3.us.../layer.sql). I can add the layer to my database ...
0
votes
1answer
41 views

from two tables make a new one

I have two tables both of them has linestring geometry. I try to make a new one which contain the first one and from the second take only the decimal v when the linestring of the first table touch a ...
0
votes
0answers
22 views

PostGIS Clustering. Group by geographic point location proximity

I have a table where i keep user's location history. The system gets user's current location each minute and writes it into "user_locations" table. Later on; when showing the locations that the user ...
0
votes
0answers
21 views

Store WGS-84 degree decimal minute coordinates in postgis database [duplicate]

I have some data in a texfile where the coordinates are given in this format: lat lon 23S19.69 66W45.87 24S01.73 66W55.61 I already learned that it is some kind of WGS-84 with degree and ...
0
votes
1answer
23 views

Creating an intersecting linestring layer from two polygon layers using some tolerance

I have two postgis layers: The first layer contains the sidewalks of my town (polygons in blue). The second one contains the pavements (roads) of my town (polygons in brown). The map looks like ...
2
votes
2answers
27 views

Combining ST_Touches and ST_Buffer

I'm looking for a PostGIS/Postgres query thats a bit tricky. I want to find all polygons within a specified radius and all neighboring polygons to the polygon where I have my coordinates SELECT * ...
0
votes
0answers
18 views

Use postgis functions in restful web service java

I am trying to access Postgis functions in Restful web service JAVA. I am using netbeans 8.0.2, Glass Fish, J2EE 7 to create web service, PostGres 9.2 and postgis 2.1.1. Connection to postgres is ...
0
votes
0answers
24 views

How to use interacting PostgreSQL/PostGIS triggers in QGIS?

I use point geometries (table 'label_point') to place multiple labels on polygon geometries (table 'soil'). After doing layer edits I've to update the affected label_point features. Therefore I've ...
0
votes
2answers
38 views

How to create a bounding box around a point using postgis

How to create a bounding box around a geom (POINT) and find all the intersecting geoms(POINTS) within that bounding box? Thanks in Advance
1
vote
2answers
39 views

CartoDB's SQL API: Row too large

I am trying to run the following PostGIS query using CartoDB's SQL API: SELECT the_geom, ST_Area(ST_Intersection(the_geom::geography,ST_Buffer(ST_SetSRID(ST_MakePoint(-52.4379, ...
0
votes
0answers
19 views

Instruction to create OSM dump for PostGIS in windows

I want to import OSM data into a PostGIS database running under windows. After a web search I learned that I should use osmosis. But most of the explanations are for Linux. But I have to use windows. ...
1
vote
1answer
44 views

PostgreSQL 'forgot' PostGIS functionality

System details: PostgreSQL 9.3.5 64bit on Windows 7 Ultimate; PostGIS 2.1.3 Two days ago I re-organised my schema structure - effectively moving a series of tables of the form ...
1
vote
2answers
31 views

Intersection between line & polygon in PostGIS?

I have a linestrings consist of 2 vertices. I want to get all lines that don't intersects with any polygons on the way. In my example: blue line Not intersects - only touches some polygons, but black ...
3
votes
1answer
37 views

Adding vertices to polygon in PostGIS?

For example I have rectangular polygon (4 vertices). I want to add mid-point on each line of the polygon, so in total now I have 8 vertices. And from them I want to build new polygon who will have ...
0
votes
0answers
36 views

Equivalent for PostGIS ST_SnapToGrid in ArcMap 9.3

I'm new with ArcGIS and ArcMap. I need to round coordinates on precision of 2 decimals while maintaining relations between them. So basically I need to make something to be equivalent of ...
1
vote
1answer
25 views

SRID awareness in Postgis functions

I have a column named position with geo data. Query: SELECT ST_SRID(position) FROM checkpoint LIMIT 1; returns 4326 If I try to simplify/compress points with SELECT ...
1
vote
1answer
27 views

Postgis How to populate column with geography data from geometric data?

I stored my point date in geometry format with SRID 4326 supposed EWKB (data looks like this "0101000020E610000071F1A611E9392640AECD10D8E68C4A40") = way geometry(Point,4326) I want to have the ...
1
vote
1answer
32 views

How to calculate overlap area of two polygons?

I am a beginner in the world of GIS. I have one table polygons with each polygon having north-east and south-west coordinates. And for every polygon, I need to find area of overlap with other ...
3
votes
2answers
53 views

ST_Area of a buffer differs by coordinate

Why are these results different? The only difference is the coordinate. Seem like the area should be the same. select st_area(st_buffer(st_setsrid(st_point(-70, 40), 4326)::geography, 10)) AS ...
0
votes
0answers
29 views

Incomplete data - lines missing from osm2pgrouting

I am importing OSM data into PostGIS using osm2pgrouting but some data is missing/did not import. I am using the default mapconfig.xml and this appears to work for most roads. For example in below ...
0
votes
0answers
27 views

Snapping points to nearest road - query is extremely slow

I have a two tables containing (1) all parishes in Denmark (centroids) and (2) a road network of Denmark (OSM data). I am trying to find the nearest road for each parish centroid. To do this I'm ...
0
votes
0answers
25 views

Postgis reverse geocoding for other countries

I have tried using postgis_tiger_geocoder extension for reverse geocoding and it just has the U.S related data(56 states or so) but I need to have few more countries like canada and few more. Is there ...
0
votes
2answers
64 views

PostGIS polygon clip inaccurate using ST_Clip and ST_Union from tiled raster

I have a RGB raster tiled at 128x128 in PostGIS enabled database. I am trying to clip from the raster using a polygon as follows: SELECT ST_AsGDALRaster(rast,'GTiff') FROM ( ...
0
votes
0answers
12 views

Getting netCDF data into PostGIS database using Python?

I can read the netCDF file data with netCDF-python or with gdalinfo, but I am unsure of the easiest way to get it into a PostGIS database. It would be really easy if I could convert the netCDF file ...
0
votes
0answers
10 views

removing point cloud data from PostGIS

I'm ingesting dozens of LAS files into one table in PostGIS using PDAL using the example from pdal.io: <?xml version="1.0" encoding="utf-8"?> <Pipeline version="1.0"> <Writer ...
1
vote
1answer
36 views

How to transform from a SRID to another?

How can I transform a geometric column of table from "SRID=4326" to "SRID=32650". I saw "ST_Transfom" and " ST_SETSRID" operator before. To do so, I used follow construction operator, But it dosen't ...
-1
votes
2answers
117 views

Sql Query in Postgresql

I am trying to execute a query but I am stuck. I have two tables A and B. The a table has columns gid, geometry(line-string) and value which cells is empty , the B table has got 3 columns gid, ...
0
votes
1answer
27 views

How to identify the right road using postgres and postgis

I want to identify a road at particular point of intrest using post gis. Example Input String : 16th cross near xyz mall. Problem I am facing As there will be many "16th cross roads" in the map , ...
3
votes
1answer
50 views

Find all points within 5m with same name on large dataset

I have a large dataset (500,000 rows) in cartoddb which contains data like this.(abbreviated for easier typing) cartodb_id | count | lat | long | name | the_geom 1 ...
0
votes
1answer
19 views

Selecting points from intersecting an arbitrary (non-database) polygon with PostGIS

Determining a polygon as follows, and the points to check against, in ruby @poly = GEOFACTORY.polygon(@line_string1) @locations = Location.all @valid_locations = ...
0
votes
1answer
36 views

How to resolve the postgis “type geometry does not exist” issue on installing tiger_geocode extension?

I have installed postgis extension in my db. I have few columns associated with its type in few tables and now I would like to use reverse geocode functionality in my app. Hence I tried to create ...
2
votes
1answer
23 views

GeoDjango/PostGIS distance lookup not working

I'm building an api to make distance lookups using Django 1.8, GeoDjango, Django REST Framework and PostGIS. Locally I'm using PostGIS 2.1.7, my host (PythonAnywhere) uses 2.1.4... I'm not able to ...
1
vote
1answer
26 views

How to merge(transfer) one layer into another postgis layer?

I want to merge 2 layer which have identical structure. First layer is from postgres database table say "layer1" and other layer is shapefile say "layer2". I want to merge layer2 "INTO" layer1 (NOT ...
1
vote
1answer
21 views

Mapbox Studio Draw Order

I have made a map using Mapbox Studio. The map is made up of 2 map sources, MapBox Streets Custom Style - a PostGIS layer I am having trouble working out how to set the draw order. I have tried ...
0
votes
1answer
38 views

PostGIS: Closest outside point to point inside polygon

There is the famous ST_ClosestPoint() return the closest point inside polygon to some outside point. I'm looking the inverse problem: I have a location inside polygon, and I want to get the closest ...
0
votes
0answers
26 views

PostGIS: Lines from location touches but not intersecting polygons

I have OSM .shp file of buildings. I created vertices along each line of the building in that way: vertices (red) & mid points (green). The mid points made by ST_Line_Interpolate_Point() after ...
0
votes
1answer
20 views

How to use intersection in spatial guery in postgresql?

I want to get id, time and point_metric columns from intersection between two geometry(geom_lines and gem_houses). I wrote following sql code, however it fore an error (argument of WHERE must be type ...
0
votes
1answer
23 views

How to set srid of a single point coordinates pair?

I think is better explain with a small example: selected a geometry point i get it back in a coordinate pair SELECT ST_AsGeoJSON('010100002031BF0D009A999919F9BD2D41CDCCCC4C758E5241') --result: ...
1
vote
1answer
54 views

counting overlapping polygons - ST_Union very slow, how to make it more efficient?

I have a set of 1000 polygons that overlap and I want to count the areas of overlap. I am using this blog post's instructions to create multilines from the 1000 polygons then use this line file to ...
1
vote
0answers
24 views

Create HexBins for shapefiles

I usually create hexbins using the MMQGIS tools in QGIS. I would create a hex layer and intersect it with a shapefile. I've tried to create a hex shapefile and importing it into a PostGIS and tried to ...
0
votes
1answer
21 views

Uploading shapefile into postgis

I am trying to import some shapefiles into postgis. Now I have an example database within my download of postgis. In this database I can import the shapefile by changing the DBF file character ...
0
votes
2answers
58 views

PostGIS: Closest polygon to point [duplicate]

I have .shp file of polygons and single (point) location. How can I retrieve the closest polygon to that single location? Thanks,
1
vote
0answers
15 views

How can I check If Features do not have an SRID set or are similarly malformed? [duplicate]

QGIS does not display all Features of Layer and behaves weird instead I got the comment: "How did you create the other features in PostGIS (as opposed to the ones that were edited)? My initial ...
0
votes
1answer
19 views

With schema, function postgis_full_version() does not exist

A rails application is configured to run with postgis. Database.yml is configured as follows: development: adapter: postgis database: app_development username: simpleton schema_search_path: ...