PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

3
votes
1answer
741 views

How to use the pgRouting TSP function?

For more than two days I'm trying to make the TSP algorithm work in PostgreSQL/PostGIS. My problem seems to occur when I'm trying to take into account the road network for TSP algorithm. I know that ...
-1
votes
1answer
23 views

Failed to convert multilinestring to linestring

I tried to convert some multilinestring data into linestring using: SELECT ST_AsText( ST_LineMerge( ST_SnapToGrid( ST_GeomFromText(the_geom), 0.001) ) ); and ...
1
vote
1answer
107 views

Routing in MS SQL 2012

I would like to perform routing in MS SQL 2012 similar to pgRouting. In pgRouting, I'd do the following steps to create a routable network: Create a database routing with template template_routing ...
3
votes
1answer
300 views

How can I make a Postgres/PostGIS ST_Distance_sphere query more efficient?

Within Postgres/PostGIS I have written an SQL query to get the closest distance for each element within a point coordinate table from a polyline table. The query comes back and works correctly, but ...
1
vote
2answers
308 views

Function for Selecting Points in a Polygon

I've been banging on this for a few hours, but since I'm relatively new to PostgreSQL and PostGIS, I can't find the solution. I'm trying to create a stored procedure (function) which will return all ...
0
votes
2answers
99 views

Error while creating spatial database connection

I'm using ArcGIS 10.0, and I've already created my database using "ArcSDE for PostgreSQL Post installation" .. My database is successfully created in PostgreSQL and now that I'm trying to create a ...
2
votes
1answer
171 views

Cannot find my schemas in QGIS's “Add PostGIS layers”

When I connect to my PostGIS database using QGIS's Add PostGIS Layers, I see only public topology pg_catalog information_schema My other schemas that I have created are not shown here. Anyone else ...
1
vote
1answer
56 views

PostgreSQL/PostGIS: create spatial view

I have a polygon layer and a point layer. 1) I wrote a spatial query to count how many points fall in each polygon: SELECT polR.codeR, count(pntAZ.geom) as tot_pntAZ FROM boundaryR as polR LEFT ...
1
vote
0answers
20 views

Designing a database for Kinect cloud data [closed]

I'm developing a navegation system with a kinect, by this moment I can obtain a cloud points(X, Y, Z, RGB), the idea is to introduce the point cloud (X,Y,Z) into a database postgreSQL with postGIS ...
0
votes
1answer
343 views

SELECT assign_vertex_id('ways', 0.00001, 'the_geom', 'gid'); not work

I'm using using OSgeo 6.5 dvd and studing pgrouting workshop (link) for get shortest path. I created network topology call "pgrouting - workshop". There are three commands to execute in section 5.2 ...
0
votes
1answer
61 views

Can't start ArcSDE (esri_sde) service

