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

learn more… | top users | synonyms

0
votes
0answers
4 views

Visualising raster postgre table data in qgis

I have imported a raster tif image into postgre.. raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql And imported the output sql file inside the postgre ...
1
vote
0answers
18 views

PostGIS multiple conditional statement on spatial join

I want to make a multiple conditioned spatial query in PostGIS 2.0/PostgreSQL 9.3., OS Windows 7. There are 2 tables, cadastre (Polygon) and roads (Linestring). Query: Select the sum (one number) of ...
0
votes
2answers
23 views

Y-coordinates offset in Tilemill

I own a project created with TileMill in SRS 900913. The data source is a Postgis database with the same SRS. When I'm loading the file generated with TileMill (mbtiles) in QGIS and I'm putting under ...
1
vote
0answers
32 views

Spacing a set of points

I have a shapefile of a set of points that I want to space out. I DO NOT want to do this using line interpolation as I run the risk of placing a point where there wasn't one before. I can load this ...
5
votes
2answers
279 views

Find start of river

How can I determine the start of a river in PostGIS? I have a river network (Multiline) and want to find the startpoints of the rivers. I can select the startpoints (rectangles in the graphic) ...
0
votes
0answers
15 views

Convert Postgis tables to DWG

Is there a simple way of converting a postgis table to DWG for a given table name? Regards,
1
vote
2answers
31 views

Problem in importing shapefile to Postgis with postgis Shapefile manager

i have a problem with importing my shapefile to postgreSQL, it's a poroblem with the encoding, here's the screenshot: i tried to change encodingin "options" buti get this message: "Failed in ...
3
votes
1answer
43 views

How to display OSM relations (in QGIS) from osm2pgsql populated PostGIS DB

