PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

0
votes
0answers
38 views

Calling cmd command from stored procedure in PostGIS

How to execute the command prompt from stored procedures in PostgreSQL. Below is cmd command to convert PostGIS data to image: PG:"host='<host>' port:'<port>' dbname='<dbname>' ...
0
votes
1answer
121 views

run command line shp2pgsql in c# function?

i'm developing an application web with asp.net/c# and i would in a button importing the shapefiles into postgis, and i'm trying with this code, this code i'm using it in cmd.exe in windows it imported ...
5
votes
1answer
83 views

What is the best way to merge lots of small adjacents polygons ? (POSTGIS)

I am looking for a way to merge lots of small adjacents polygons. I have this kind of features: So if my polygons are adjacents AND have the same color attribute then I want to merge those ...
4
votes
1answer
137 views

ST_Transform doesn't work in PostgreSQL

When i run the query with ST_Tranform I get this error: Input geometry has unknown (0) SRID SQL state: XX000 How can I resolve this error? I want to convert from UTM into geographic lat/lon. ...
1
vote
2answers
101 views

Simplify geometries but keep them contiguous

I have several detailed contiguous areas. I need to turn each one into KML, but when I do so, the end result is too large (in terms of memory). Using PostGIS I need to simplify these geometries but ...
2
votes
1answer
75 views

Update one table from another based on spatial join

In beginning i had two tables of points and i wanted create from one of this POINT table new table CIRCLES which will contain circle polygons 300 metres around points. This step i have done here: ...
2
votes
1answer
173 views

How to calculate width and lengths of street layer in Postgis/PostgreSQL?

I was able to project the point location (ad.shp) to the nearest street (line.shp) like this. My approach was like this. I used ST_ClosestPoint() to iterate this for every point location within a ...
1
vote
1answer
80 views

Using Postgis spatial index in st_distance operation based upon explicit SRID column

I have two large tables with data that spans over multiple regions of the U.S and needs a defined SRID column in atleast one the tables to denote which coordinate system should be used for area/...
1
vote
1answer
46 views

Transform Natural Earth data to 27700

I'd like to know how (if possible) to transform the shapefiles I've downloaded from the natural earth datasets which are in EPSG:4326 to BNG EPSG:27700. So far I've loaded the shapefiles I need into ...
1
vote
1answer
29 views

Parting lines based on intersection with polygons

I have two tables: roads containing one row (line) for each road with column road_code uniquely identifying the name of the road; districts containing one row (polygon) for each district with column ...
1
vote
2answers
54 views

How does pgr_createTopology assign source and target?

This is the first time I post a question here. I was following the tutorial from Anita Graser http://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/ , on a roads table which ...
0
votes
0answers
16 views

Geoserver homebrew memory problems

I have installed Geoserver 2.7.1 with homebrew on OS X 10.10.5. I have problems with the server crashing almost daily. A restart of the launchctl scripts does not always work so I have to do a full ...
3
votes
1answer
80 views

Projecting points towards selected line layer in PostGIS/PostgreSQL

I have a point layer (ad.shp) and street layer (st.shp) and I am trying to project the points to the selected street in a distance of 20 meters (snapping all points to the lines within 20 meters) ...
0
votes
1answer
40 views

Importing information on bridges into postgis-table using OSM2PGROUTING

In OpenStreetMap (OSM) road data there is information about whether or not a road feature is a bridge or not (boolean). However, when importing into a postgreSQL data base for routing (pgrouting), ...
3
votes
1answer
72 views

QGIS Add feature python script

New to python, and been looking at this for a while, trying to write a scrip to automate a process we need to carry out in QGIS a few thousand times. As part of this I need to create a feature into an ...
4
votes
2answers
139 views

Filter data with PostgreSQL or geoserver?

I'm working on a PostgreSQL database with PostGIS. I need to filter an 8 million records table in order to publish a view through geoserver. I know two ways to do that, one is that I create view in ...
4
votes
1answer
121 views

How to conveniently generate a Google Maps link from a PostGIS geometry?

When working with a spatial database, it is often convenient to make a sanity check for a location of a point by viewing it on Google Maps (or any other online mapping service). Copying the lat/lon ...
2
votes
2answers
69 views

PostGIS bbox with two tables

