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

learn more… | top users | synonyms

0
votes
0answers
10 views

pgRouting not returning node with correct z-value

have an issue with pgRouting that I've modified to consider multi-floor indoor areas. I've created a mock floor plan of any typical hotel. I copied the floor plan and assigned a different z-value to ...
1
vote
1answer
23 views

How to get ST_MakeLine ready for QGIS?

CREATE VIEW new_line AS SELECT point1.gid, ST_MakeLine(point1.geom, point2.geom) FROM point1, point2 WHERE point1.gid = point2.gid; It's possible to load the layer but QGIS says 'There is no entry ...
1
vote
1answer
27 views

find the population density of some points in qgis/postgis

I have the tiger census data of population density in each block group. I also have a different kind of data: traffic accident data, where an accident has a lat/lon pair. My goal is to find the ...
0
votes
1answer
18 views

PostGIS : ST_Contains doesn't work after ST_FlipCoordinates

I'm using postGis in a personal project, mainly to determine if a point is inside a Polygon. I realized I was using lat/long instead of long/lat for creating my polygons and using ST_Contains. Thus i ...
0
votes
1answer
34 views

What is a MultiPolygonZM geometry type?

My imported shapefiles (shp2pgsl) have the geometry type "MultiPolygonZM". geom geometry(MultiPolygonZM), What is this type of multi polygon? I can't find any useful information.
0
votes
0answers
24 views

How to create buffer around points stored in PostGIS and served through geoserver [on hold]

I have a PostGIS database with a table with point geometry. I am showing these points through Geoserver using OpenLayer2.13. What I want to do is to create a buffer around these points. How can I do ...
1
vote
0answers
27 views

raster2pgsql error

I am attempting load ~500 rasters in a PostGIS table. They are .Hdr/.dat files. I am using raster2pgsql. I am able to load the first 260 rasters, but the remaining rasters fail with the following ...
2
votes
1answer
56 views

How to create a sequence for a table which was created by selecting data from another table?

