PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
1answer
108 views

PostgreSQL PL/Python Function for “IF” condition

I am using OSM data to run pgr_dijkstra() for weighted-path calculation. But after importing OSM data using osm2pgsql I populated some additional columns into my ways table. So now it has gid serial, ...
0
votes
1answer
80 views

Polygon intersection with LineString in PostGis

I have a table which contains GPS coordinates at certain times. I created a LINESTRING from them ordered from the oldest to newest. I also have a POLYGON and I would like to determine the subset of ...
0
votes
0answers
57 views

Displaying Google Map using MapServer, C# and PostgreSQL?

I am displaying Google Map (MapServer) by using C#. And also highlighting the districts on the Google Map using PostgreSQL data. Every thing is working well but when I use any options like zoom in, ...
0
votes
1answer
48 views

How to load all states of TIGER into PostgreSQL?

I downloaded TIGER2014 from the Census FTP and I was wondering how I would be able to load all the geometries at once. I learned about loader_generate_script and loader_generate_nation_script but I ...
0
votes
3answers
165 views

Installing QGis such that it will work with the Postgres.app implementation of PostgreSQL on Mac (Lion) (open to alternative implementations)

I just got a new mac and am getting everything installed on it (postgres, postgis, qgis, grass, gdal, brew, ruby, etc) and am about to install QGis. QGis is a great tool for me, except for that with ...
1
vote
1answer
366 views

QGIS loads PostGIS layers but DBManager can't connect

DB Manager can't connect to PostgreSQL, but "Add PostGIS Layer" can. My eventual goal is to save created layers to PostGIS. I assume I can do this using the DBManager Tool. I can alternatively use ...
2
votes
2answers
104 views

Finding all ways that are partly within a bounding box

I'm trying to write a query that will return all OSM ways which are contained within a bounding box of min/max gps coordinates. I get these cooridinates from the greater london bounding box on ...
1
vote
0answers
43 views

Is there any VRP solver in Pgrouting 2.0?

after looking at older posts and googling for a while i guess there is not vrp solver (multiple trucks). there was DARP in pgr1.x but i can't see it in 2.x. i found a lot of information on ...
0
votes
0answers
32 views

line features show up as polygons in GeoServer

the layers are located in a postgreSQL Enterprise Geodatabase. I created a new line feature class and added it to the database and then added it to geoserver. But in geoserver it comes in as a polygon ...
0
votes
1answer
174 views

Loading Multiple CSV Files into PostgreSQL Table

I am having multiple CSV files. Those CSV files are the log files created as a result of running a windows batch file. The location of these CSV files lies on the server and i want all these CSV files ...
2
votes
0answers
63 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 ...
1
vote
1answer
27 views

How to find out postgis.backend?

How can I find out which postgis.backend (geos or sfcgal) I have?
1
vote
1answer
66 views

Does ST_Intersection work in 3D?