I am new to using PostgreSQL/PostGIS. I have two tables that I've imported from two shapefiles. One table is based on points called "shape_points" and the other based on polygons called "...
2
votes
2answers
117 views

Why does FeatureClassToFeatureClass work in ArcMap but not in Python script?

When trying to copy a feature class from an SDE connection file to a scratch GDB, the FeatureClassToFeatureClass_conversion works in the ArcMap Python window, but I can't get it to work in a Python ...
2
votes
1answer
75 views

Cannot generate nationscript.bat - Tiger Geocoder

I have been attempting to install tiger - geocoder in a postgres database. After muddling through examples and resources online for days I have been able to conjure up this much of the workflow. I ...
0
votes
0answers
23 views

How can I speed up Cartaro page load times running on XAMPP Localhost?

I successfully installed Cartaro using OpenGeo Suite 4.8. Accessing GeoServer via localhost:8080/geoserver works efficiently. Access GeoServer from Cartaro localhost is extremely slow. Access to ...
3
votes
1answer
56 views

Postgis Query Construction - postgresql

I'm a newbie and I need a little bit help with postgis query construction. My situation looks like this. I have a table in postgresql with ways converted from bicycle routes (take from Open Street Map)...
1
vote
1answer
39 views

Visualizing results of an aggregate function query

I want to visualize the results of an aggregate function in CartoDB. For example I want to understand and visualize the top 20 owners of land by acres with the following query. As single owner often ...
0
votes
1answer
65 views

CartoDB - PostgreSQL row_number() using PostGIS ST_Distance

I'm currently working on a query that should return a subset (i.e. "new") CartoDB table sorted by proximity to a given point. I want to display labels on the map corresponding to the closest, second ...
4
votes
0answers
30 views

Parallel feature request connection limit

I have a large pool of feature requests that need to be performed on a PostgreSQL layer. Please assume that these requests cannot be joined into larger requests. If I spawn several threads to perform ...
1
vote
0answers
28 views

GIS Workorder System [closed]

First off, these questions are relevant: http://dba.stackexchange.com/questions/7900/pros-and-cons-of-having-one-table-per-entity-vs-having-a-shared-table-with-an-e/7907#7907 http://dba....
2
votes
1answer
58 views

Removing duplicate labels from different tables

I am making a map using data stored in PostGIS. I am serving multiple layers in the map (POIs, Cartographic, Roads etc.) and when I label these layers I have repeating labels, this is because some ...
2
votes
1answer
56 views

PostGIS function ST_SymDifference between two segment groups produces unexpected results