I have created a new table by selecting data from an existing table: CREATE TABLE polygon2 AS SELECT gid, geom FROM polygon1; CREATE SEQUENCE polygon2_gid_seq; SELECT SETVAL('polygon2_gid_seq', ...
1
vote
1answer
39 views

How to compute equality of polygons in PostGIS independently of their orientation?

I tried some functions in postgis. Scope of work, get the equality of two shapes, independently of their orientation in the space. I detect the shapes from autocad and of course in lifetime of a ...
1
vote
1answer
31 views

trigger postgis and dump qgis 2.8.2

I created a trigger that checks if geometry is valid on insert and update. create or replace function check_geom() returns trigger as $$ begin --insert a polygon IF st_isvalid(new.geom) = 'f' ...
0
votes
0answers
28 views

Reprojecting in Postgis

I try to reproject a layer in PosGIS using statement: UPDATE <table> SET geom=ST_Transform(geom, 3857); leading to error message: ERROR: transform: couldn't project point (574415 6.22508e+006 ...
0
votes
1answer
34 views

Polygon area calculation in Ruby (on Rails, rgeo, PostGIS and GEOS) in sqare meters

In a Ruby-on-Rails application, I need the area in square meters (or any other surface measure, be it ares, hectares, square kilometers, but not in pseudo surface measure like square degrees) of a ...
1
vote
1answer
52 views

St_Difference between raster and vector using PostGIS

I want to calculate the difference between a raster and vector layer, I used this querie but it's so slow and I don't know if it's right or not. I'm not using st_difference because it only support ...
1
vote
0answers
27 views

What is the fastest way to select oldest, unique geometry from a table containing duplicates in PostGIS?

I have an output from an ArcPy arcpy.Union_analysis operation and for the overlap polygons that were created I need to select out the oldest feature (along with the attributes). The result is 75740 ...
0
votes
0answers
10 views

Error in osm.xml while generating the output xml for tile server using generate_xml.py

I'm setting up my own tile server using PostGreSQL, PostGIS extension, mapnik and osm2pgsql. While trying to generate the xml by using the command: E:\>python generate_xml.py download_osm.xml ...
0
votes
0answers
21 views

Finding a substring within a table of data between 2 string positions in PostgreSQL

I am trying to populate a view in PostGIS and in this view I want it to contain a substring based on 2 string positions. See below for my code. CREATE OR REPLACE VIEW vw_actions AS SELECT ...
2
votes
0answers
15 views

Add individual fields to delete-log-trigger when deleting PostGis-Objects via QGis

I am using a PostGres Database with PostGis extension (on Windows). QGis serves as a client to access (visualize and edit) certain database-tables. I need to create a delete-log-table that saves all ...
3
votes
0answers
34 views

How to develop QGIS Plugin to fully run Spatial Queries With PostGIS?

I'm developing a QGIS plugin that fully run spatial queries with PostGIS. Actually I developed all spatial queries wish need some adjustment. I'm looking for some ressources or documents to know how ...
0
votes
0answers
15 views

Issue when creating points with php and entering them in postgis

I pass some data to a postgis table defined as: CREATE TABLE categoriesdata (id serial NOT NULL, name character varying(200), geom geometry(Point,4326), CONSTRAINT obj_geom_pkey PRIMARY KEY ...
0
votes
1answer
23 views

Enabling: Raster and Topology

I'm new to GIS and tile servers. I've installed TinyOWS pretty successfully except for what looks like to be some dependency issues. I have installed PostGIS and also PostgreSQL. PostGIS is supposed ...
1
vote
0answers
10 views

Recentering a tiled raster table in PostGIS?

Does anyone know a nice and easy way to recenter a tiled raster table in PostGIS? By recentering I mean that I have a raster that is centered on the Pacific, but I need to recenter it on ...
2
votes
1answer
19 views

How to obtain WGS84 or Projected Bounds for given EPSG in postgis?

On the http://spatialreference.org, for almost all SRS are definied WGS84 Bounds and Projected Bounds. How to obtain this bounds from postgis? Spatial_ref_sys does not contains this information.
0
votes
0answers
16 views

Mirrored shape in postgis

I'm troubling with save of shapes in db. The shapes are steel sheet cuts, with may be holes, therefore are collections. I decided to solve to my self the problem, to allow the easy exportation between ...
0
votes
0answers
16 views

Error installing GDAL on Centos 7 [closed]

I'm trying to install Postgis/GDAL on CentOS using yum, but there are broken dependencies. I've looked around and everybody says I should install EPEL, but I've already done that. (see also: Install ...
0
votes
0answers
15 views

Calculating slope from elevation returns hole when using ST_Slope in PostGIS

I have rasters from the National Elevation Dataset loaded into a PostGRES database and am using the built-in function ST_Slope to calculate the slope. However these contain many holes where there is ...
1
vote
0answers
18 views

Optimize PostGIS query, ST_Intersects - Raster and Geom

I am trying to run a spatial query between two tables. Table one (prism_ppt_monthly - see below for details) is monthly precipitation data. Table two (usgs_basin_boundary - see below for details) are ...
2
votes
2answers
61 views

Find all polygons containing points specific criteria

I have searched for a bit, but couldn't find an answer for my question. So I have two tables (PostGIS), one containing points, and the other containing polygons. Right now i have this query for ...
2
votes
0answers
46 views

PostGIS for GPX analysis

I have GPX trails of vehicles/bikes of a particular city. Meaning, lat/lon, timestamp of bike trails from where a particular bike started and ended at different hours of the day. I have sets of these ...
1
vote
0answers
27 views

Make a line from a set of GPS points close to a specific GPS point with PostGIS

I have to develop a map-matching algorithm. At the moment I only match GPS points with the closest road segment. I'm looking for a way to compare the directions between a GPS point and a road to ...
0
votes
1answer
92 views

PostGIS Best Practices with thousands of entries

I'm creating a PostGIS database which will hold thousands of different shapes (imported from Shapefile, GeoJSON, etc), and they'll stay there and be queried over time. Do I need to create a ...
0
votes
0answers
18 views

MultiPatch Shapefile import into PostGIS Database

I have geometry of buildings in Shapefile MultiPatch format. I want to import it into PostGIS database in the same format. Is that even possible? If yes, then how?
2
votes
0answers
30 views

GeoDjango and bug with bounding box query

Just some context first, I have a postgres database with PostGIS extension, running under a GeoDjango wrapper. I have a weird bug that hopefully someone can shed some light on. I'm running a query ...
1
vote
1answer
27 views

How to check if a node is in route computed with pgRouting?

I'm new to the GIS system and I'm following the pgRouting workshop. I've imported the locations of nodes (points, highway=street_lamp) using osm2pgsql. now I'm calculating a few paths between two ...
1
vote
1answer
40 views

Why can't I import my shp file into a postgis database with SRID 102631 using shp2pgsql?

Hi I have been trying to figure out the reason shp2pgsql isn't working when I try to import a shapefile with SRID=102631. I've had no problems with other SRIDs. For all shapefiles in 102631, I get ...
1
vote
1answer
46 views

Where to store lat/lon data with additional informations?

I have huge database of lat/lon GPS coordinate points. For every point, I have several other variables (height, surface type, temperature, pressure...). Also, data will be changed every day and old ...
2
votes
1answer
22 views

PostGIS - interfacing with CADCORP 7.1 and QGIS - user 'postgres' can import, but no other roles can

I'm new to PostGIS (reasonably) - but I'm plagued with one on-going problem: I'm able to access PostGIS from various GIS systems using the main 'postgres' user. Using a newly created user ...
0
votes
1answer
16 views

Importing map information with osm2pgrouting

I'm importing the cartography of Spain with osm2pgrouting. I want to import address information, that is, the tag addr = *. I modified the file mapconfig.xml follows: <type name="junction" ...
0
votes
0answers
7 views

OpenGeo Suite 4.0.1 Activating SSL for remote connection

I have installed OpenGeo Suite 4.0.1 on my Windows 7 OS and created a spatially database. Now i want to connect to my database remotely but then it seems like i have to generate a self-signed key. i ...
0
votes
0answers
7 views

How to specify the new layer type in writeOGR{rgdal}?

There is a task that we copy some polygons into postgis using rgdal package. I noticed postgis is strict with geometry type so that the new multi-feature layer type must be specified. I tested the ...
2
votes
0answers
35 views

Field Collection App for Geoserver or Any OS GIS Server

I am looking for a mobile app/interface for field data collection and mobile editing of GIS data that relies/syncs back to some type of GIS server or database. I am aware of Fulcrum and AmigoCloud, ...
0
votes
1answer
16 views

PostGIS Topology Requires Admin

I am running PostGIS on an Ubuntu server. I am able to add the Topology extension via CREATE EXTENSION, but when I try to use it as anything other than an admin I am denied permission. I ran GRANT ...
2
votes
0answers
32 views

QGIS: Edits in attribute table are not updated in Postgis database. Why?

As the title say. I edit values in the attribute tables of my QGIS project but there is no update to the database. I refreshed in QGIS as well as the database. What else do I need to do?
0
votes
1answer
31 views

Displaying raster tiles from OSM data stored in a postgis server

I have been recently tasked with setting up a raster tile server that serves tiles from data pulled from a postgis store. I have managed to get a vector tile server up and running but I'm stuck on ...
0
votes
0answers
36 views

H2GIS and POSTGIS

i use PostGIS and H2GIS and i have tested ST_Transform function on both systems: SELECT ST_AsText( ST_Transform( ST_GeomFromText('POINT('||to_char(5873455.6,'9999999.99')||' ...
1
vote
1answer
29 views

Rectangle Appears Distorted on Map

When displaying two features, a polygon a (see geoJSON) and its minimum bounding rectangle b (see geoJSON), I get the following result when viewing on geojson.io: The minimum bounding rectangle ...
1
vote
1answer
58 views

Split a table of Multi/Linestrings into Unique Linestrings

Is there an efficient way to split a table of Multi/Linestrings that overlap() and touch() into unique Linestrings (note: creating edges using topology is going very...very...very slow). Here is ...
0
votes
0answers
21 views

Converting NAD 83 to WGS 84 in PostGIS

My question is about the best way to convert from NAD 83 to WGS 84 in PostGIS. I have a PostGIS DB containing National Elevation Data rasters. The rasters are in NAD 83 and I would like to convert ...
0
votes
1answer
29 views

PostGIS: Perform a Spatial Join only joining the intersecting polygon with the maximum value

I'd like to perform a spatial join using PostGIS. I've got table_A containing 80.000 entries and table_B containing roughly 1.500.000 entries. The entries in table_B have a column "number". My goal ...
0
votes
0answers
12 views

How to render visualizations for geospatial objects (the way QGIS does it) on web interface for end users, from PostGIS database? [duplicate]

I have existing geospatial objects in PostGIS. I can visualize it using QGIS. But I want to render these visualization on a web-interface for my users as a result of some queries in the database. I ...
2
votes
1answer
41 views

Draw line with lon, lat, distance and azimuth

I have table in PostGIS with lon, lat, distance and azimuth columns. I want to make Geoserver draw a line through first point with given length and direction. I can turn lon and lat to geometry in ...