PostgreSQL is an open source object-relational database system.

learn more… | top users | synonyms (1)

2
votes
0answers
76 views

Insert shapefile draw features into PostgreSQL database using java EE (pragmatically)

I am working with PostgreSQL 9.4 and Java EE i want to insert shapefile or layer's features into PostgreSQL, is there any solution so i can insert the whole shapefile into database. OS Windows10. ...
1
vote
2answers
51 views

Conditional “On the Fly” Column with PostGIS

I have two tables I am working with; tl_2015_us_county which consists of county polygons, and tl_2015_48_puma10 which consists of PUMA polygons. I am currently using the below SQL in order to achieve ...
1
vote
1answer
75 views

LeafLetjs: GeoJSON invalid object error

I am getting GeoJSON data from postgresql, but it seems to be invalid. How can I validate it? After getting GeoJSON format data I want to put on map for projection. I am using LeafLet, java EE, ...
1
vote
0answers
72 views

Cursor help on large spatial query in PostgreSQL

I have two very large tables on which I want to perform a spatial query. UPDATE table_a SET att_1 = b.att_1, att_2 = b.att_2 FROM table_a AS a JOIN table_b AS b ON ...
3
votes
2answers
91 views

Change case of Acronyms in PostGres

I have a table containing almost 1 million points (POIs). I want to change the case of all the acronyms in the display name column I have, currently I am identifying the acronyms as any 3 letter words ...
7
votes
1answer
2k views

Could not load library “C:\…\ rtpostgis-2.2.dll”

I've installed PostgreSQL with Postgis (tried both version 9.4 and 9.5 ) on a remote desktop running Windows 7 64bit. However, when I executed this SQL command: "CREATE EXTENSION postgis" (on ...
1
vote
1answer
56 views

Geometry type and create trigger for that in postgresql

I want to create a trigger (before inserting trigger), to check the geometry type weather it is point, polygon, line, or multi-polygon. After that, I want to set the color property. How can I do this ...
1
vote
1answer
72 views

Change SRID of geometry column