I am getting an error message when atempting to create a connection in ArcCatalog (I'm working under the 10.0 version). The message is : Failed to Connect to the specified server. No ArcSDE server ...
5
votes
1answer
115 views

How to compare two Geodatabases

I would like to compare the data of two geodatabases, in SDE or a file geodatabase, to detect the changes occured between them , i've tried to compare the Xml workspace document of both databases ...
1
vote
1answer
55 views

Using ST_split to split a line feature using nearby points

I have a line shapefile and a point shapefile, and the line has just one segment and its attribute table, the point shapefile has points near the line above, not on it and the close ...
0
votes
1answer
40 views

Geometry to Shapefile

From importing the shapefile to postgis, its geometry is added to the database postgresql. The question, how can I load the shapefile in the Visual Basic.Net using the geometry in the database ?
0
votes
1answer
27 views

Add GPX files to postgreSQL database and add one column with a given value

I already found out how to add a gpx track information into my postgres database: `ogr2ogr -append -f PostgreSQL "PG:dbname=your_db user=xxxx password=yyyy" filename.gpx` Everything works fine but ...
0
votes
2answers
44 views

Postgis: ST_Buffer breaks because of no forward edges

I try to buffer a huge road network using ST_Buffer. After 8h of processing I get an error message: ERROR: GEOSBuffer: TopologyException: No forward edges found in buffer subgraph Here is my query ...
4
votes
2answers
216 views

clustering points in postgresql to create contour map

UPDATE: To try to make this a little more simple, is it possible to create a query which selects a group of points such that each point in the group is at most X units away from at least one other ...
0
votes
0answers
5 views

View information raster data in postgresql

I download and use raster2pgsql.exe import tiff image into postgresql. Can i use the query to retrieve the information of the image does not? Information such as: date of capture, capture time.
1
vote
1answer
23 views

How can I convert SRTEXT to PROJ4TEXT with QGIS

I have a SRTEXT like this: GEOGCS["My Data",DATUM["Not specified (..... I want to get PROJ4TEXT of this STREXT. Can I get it from QGIS. Because I want to insert it in Postgresql SPATIAL_REF_SYS ...
0
votes
0answers
24 views

Postgresql (soln would be basic SQL I think): ORDER by distance to a point and return those distances in array pairs w/ the full records

so I know there have been some questions asked about how to calculate distance using postgis and how to order results by their distance from a respective point. I'm not very talented at SQL (at all) ...
0
votes
0answers
81 views

Postgres SSL SYSCALL error: EOF detected with python and psycopg

Using psycopg2 package with python 2.7 I keep getting the titled error: psycopg2.DatabaseError: SSL SYSCALL error: EOF detected It only occurs when I add a WHERE column LIKE ''%X%'' clause to my ...
0
votes
0answers
23 views

Can i install opengeo suite in VPS windows?

I want to quickly set up a gis server which i can use via internet .i guess opengeo suite is best for newcomer and also it has community edition . but if you think there is option let me know. I need ...
1
vote
1answer
24 views

shp2pgsql data appent without gid

I have a shape file, I opened it in QGIS that has columns in attribute table named CITY_NAME, POPULATION and I have a database table in Posqgresql that has columns named gid (primary key), ...
-1
votes
0answers
38 views

remotely connection to a postgis database on windows 7 OS

there i want to set up a remote connection to my postgis database but i get the following error message every time after mofying the pg_hba file: "Server doesn't listen" "Could not connect to ...
1
vote
0answers
13 views

QGIS DBmanager import file append not working [duplicate]

I am using QGIS and connecting to Postgresql database. I want to import shapefile data into database table via DBmanager tool. But Append data to table selection is inactive like following image. I ...
1
vote
2answers
166 views

How to install postgis2.0 on Debian

How to install postgis2.0 on Debian6.0 and with Postgressql9.1 ? Didn't find any good repository ? Do you have to go all the way and compile ?
2
votes
1answer
309 views

Create isochrone from multiple start points

I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start ...
1
vote
2answers
59 views

Find all points in a linestring that are contained by a polygon

I'm fairly new to PostGIS, so I apologize if this has been answered before. I have a linestring made up of 4D points and I need to determine which points in this linestring fall within a specific ...
2
votes
2answers
73 views

How to get the data type of each column from a postgis table

I need to get the column data types of all columns in a table, including the geometry types. What I wanted to know is if there is a function or SQL that gives something like this: column_name | ...
0
votes
2answers
48 views

PostgreSQL/PostGIS - group by series of values

I need to sum up linear objects' length and to group them by intervals of several years. I have one table storing my objects like this : - gid serial NOT NULL, - year INTEGER, - the_geom ...
0
votes
2answers
38 views

Which function is most appropriate to select postgis geometries that have any part inside another?

I ST_Dwithin the function returns TRUE if the geometry A is completely inside B. I happen to have many polygons (representing regions) and need to know which streets are within each of these polygons. ...
0
votes
0answers
36 views

PGSQL2SHP Commnad switch column type

I work with Postgis. I have table CREATE TABLE centerline ( gid serial NOT NULL, l_from integer, l_to integer, r_add_pre character varying(15), r_to integer ... } Export this table with ...
0
votes
1answer
30 views

I need to test a condition within the sql in postgis.

I need to test a condition within the sql in postgis. My sql: SELECT (zoneamento3_32722.zt3), logradouros32722."NMIDEABR", logradouros32722."OBJECTID", ...
1
vote
3answers
723 views

Postgis shapefile loader 2.1 error: dbf file can not be opened

The .shp, .dbf and the rest of files are fine, I open them in QGIS, AGOL with no problem. In fact, I've tried 3 different layers, and get always the same error. Anyone can please help, as I really ...
1
vote
3answers
564 views

imposm: Failing to import OSM data to PostgreSQL

Somehow I can't import OSM data to my database. I'm using Debian, PostgreSQL 9.1 and PostGIS 1.5. The user root has been granted all privileges for the database osm. Input: imposm -U root -d osm -m ...
2
votes
1answer
49 views

Centroid of Points using postgis

In my postgres database i have a set of points(lat, long) and i created the_geom index for that. Now i have to find the centroid of these points. I Google a lot and i find that for closed ...
0
votes
1answer
34 views

How can i store shape file in postgress database as a table using php?

I want to create a table from a shape file in Postgres. To do that, I can run this command in cmd: shp2pgsql -s 4326 -W LATIN1 E:\Any\THA_adm public.test123 | psql -h localhost -d DATA -U postgres -w ...
0
votes
1answer
52 views

osm2po is missing edges while importing to pgrouting

I am using osm2po for importing pbf file to postgresql but when i find route using built-in algorithms i found that some of the edges are missing so route does not match with road. Did anybody know ...
0
votes
1answer
37 views

How do I avoid this osm2pgsql duplicate key error in Windows?

I am attempting to load an OSM .bz2 file into a PostGIS database using osm2pgsql but am stuck at a duplicate key value in the nodes which violates a unique constraint - any suggestions? output is ...
6
votes
3answers
1k views

Direct connecting to PostgreSQL from ArcGIS Desktop? [duplicate]

I am trying to connect to Postgresql database that I just installed on my server machine. As instructed by Esri I have download from postgres and installed psqlodbc. However, when I tried to add the ...
0
votes
0answers
63 views

Can't see Postgis layers added to QGIS

I'm trying to transition from an old Postgres/Postgis database to a new one. I'm working in a fresh install of Win 7 64 bit. I installed Postgresql 9.3 32 bit, then installed PostGIS 2.1.3. I created ...
2
votes
1answer
61 views

POSTGIS - calculating percent area of intersection in where clause

I have a table of polygons (census block groups) in postgres. I want to tag each block group with the town (another polygon table) it mainly resides within. Is this possible? I'm thinking I'd need to ...
1
vote
2answers
92 views

What index to use in this situation

I am working with 3 tables with 3 x 500 000 rows. There is one column that gives each object a unique ID (UIDN), there also is a column with the geom data (the_geom). There also are some other columns ...
1
vote
3answers
98 views

Dismiss invalid Polygons in PostGIS

I Have a massive Dataset from OpenStreetMap and imported it into a Postgres-Database using ogr2ogr. I got several warnings during this process because of multipolygons with too little vertices. Now I ...
0
votes
1answer
28 views

managing postgresql database table using the pgadminIII sql tool

i have created a database using postgresql 9.1 and a table containing parcel information for a town council database on a windows 7 OS. i created the geometry column using the SELECT ...
4
votes
2answers
532 views

Unable to create a geometric network in a PostgreSQL Spatial Database Connection

I've created in ArcCatalog a Spatial Database Connection to an PostgreSQL database server. I've imported there all my data (from a local hard drive) and now I want to edit them. But apparently I ...
0
votes
0answers
21 views

rasterize a geography polygon using postgis 2.1

I am still bit new to Postgis 2.1. I am trying to rasterize a polygon, meaning that I have a polygon of Syria and I want to create an empty raster that contains the shape and geography reference of ...
0
votes
0answers
41 views

Geocode data base of addresses using google maps api

I have a table with over a thousand addresses in postgresql, I want to make a java class that returns me the longitude and latitude of the addresses to write to the database. Does anyone have an ...
2
votes
0answers
51 views

QGIS is not working with Postgres Plus Advanced Server

We have a problem to integrate GIS software with our GIS database which is populated on Postgres Plus Advanced Server 9.2 from EnterpriseDB. We are using QGIS to maintain and analyze our GIS ...
0
votes
1answer
54 views

pgShapeLoader: how to load a shapefile in a different schema than 'public'

I'm trying to load a shapefile in POSTGIS using pgShapeLoader. It works but I can load table only in the "public" schema and i don't know how to configure, the tool to upload my shapefile in another ...