I have a PostGIS DB populated with OSM data (osm2pgsql, standart.style). Now I would like to display a hiking trail (http://www.openstreetmap.org/relation/51855). It would also be fine, if I just ...
0
votes
1answer
30 views

PostGis - BBox -vs- ST_intersects Queries

CartoDb Recommend here that the following query is faster than an St_intersects Query SELECT * FROM {table_name} WHERE the_geom && ST_SetSRID(ST_MakeBox2D(ST_Point(-73.9980, 40.726), ...
0
votes
1answer
11 views

Raster2pgsql overview method

What is the method used by Raster2pgsql to create overview? I couldn't find details in the docs. Nearest neighbor isn't a very good choice for the dataset I'm working on, but that seem to be the one ...
3
votes
1answer
72 views

PostGIS ST_Union Performance

I'm trying to execute a 'dissolve' operation in PostGIS using the ST_Union command. The input layer is admittedly quite large and complex. By 'large' I mean 57,771 features, with number of vertices ...
1
vote
1answer
23 views

Querying Postgis data in R using dplyr package

Does anyone have a workflow for querying postgis data in R using the dplyr package? R doesn't like the spatial columns in postgis data so can't read them in like a postgres table. I get the error ...
-1
votes
1answer
23 views

How to choose a SRID and what is its meaning? [duplicate]

I'm new to GIS, in PostGIS, and I'm struggling with the SRID concept. How do you choose a SRID for a database column? This is making me crazy. Why do I need to choose a SRID? What's its meaning? ...
0
votes
1answer
11 views

Walking-Driving area with Leaflet,OpenLayers

Could be possible to get a walking or driving distance area using pgr_drivindistance,pgr_alphashape and/or pgr_pointsaspolygon when an user click any location on map with Leaflet or OpenLayers?. I ...
2
votes
0answers
44 views

Spatial query too slow to handle bigger OSM extracts

I'm trying to compute some statistics for OSM data using PostgreSQL 9.3.5 and PostGIS 2.1.4. I started with a small bavaria extract which I downloaded from Geofabrik. The db schema is the normal API ...
0
votes
0answers
25 views

How to choose data type and SRID, for coordinates from different sources, in a medium size zone

I'm developing an application. In the database I need to store coordinates for many places, in the north-east of Italy, but the area could expand in the future. This coordinates will come from some ...
0
votes
1answer
19 views

How to use ST_Transform when inserting new row?

I have written a script which reads a CSV file with lat/lon coordinates in WGS84 and inserts them into a table in PostGIS. What I want to do now is to change the insert query in order to make a ...
1
vote
1answer
31 views

QGIS 2.6 how to prevent user to drop a postgis table

Does anyone know how to prevent user to drop a postgis table? I have a vector layer imported from a postgis2.0 database, and one of my users drop it accidently. Fortunate I had a backup, but i don't ...
0
votes
0answers
30 views

GIS Data from osm visual in google maps

I have download from openstreetmap data for my project in a workshop i use den coordinates from a roads network ,but i have problem with visualization the cord in google maps same roads is not drawn ...
1
vote
0answers
13 views

Spatially joining 2 point layers i.e. pole and customer points using spatial join of PostGIS/PostgreSQL?

I created a 20 meter buffer around pole then tried to intersect with customer layer, using the query below, but it was taking a huge time to process. SELECT ...
1
vote
2answers
35 views

postgis - get nth point of a polygon

I would like to create a postgresql function to correct geographic coordinates inside a polygon that are outside the -180 to 180 range of longitudes. To do this, I thought I would create a function ...
1
vote
1answer
19 views

Select Polygon Intersections Between Two Tables With No Common Key

I am new to geodatabase queries and cartodb. I am trying to write a SELECT query that will do the following. I have two tables. Table 1 contains congressional district polygons and info about ...
1
vote
0answers
26 views

Export DGN to shape or postgis with multiple mslinks

I need a command line tool to export DGN files to shapefile or PostGIS, I tried ogr2ogr but it only exports type, level, graphicgroup, colorindex, weight, style, entitynum, mslink and text. I need the ...
1
vote
1answer
16 views

SELECT geometry FROM spaces WHERE geometry ARE WITHIN OR OVERLAP polygons FROM OTHER table

I've got two tables, one containing LINESTRINGs and one containing POLYGONEs. I would like to select all the LINESTRINGs that are containing within the outer boundary of all the POLYGONs combined. ...
1
vote
2answers
35 views

Free solution for an intranet geodatabase for point data, connectable to QGIS / MapInfo

I have a plenty of point measurements - thousands of points with date/time, gps, measured values etc. I would like to make it possible to put all my particular datasets (can decide whether shp or ...
0
votes
0answers
11 views

Displaying Postgis Database points in Google Maps [closed]

`I've created a postgis database named assets.and it contains columns gid,id,name,assetname,asset_name,geom.I've created the postgis connection and displayed the postgis database table contents in ...
0
votes
0answers
15 views

All queries on wkb_geometry column return null regardless of input ( ST_Point, ST_Intersects )

I am new to Postgis and I don't know if I am doing something wrong with my query, or if there is a problem with the data. I have been running queries on tiger shape files from the US Census site, I ...
1
vote
0answers
39 views

Create polygons enclosing same number of points on PostGIS

I have a geodatabase on Postgis with points representing customers, what i need is give a number of customers, lets say 100 and it need to generate polygons enclosing 100 clients each one. I only ...
1
vote
0answers
58 views

Using ArcMap 10.3 with PostgreSQL 9.3.x database and PostGIS 2.1.1?

I have a PostGIS database that we use for data storage. I would like to open this data in ArcMap instead of storing it in another format. In previous versions of ArcMap it has been possible to open ...
2
votes
4answers
72 views

Postgis don't use spacial-index with st_intersects

I imported the data from openstreetmap using osm2pgsql and copied it another table structure. If I made a query for containing rows using st_intersects, st_contain or someone else, postgis don't use ...
0
votes
1answer
35 views

Write a query to find all geometries within a distance using ST_DWithin

I have written a query in PostGIS in which I use the ST_DWithin function to get the geometries which are located in a certain distance: SELECT images.path, focnetworkpart.__gid FROM images INNER ...
0
votes
0answers
12 views

Updating committee name based on a spatial join within a trigger in postgis

Updating committee name based on a spatial join within a trigger in Postgis. It appears right to me and it runs and executes successfully but still comes up with an error when I try to create a new ...
2
votes
3answers
149 views

Where to find the units for a specific spatial reference system?

I want to use the st_within function to find geometries within a specifi distance. My geometries are both in the same SRID stored in a postgis db. From what I read here: ...
0
votes
1answer
32 views

Get postal codes of a city in OSM via postgis/postgresql

So, I'm trying to get the postal codes of a city (polygon). Unfortunately, I never get consistent results with my code: SELECT a.name, b.tags->'postal_code' FROM planet_osm_polygon a JOIN ...
1
vote
2answers
48 views

QGIS2.6 postgis relation between tables

I have three tables in Postgis: points called location(gid (pkey),name) example (1,Paris) temperatures named Temp(idTemp(pkey),TempValue,date) example (1,12,2015-01-01) relation between the two: ...
5
votes
1answer
80 views

PostGIS query points based on distance from regular grid

I have a PostGIS table with a large number of points (>150k) on a roughly regular grid -- all points are all about 5km apart. Each point has a geometry field and an associated value nr_days. Is ...
0
votes
0answers
34 views

Dissolving points based on easting and northing with statistic type first as aggregate function using PostGIS?

I have two points features having point_ID, Easting and Northing fields and want to dissolve based on Easting and Northing with statistic type aggregate as "first" for point_ID, as you do in ArcMap. ...
2
votes
1answer
29 views

am I setting up data from google geocoding correctly for ST_DWithin search?

Sorry to ask a basic question, but I have not been able to find this laid out entirely anywhere. I am mostly relying on this SO post: What Spatial Reference System do I store Google Map's Lat/Lng ...
1
vote
1answer
25 views

postgis calculate distance between point & polygon/circle

By basic requirement is to find the nearby fences to a particular point(user lat long alt) within a N meters. I have list of polygon/circle in DB with 900913 srid ...
1
vote
1answer
32 views

PostGIS returning a field one level higher in the Json

I have the following SQL on a PostGIS Database ($properties contains a list of fields, including osm_id) SELECT row_to_json(fc) FROM ( SELECT 'FeatureCollection' As type, ...
1
vote
3answers
31 views

PostGIS raster maximum number of bands?

Is there a limit on the maximum number of bands you can store in a postgis raster? I cannot find documentation on this. As far as I can remember, a geotiff allows up to the max short integer (so ...
0
votes
0answers
29 views

QGIS Crash: Enter Credentials

just wondering if anyone has come up against this issue...in the office QGIS will come up with an 'Enter Credentials' box with 'Error: Too many clients already'. When you enter your username and ...
1
vote
1answer
32 views

WFS 2.0 transaction

I am using WFS-T in a mobile application to commit changes to a postgis database via geoserver 2.6. I build the http requests myself (not using any framework like geotools or openlayers). I already ...
1
vote
1answer
28 views

how can I update linestring on postgis?

I have a linestring on my postgis. and I want to add a new point linestring. I mean I want to update my linestring? how can ı do this? UPDATE roads SET geom = ST_AddPoint(geom, 'POINT(0,0)') WHERE id ...
2
votes
3answers
70 views

Which tool/referecence for adress geocoding?

I have to geocode several corporate sites (a big excel file), near to Paris (FRANCE). I would like to geocode this file based on the addresses. Could you tell me the best tool for this task ...
0
votes
1answer
39 views

How do I create a new vertex in the middle of an edge in postGIS?

I have a postGIS database populated with OSM data with the osm2po import tool. I have a number of fixed points that I want to route between using pgrouting. In order to do this accurately, I want to ...
3
votes
2answers
65 views

Downloading raster data into python from postgis using psycopg2

I have raster data in a postgres table that I want to get into python as a numpy array. I am using psycopg2 to connect to the db. I am able to download the data but it comes back as a string (probably ...
1
vote
2answers
46 views

How can I add another WHERE filter to a PostGIS query?

I have this query, which works well, for an OSM database: SELECT row_to_json(fc) FROM ( SELECT ST_AsGeoJSON(ST_Transform(ST_Intersection(lg.geometry, bbox.geom), 4326))::json As geometry, ( ...
0
votes
0answers
28 views

PostGIS ST_Contains query return empty

Hopefully I explain this properly. I am trying to check if a route falls into another route I have greated. The route is saved as a linestring. My search query is: SELECT id FROM routes WHERE ...
3
votes
1answer
43 views

How to import a GeoTIFF into PostGIS without raster2pgsql

I know that one can import GeoTIFF into PostGIS via raster2pgsql. I was wondering if there is any easy way (as a sequence of SQL statements) to do the same without resorting to the command line tool? ...