I have in my table column geom with geometry, data type of this column is geometry(Point,102067). I want to change SRID from 102067 to 5514, but if I use this command select UpdateGeometrySRID('...
0
votes
1answer
102 views

How to USE ST_difference AND ST_intersection in case of multipolygons ? (POSTGIS)

I try to use ST_difference and ST_intersection with two layers of multipolygons. I want something like: With the input on the left and the result on the right. MY DATA: t1.geom contains 1000 ...
1
vote
0answers
41 views

Is PostGIS / PostgreSQL UK Public Sector Network (PSN) compliant?

Is PostGIS / PostgreSQL UK Public Sector Network PSN compliant? ... specifically so it can be used in a UK local government council?
1
vote
4answers
15k views

postgresql export database by command or pgAdmin III [closed]

I want to export my postgresql db with pgadmin. I search all of its GUI, I also searched the web and I don't find some sueful information. I know how to import the db into postgresql: create a db with ...
0
votes
1answer
75 views

How to use gdal_rasterize with postgis vector?

I'm trying to convert a multipolygon vector layer to a raster using the GDAL tool gdal_rasterize. The command I am using is: gdal_rasterize -b 1 -burn -9999 PG:"dbname=db password=password" \ ...
7
votes
5answers
2k 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 ...
0
votes
1answer
38 views

Adding a column to polygon table with correct corresponding address

I have 2 shapefiles: one with polygons (buildings) and their properties other one is a point address shapefile - it contains points that are inside polygons from the other SHP, but it's still ...
2
votes
1answer
35 views

Why am I getting a syntax error at “RETURN result;” when creating a CartoDB pl/pgsql function?

Despite CartoDB appearing to run PostGIS 2.2 (see below), it still doesn't support multi-point geometries in ST_Split. SELECT postgis_full_version(); POSTGIS="2.2.0" GEOS="3.5.0-CAPI-1.9.0 r4084" ...
9
votes
1answer
304 views

Is it possible to replicate an SDE geodatabase including the archive tables?

I have a database in one location which I would like to replicate to another using one-way replication. In testing we haven't been able to replicate the archive tables, which is unfortunate because we ...
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>' ...
2
votes
1answer
111 views

Why does my MapServer WMS not zoom correctly in OpenLayers 3?

Below code is showing the addition of mapserver file in openlayers 3, it is successfully showing me image in the browser but when i zoom that image it does not zoom. It comes back to originial view. ...
0
votes
2answers
83 views

how to specify -t critical dowloading raster with raster2pgsql

I'm trying to download a raster into postgres/postgis. So far I wrote: raster2pgsql -s 3006 -I -C -M -R filename.tif -F -t 463.313x463.313 schema.rastername | psql -h localhost -U postgres -d db ...
0
votes
1answer
36 views

SQLAlchemy Error on insert

I am trying to add a point with GeoAlchemy 2. However I am getting getting error on insert action saying ---sqlalchemy.exc.InternalError: (psycopg2.InternalError) parse error - invalid geometry HINT:...
1
vote
1answer
264 views

how to fix this ERROR: Start vertex was not found

I am attempting to make an SQL selection but receive an error. My statement: SELECT * FROM network JOIN (SELECT * FROM shortest_path(' SELECT gid AS id, start_id::int4 AS source, end_id::int4 ...
3
votes
1answer
68 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 ...
-3
votes
1answer
48 views

ERROR: syntax error at or near “group” LINE 4: …E ST_DWithin [closed]

I'm writing an SQL query but I am getting a syntax error on the line with the GROUP BY. What can possibly be the problem? UPDATE intersection_points i SET nbr_victimes = sum(tue+bl+bg) FROM ...
2
votes
2answers
153 views

points within a polygon

Since I am a beginner to postgis I am facing problem with finding points within polygons from my table. This is my table structure Column | Type | -------------+------------...
2
votes
0answers
30 views

Can't delete postgis

geo2=# create extension postgis; ERROR: PostGIS is already installed in schema 'public', uninstall it first geo2=# create extension postgis_topology; ERROR: required extension "postgis" is not ...
4
votes
1answer
825 views

Determining suitable server specification?

I am looking for server specifications for a moderately sized habitat mapping project. My current server is about to reach its storage capacity, so I am researching buying a new one that I can ...
6
votes
1answer
128 views

Direct Connection from Postgres to ArcGIS results to two feature classes per table

I'm using ArcMap (10.3.1) to connect to Postgres (9.4.5), which has Postgis version 2.2.0 installed. Create/Enable Enterprise Geodatabase wasn't used in this database. It's just a connection to the ...
0
votes
1answer
108 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
78 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
2answers
566 views

PostGIS: ST_Equals false when ST_Intersection=100% of geometry?

I have 2 datasets consisting of cadastral parcel data - roughly 125,000 rows each. The geometry column is WKB polygons representing parcel boundaries; all data are geometrically valid (the polygons ...
25
votes
2answers
54k views

How to insert a point into postgis?

I have created one table in my Postgis. But I can not insert point. I do not know what's wrong with my query? CREATE TABLE app ( p_id INTEGER PRIMARY KEY ); SELECT AddGeometryColumn('app','...
1
vote
1answer
154 views

Debugging QuickExport Parameters in Data Interoperability Extension for Exporting to PostgreSQL?

I am using ArcGIS Desktop 10. I tried to configure the QuickExport parameters by examining the log file after I used the QuickExport tool itself. The only things I changed from the log file are the ...
4
votes
1answer
104 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
91 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 ...
0
votes
0answers
12 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 ...
4
votes
2answers
208 views

PostGIS: Strategy for fastest select by BBox with an ORDER BY polygon area clause. Cluster?

Update 2 (below) suggests 14% of the table geometries are stored out-of-line with the rest of the table records. This may be a useful clue. The Problem: We've got a table with appx 170,000 WGS84 ...
4
votes
1answer
57 views

Overlapping line aggregation+trim in PostGIS, while summing values

I'm sorry for the vague title, I didn't really know how to name this. I am working on a project that visualizes and simulates 17th century trade. For this project we also use so called Minard lines to ...
1
vote
1answer
183 views

PostGIS Clustering. Group by geographic point location proximity

I have a table where i keep user's location history. The system gets user's current location each minute and writes it into "user_locations" table. Later on; when showing the locations that the user ...
2
votes
1answer
69 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: ...
1
vote
1answer
102 views

Open source UML modeling software (GIS)

I am wondering is there any opensource UML to Postgresql Mysql tables conversion software which also includes the geospatial datatypes ? Note:I want conversion from UML to database. and NOT ...
4
votes
3answers
263 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 ...
1
vote
1answer
64 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
39 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 ...
0
votes
2answers
3k views

Error importing shapefile into postgreSQL using shp2psql

I've tried this a few different ways and keep getting the same error. I have a shapefile currently in WGS84 UTM Zone 15 which is SRID 32615. I used the ArcMap multipart to singlepart tool to create a ...
1
vote
2answers
4k views

Converting mulitlinestring to linestring in PostgreSQL with PostGIS? [duplicate]

I am using postgres with postgis and I have a set of points which I would like to interpolate with a set of lines. Now my problem is that the set of lines are of type multilinestring. Is there a ...
2
votes
2answers
487 views

Why use a database when you can have all of your data in javascript/openlayers?

I have a really simple and basic question. First of all, I have to mention that I am pretty new to web applications and GIS. I am working on a web application using Openlayers, Postgresql/postGIS and ...
2
votes
1answer
81 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 ...
0
votes
1answer
39 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), ...
2
votes
2answers
64 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 "...