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

learn more… | top users | synonyms

0
votes
1answer
14 views

Postgis : bounding box and intersection

How to create a bounding box around a geom (POINT) and find all the intersecting geoms(POINTS) within that bounding box? Thanks in Advance
0
votes
2answers
22 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, -12.6235), ...
0
votes
0answers
12 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
34 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
20 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
30 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
31 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
24 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
22 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
24 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
27 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
25 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
19 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
57 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
10 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
35 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
114 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
25 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
48 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
18 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
31 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
22 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
25 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 ...
-2
votes
0answers
25 views

How to publish a PostGIS table on Google maps? [closed]

I am attempting to take a shape file and display it on a map: I can do it!! if you please meaning!!
0
votes
1answer
18 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
37 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
24 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
51 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
19 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
56 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
18 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: ...
1
vote
1answer
40 views

PostGIS Query returns duplicated rows

I'm trying to create a shape file of a state. I have a map of US zipcodes that I downloaded from the US Census and I want do create a shapefile of zipcodes in Florida. I ran this query which ...
1
vote
1answer
23 views

Get points in a union of circles

I am trying to create a postgis query that would get all the points in an union of circles (possibly more than a thousand of circles with different radius). The circles would be created dynamically ...
0
votes
1answer
49 views

Error while connecting qgis with postgres?

sql="select long,lat from poidata.poi_ca from where city LIKE '%unnyvale'" uri = QgsDataSourceURI() uri.setConnection("localhost","5432","gis_data","postgres","vajja") ...
0
votes
1answer
36 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 ...
2
votes
0answers
56 views

QGIS does not display all Features of Layer and behaves weird instead

I have a weird problem with QGIS trying to load a Layer from a Postgis Database When I open the Layer from Postsgis I have two choices: Method one: Either, I use the Panel "Browser", where I can ...
2
votes
1answer
38 views

Show Log of the Sql statements that QGIS generates to retrieve Data from Postgis

Is there a ways to - make QGis log its generated SQL Statement or to - force POSTGIS to log all interaction with QGIS? There is something strange happening to the WFS layer I retrieve in QGIS, since ...
2
votes
1answer
25 views

ST_Intersects not working with ST_Expand from a point

I would like to do a real simple thing: I have a bounding box B1 (ST_MakeEnvelope) and I want to see if a square of 100 meters arround a lat/long position intersects the other bounding box (B1). I ...
1
vote
1answer
13 views

QGIS Relations loss of form style

I'm currently creating a project for management of highway drains in QGIS which involves the recording the feature attributes and logging of multiple inspections against a feature. I have a layer for ...
0
votes
2answers
63 views

Intersection of Shapefiles, clean borders

I'm trying to create a shapefile of the state of zip codes (in this example, I pick Virginia). However, the zip codes do not line up exactly to the state borders. So I run the following query to get a ...
0
votes
0answers
30 views

Postgis ST_Azimuth only returning a small range of angles

I have a puzzler with postgis and ST_Azimuth. I have a table of points (taken from country borders, and run through the QChainage plugin). I want to find the azimuth from a fixed point (15.0,50.0) to ...
0
votes
0answers
16 views

using changeset for larger region to update OSM data in PostGIS

I'm using the OSM import and update workflow described here to maintain OSM data in a PostGIS database. Import (osm2pgsql): osm2pgsql -c -d gps -U gps --cache 8000 --number-processes 4 --slim ...
0
votes
1answer
56 views

How to connect QGIS to PostGIS? [duplicate]

I want to establish connexion QGIS and PostGIS in order to run the pgRouting Layer, how can I do it?
3
votes
2answers
61 views

Construct curve of equal distance from two straight lines

Given two straight lines defined by two points each, I want to get the line which separates points nearer to line a from points nearer to line b. The attached PostGIS code is an example case, it finds ...