I try to calculate the symmetric difference for a set of segment groups A and B with precision of 1E-5 (ST_SnapedToGrid(geom,1E-5). I've formulated the an ideal test case for a H based shape segment ...
1
vote
1answer
39 views

Find Delta only records in ArcGIS (SDE)

We have spatial layers in ArcSDE with objectid as unique value, I've taken this data to another platform & migrated data to cloud. Now, after months, back in ArcSDE and want to migrate new data (...
0
votes
0answers
24 views

Can I used a share drive as a PostgreSQL server?

I am currently using my C drive to practice and I have a shared drive with my co-workers where we store shapefiles. I wanted to start another server in our shared area to have us all connect the files ...
4
votes
3answers
291 views

What's wrong with my ArcGIS - PostGIS setup?

I have installed ArcGIS and PostGIS, and I'm having a hard time connecting them. I've imported some shapefiles into PostGIS and I can see them and manipulate them in pgAdmin. The trouble is that I ...
0
votes
1answer
77 views

Alpha Shapes in pgRouting

I am attempting to follow Anita Grazer's post on creating alpha shapes in pgRouting. My query: CREATE TABLE home_isodist (id serial, max_cost double precision); SELECT addgeometrycolumn('...
0
votes
1answer
59 views

Is there some method on Ubuntu to request newest postgresql postgis package rather than specific version?

There is postgresql-9.3-postgis-2.1 and there is postgresql-9.4-postgis-2.1. Unfortunately 9.3 is available only on trusty and 9.4 is not available on trusty (see http://packages.ubuntu.com/search?...
0
votes
1answer
54 views

PostGIS Query Geometry Field Truncated

Some of the geometry fields that are returned from my PostGIS queries are truncated. When I first found this error any geometry fields with more than a few thousand characters would not show up in the ...
1
vote
0answers
18 views

Group similar features in Geoserver

I have created a view in PostGIS with 1:M relationship. Now I want to display that view in Geoserver. But the problem is that my each feature is represented multiple time. How can I show the ...
2
votes
0answers
148 views

PostGIS error while adding feature: no result buffer

Can anyone explain to me the following error and possible fixes? I am using QGIS 2.12.3 to connect to a PostgreSQL 9.5 database. What confuses me is that I was able to add a feature and save, but ...
2
votes
2answers
80 views

Postgis Functional Index on st_pointonsurface() Ignored

If I define the following table... CREATE TABLE tbl_vast_importance( id bigserial PRIMARY KEY, geom geometry(MultiPolygon,4326) ); CREATE INDEX ON tbl_vast_importance USING GIST (geom); CREATE ...
4
votes
1answer
50 views

Separate isolated polygons using PostGIS

I am new to PostgreSQL and have been trying to separate polygon features in a PostGIS Table into 2 different Tables based on a condition. All polygons which touch or overlap with one another needs to ...
0
votes
0answers
78 views

How to correct this error Caused by: java.lang.ArithmeticException: / by zero in geoserver

My environment is: geoserver 2.8.1 image mosaic JDBC java 1.7.0_79 centos 6.7 postgresql 9.4.5 postgis 2.1.8 I used ImageMosaicJDBC to publish my tiff image in geoserver. But, I get the error ...
3
votes
0answers
87 views

How To save Geo-Tiff image in PostgresSQL?

I have a Geotiff image, which I want to load into a PostgreSQL database. Currently I am using the command line code for saving this image to my database : raster2pgsql -I -C -e -Y -F -s 26986 -t ...
2
votes
2answers
95 views

PostGIS raster MapAlgebra callback optimization

I'm trying to speed up an ST_MapAlgebra callback function that essentially takes a raster with four bands, checks each band for values less than a given number, and where the check is true, return the ...
2
votes
1answer
56 views

Renaming a table in the QGIS DB Manager

When creating a PostGIS table (e.g. 'lakes') in the DB Manger a primary key ('lakes_pkey'), a index ('sidx_lakes_geom) and a sequence ('lakes_gid_seq') are also created. But when renaming the table ...
0
votes
0answers
36 views

Mapnik render from a postgres cluster on an external drive

Because of limited space on my laptop I had to set up my europe-latest.osm.pbf on an external drive. Keeping the flat-nodes on my laptop reduces the processing time. The main time is spent on creating ...
4
votes
1answer
92 views

Datum and transformation error using ST_Transform in PostGIS, going from NAD83 to NAD27

I created a function in PostgreSQL to transform input coordinates using UTM Zone 12/13, with Datums NAD83 or NAD27, to the WYLAM projection. I had to manually create the entry for the proj4text ...
1
vote
2answers
106 views

Reduce query time when using both MySQL and PostgreSQL with PostGIS

I am doing a tracking query. The device is sending its location data, timestamp to store in MySQL Database. I want to show the query result of every point with its nearest POI. The POI database is ...
1
vote
1answer
54 views

Referencing variables inside ST_Distance_Sphere function

I trying to create an UPDATE function that will ultimately return straight-line distance to the nearest node on an OSM network (which will be later added to pgrouting distances I have already ...
2
votes
3answers
63 views

Update existing Postgres table from KML?

This is related to this question, but different because it's about PostGis, not Django. I'm using Postgres 9.4 with PostGIS extensions. I have a KML file, and I want to use it to update the ...
3
votes
0answers
63 views

ogr2ogr imports GML data (not from OSM) to Postgis but without the other_tags “hstore”-column

The problem I'm encountering some issue trying to use ogr2ogr to import some GML input data (not OSM) into Postgres. I'm trying to use COLUMN_TYPES=other_tags=hstore to store all the fields not ...
2
votes
1answer
84 views

Running Gevel on PostGIS 2.0

I have found Gevel, a tool enabling the visualization of the content of the GiST indices in Postgres. In particular, I am interested to use it to visualize the RTree spatial index in PostGIS. Does it ...
3
votes
1answer
47 views

Install PostGIS from source for specific PostgreSQL version [closed]

I have two versions of PostgreSQL on my machine (Ubuntu 12.04) one is 9.1 and the other one is 9.4. I want to install from source (I have my reasons) postgis 2.1.2 over PostgreSQL 9.4, but when I ran ...