I am using "ST_Intersection" between two 3D lines which I believe do not intersect, but the result gives me their intersection. SELECT ST_ASText(ST_Intersection( ST_GeomFromText('LINESTRING( ...
0
votes
1answer
40 views

ERROR: attempt to redefine parameter “postgis.backend”

I just install "SFCGAL". When I use "ST_3DIntersection", It get below error: ERROR: attempt to redefine parameter "postgis.backend" SQL state: XX000 How can I fix? I already saw ...
3
votes
2answers
33 views

Can GeoServer Mosaic extension footprints be something other than a shapefile?

According to the GeoServer documentation for the Image Mosaic extension... http://docs.geoserver.org/2.4.x/en/user/tutorials/imagemosaic_footprint/imagemosaic_footprint.html It asks for a shapefile ...
0
votes
1answer
30 views

How to upgrade an PostgreSQL 8.3(32-bit)/ArcSDE 10.0 database to PostgreSQL 9.2(64-bit)/ArcGIS 10.2?

I need to upgrade a large production PG8.3(32-bit)/Arc10.0 database with a fair amount of programming (that has circular references) as-is. This is a system that I inherited, so I don't have the ...
1
vote
1answer
36 views

Postgres: plpgsql combine ST_Overlaps and ST_Intersects

I have a question regarding creating a trigger function in postgres with 2 conditions: when creating a linestring in QGIS their must either overlap nor intersect. So i wrote 2 function, each working ...
1
vote
1answer
130 views

PostGIS ST within does not exist

I'm quite new to postgresql and postgis so this error will probably due to some rookie mistake. I want to run the spatial query ST_within. When I describe the query like this SELECT nw.entity_id AS ...
1
vote
0answers
23 views

Issues installing GDAL with PostgreSQL

I'm trying to install gdal-1.11.0 on CentOS 6 machine. Following the instructions, this is my config ./configure --prefix /usr/local --with-fgdb=/usr/local/FileGDB_API ...
0
votes
0answers
29 views

How to create unique plane with PostGIS?

How to create a unique plane, with (x , y ,z) as center and a vector as normal, in PostGIS? I already saw "Make3DBox" function, but it does not make a unique one.
2
votes
1answer
36 views

Geohash36 for PostGIS

i was wondering if anyone created a ST_GeoHash36 function inside postGIS, i know the ST_GeoHash + ST_GeomFromGeoHash functions exists, But i need the geohash36 function inside postGIS, i need a ...
0
votes
0answers
17 views

How to choose entrys in pgr_kdijkstrapath over checkbox in HTML?

I want to create a GIS, where people live at pre-defined places(all of them play a defined musical instrument). A route should be created from these people to the place where they play together. It ...
0
votes
2answers
42 views

Can you do aggregate functions among nearby geometry in PostGIS?

I want to do aggregation based not on group but on geometry, is that possible in PostGIS? For example to calculate max, min, average price for all listings that's nearby a geometry point, how can I ...
3
votes
1answer
103 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 ...
3
votes
1answer
81 views

Visualising a raster PostgreSQL table in QGIS

I have imported a raster tif image into PostgreSQL with this command: raster2pgsql -s 32643 -I -M filepath.tif -F -t 100x100 public.databassename > filepath.sql And imported the output SQL file ...
4
votes
0answers
93 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 ...
2
votes
0answers
115 views

How to load GeoJSON into PostgreSQL database using Python?

What I have tried to do is (In Python IDLE): import psycopg2 import json try: conn = psycopg2.connect("dbname='carto' user='postgres' host= localhost password='password'") except: print "I am ...
4
votes
3answers
89 views

How can I export data containing umlauts from PostGIS to shapefile, without losing the umlauts?

I am exporting my Finnish (Finland) data from PostGIS to esri shapefile. I am using the PostGIS Shapefile Import/Export Manager and I don't see any way to specify the encoding of the shapefile's ...
6
votes
2answers
321 views

Where can I find PostGIS error codes?

Using ST_Contains in where clause sometimes gives me error messages like ERROR: GEOSContains: TopologyException: side location conflict at 37.3706 55.7882 For now I can't guarantee validity for ...
0
votes
0answers
109 views

Polygon dynamic grid creation for a shape file

I have used QGIS Vector->ResearchTools-> Vector Grid to create a 1lat x 1 long grid for the landpolygon shape file (from osm). Now, I am interested in creating dynamic grid for the original ...
1
vote
1answer
56 views

How do I change the PostgreSQL data directory in the OpenGeo Suite 4.5?

I am using OpenGeo Suite and I would like to move the PostgreSQL databases files to a different drive than my operating system. The default location installed by OpenGeo Suite is in the ...
9
votes
1answer
600 views

How to view a 155 MB raster stored in PostGIS?

I am using the following command to load a raster into a postgres database: raster2pgsql -I -C -e -Y -F -s 3086 -I -C -M myraster.tif myraster -F -t 30x30 | psql -U postgres -d database -h localhost ...
2
votes
4answers
107 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 ...
1
vote
1answer
72 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 ...
1
vote
0answers
310 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 ...
1
vote
1answer
39 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 ...
-4
votes
1answer
26 views

Make connection from Postgresql to QGIS? [closed]

I'm still new in QGIS. I want to add data from one layer to another layer in QGIS. How could I accomplish that?
1
vote
1answer
26 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. ...
5
votes
3answers
229 views

PostGis: Geometry from UTM text

I have plain data in a postgresql table which looks like this: ╔════╦═══════╦═════════════╦══════════════╦══════════╦═════════════════╗ ║ id ║ index ║ easting ║ northing ║ utm_zone ║ ...
4
votes
3answers
2k views

ArcGIS Server not showing map service? [closed]

I have a map service enabled in my server and have kml and wms as well as mapping and feature access capabilities turned on. I can view the wms in qgis, I can veiw the kml in google earth. However ...
2
votes
0answers
398 views

Unable to edit PostgreSQL/PostGIS layers in ArcMap 10.2.2

I am connected to the database, have added a layer, started edit session, but I am unable to edit the attributeeo table of said layer. ArcMap tells me that it is not an editable layer. When ...
0
votes
1answer
117 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 ...
0
votes
1answer
41 views

Finding lines of similar attribute with respect to nodes connected to its both Ends

I have line networks with node generated for Start and End Point . how to check if a line has correct attribute with respect to point created at its End. for instance FuID_Line = ABC_BDQ and Start ...
3
votes
4answers
374 views

Split lines into non-overlapping subsets based on points

Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the ...
2
votes
1answer
56 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 ...
2
votes
2answers
321 views

Update/refresh edited PostGIS table in QGIS

I imported a PostGIS table (with geometry) from my PostgreSQL database as a layer in QGIS. Later, I edited the table using PostgreSQL UPDATE commands. Is there a way to quickly update (like a refresh ...
1
vote
1answer
57 views

How do I sum values that are geographically close to each other?

I have a dataset of Boko Harams rampage in Nigeria uploaded to CartoDB. I have columns like coordinates, dates, number of victims. Would it be possible to write a query that would sum the victims ...
1
vote
1answer
56 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, ...
0
votes
0answers
33 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 ...
5
votes
4answers
974 views

What does the “service” box in the PostGIS connection dialog stand for?

Can sоmеbody explain me what to write in the "service" box when connecting to the local DB. QGIS Lisboa and Postgres are installed.