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

learn more… | top users | synonyms

0
votes
0answers
42 views

PostGIS ST_Intersects not returning values

I recently installed the PostGIS extension for a rails app that i'm working on. Currently, i am trying to get all the polygons that intersect the vieport of the Google Maps. On running the (see ...
0
votes
0answers
64 views

Problem with ST_IsValid: Unknown geometry type: 9 - CompoundCurve

The following is an example of a gml:Curve that was loaded into Postgres using FME. <gml:Curve srsName="urn:ogc:def:crs:EPSG::27700" gml:id="os.vmd.ny.38124.geom"> <gml:segments> ...
1
vote
0answers
25 views

how to create Topology table?

i have gis database called Madar in pgadmin with postgis and pgrouting extension, all the data inside gis database already inserted by shp2postgre tool , what i really need now is how to make topology ...
0
votes
1answer
28 views

PostGIS ST_Buffer a polyline?

I am trying to run a buffer around a polyline (geography). My first attempt below (based on ST_Buffer documentation: SELECT ST_Buffer(ST_Geomfromtext(i30.geog),10,'endcap=round join=round'); gives ...
0
votes
1answer
57 views

Starting Tile Sever Rendering Error: OSMBright.xml

I was following the entire process found here: https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/ I have an error though on Testing your tileserver part where i run the ...
1
vote
0answers
25 views

PostgreSQL default values in QGIS 2.8.2

I think the issue outlined in this question PostgreSQL default values in QGIS 2.8.1 and ticket #12391 is not fully solved yet. Negative numeric default values, and dates are not used by QGIS 2.8.2 ...
8
votes
1answer
101 views

Building a polygon over a reachable area

I am currently working in the field of isochrones and the underlying algorithms. What now causes problems is not the calculation if the isochrone itself, but the visualization of the results. The ...
2
votes
2answers
63 views

How can i update postgis data from shp?

Now,I know how to insert a shapefile to PostGIS by using shp2pgsql.exe. If I have an updated shapefile and I only want to update the updated rows, how can I know the table being updated?
0
votes
2answers
55 views

Index a Table with Geometry Column

I have a table called Stores with 10k rows which has a column location geometry(Point,4326). CREATE INDEX "Stores_spatial_gix" ON "Stores" USING gist (location); Upon KNN query explain analyze ...
3
votes
1answer
143 views

Map-server Very Weak Performance Vs Geo Server - Why?

I search for a good wms server that support Postgis at the end I found Mapserver as the fastest and best choice. Every performance test say it's faster than Geoserver because of its native compiled ...
0
votes
0answers
37 views

How to reconstruct a network with multipart edges to a network with singlepart edges

I have a network shapefile that between its vertices , there are edges that have multiple geometric objects. When I try to node it in postgis, it creates multiple segments in the database that ...
0
votes
0answers
25 views

Use of constraints and Spatial indexes in Postgis

We'are using Postgis to manage our geo data. They are coming from several sources, like Open street map, VPF, Shape and so on. We have defined constraints on the tables, and spatial indexes on ...
1
vote
0answers
14 views

Enable 3D viewer in geo explorer-geo server

I am trying to enable 3D viewer(google earth) in Geo explorer-geo-server by installing google earth plugin but doesn't work . any ideas ?
0
votes
1answer
40 views

Postgis geometry column with different srid

I have a table that has geometry column named the_geom. I set SRID value to 29903. And I used Openlayers api to view data on map. I set map srid as 29903 and works well. But if I need to show my data ...
1
vote
2answers
68 views

Is there any tool to execute Postgis-like queries without a postgres server?

I would like to know if there is any way/tool of using geoprocesing queries like the ones you use with POSTGIS but without the need of having an actual database server available. The particular ...
2
votes
1answer
32 views

Osm2pgsql: Error Loading in north-america-latest.osm.pbf

I've had my OSM Tile server working great for several days now, but just with Indiana. I decided to fill the gis database with all of North America. I run the following command: sudo -u user ...
10
votes
2answers
196 views

How to create dynamic leader lines?

I'm trying to create dynamic leader lines by using a PostGIS view in addition to the QGIS „Move Label“ tool. CREATE VIEW leader_line AS SELECT gid, ST_MakeLine(geom, ...
2
votes
1answer
47 views

Get nearest node following segment

I am trying to get the nearest node from a point(Id 1) . The coordinates (lat/long) are input by an user . I am using some functions like pgr_nearest_node() or get_nearest_node() from get_nearest_node ...
3
votes
1answer
65 views

Live data on a web based GIS

I'm looking to implement a 3D/2D tactical display in a browser. This should be capable of plotting maybe 100 tracks and their histories with 0.5 second updates. I've researched the available ...
1
vote
0answers
47 views

PostGIS: intersection of a polygon with 2 rasters

I'm trying to get the intersection of a Polygon with 2 raster layers in PostGIS. The rasters have the same size and pixel size and I'd like to retrieve for the polygon a list of something like that: ...
0
votes
0answers
28 views

Snapping feature nodes doesn't work after feature creation (filter involved)

I've experienced a strange behaviour during editing mode: I have set a filter to 2 features (polygons), part of on of my PostGIS layers: "name"='A' OR "name"='B' After that I have created a new ...
0
votes
0answers
19 views

Postgis - create function for verify position of a point

I have 2 tables that are more or less like this CREATE TABLE localizzazione.etichette_sentieri ( gid serial PRIMARY KEY, cod_grid character varying(10) NOT NULL, geom geometry(Point,32632), ...
2
votes
2answers
67 views

PostGIS - How to calculate linestring length from WGS84 after transforming from OSGB 36

I am having problems getting lengths from multilinestrings after transforming data from EPSG:27700 - OSGB 1936 / British National Grid to EPSG:4326/ WGS 84. I'm doing this conversion to import a ...
0
votes
1answer
33 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
2answers
41 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
44 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
2answers
39 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
50 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.
1
vote
0answers
41 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
61 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
52 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
44 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
38 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
94 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
66 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
32 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
21 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 ...
2
votes
0answers
16 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
50 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
18 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
34 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
11 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
26 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
17 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
18 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
29 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
70 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
54 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
33 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
106 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 ...