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

learn more… | top users | synonyms

1
vote
1answer
10 views

Postgis How to populate column with geography data from geometric data?

I stored my point date in geometry format with SRID 4326 supposed EWKB (data looks like this "0101000020E610000071F1A611E9392640AECD10D8E68C4A40") = way geometry(Point,4326) I want to have the ...
0
votes
0answers
19 views

Equivalent for PostGIS ST_SnapToGrid in ArcMap 9.3

I'm new with ArcGIS and ArcMap. I need to round coordinates on precision of 2 decimals while maintaining relations between them. So basically I need to make something to be equivalent of ...
0
votes
1answer
32 views

PostGIS polygon clip inaccurate using ST_Clip and ST_Union from tiled raster

I have a RGB raster tiled at 128x128 in PostGIS enabled database. I am trying to clip from the raster using a polygon as follows: SELECT ST_AsGDALRaster(rast,'GTiff') FROM ( ...
1
vote
1answer
19 views

SRID awareness in Postgis functions

I have a column named position with geo data. Query: SELECT ST_SRID(position) FROM checkpoint LIMIT 1; returns 4326 If I try to simplify/compress points with SELECT ...
2
votes
1answer
202 views

pgsql2shp ERROR: incompatible mixed geometry types in table

I have multi-linestring in .shp files and I split the lines with postgis, but that result is only geom column. It does not works with shape file exporter error: incompatible mixed geometry types ...
1
vote
1answer
21 views

How to calculate overlap area of two polygons?

I am a beginner in the world of GIS. I have one table polygons with each polygon having north-east and south-west coordinates. And for every polygon, I need to find area of overlap with other ...
0
votes
2answers
103 views

Sql Query in Postgresql

I am trying to execute a query but I am stuck. I have two tables A and B. The a table has columns gid, geometry(line-string) and value which cells is empty , the B table has got 3 columns gid, ...
3
votes
2answers
46 views

ST_Area of a buffer differs by coordinate

Why are these results different? The only difference is the coordinate. Seem like the area should be the same. select st_area(st_buffer(st_setsrid(st_point(-70, 40), 4326)::geography, 10)) AS ...
3
votes
1answer
185 views

Query to Dissolve Nearby Polygons on Hive

I am using the ESRI spatial framework for Hadoop, that extends Hive to use spatial types and operations. My objective is to translate a set of simple queries on PostGIS into Hadoop, in order to ...
0
votes
0answers
20 views

Incomplete data - lines missing from osm2pgrouting

I am importing OSM data into PostGIS using osm2pgrouting but some data is missing/did not import. I am using the default mapconfig.xml and this appears to work for most roads. For example in below ...
0
votes
0answers
22 views

Snapping points to nearest road - query is extremely slow

I have a two tables containing (1) all parishes in Denmark (centroids) and (2) a road network of Denmark (OSM data). I am trying to find the nearest road for each parish centroid. To do this I'm ...
0
votes
0answers
17 views

Postgis reverse geocoding for other countries

I have tried using postgis_tiger_geocoder extension for reverse geocoding and it just has the U.S related data(56 states or so) but I need to have few more countries like canada and few more. Is there ...
3
votes
2answers
2k views

Loading shapefile to a specific table in postgis using ogr2ogr

I have already created a geometry table in postgis. I want to load several shapefiles into that table using ogr2ogr. But I didn't find the parameter which could specify that table. ogr2ogr -append ...
0
votes
0answers
9 views

Getting netCDF data into PostGIS database using Python?

I can read the netCDF file data with netCDF-python or with gdalinfo, but I am unsure of the easiest way to get it into a PostGIS database. It would be really easy if I could convert the netCDF file ...
2
votes
1answer
586 views

PostGIS: ST_Transform function conversion problem

I'm inserting map data from a GML file with srid EPSG:27700 into a PostGIS database table with srid EPSG:4326. I'm using the ST_Transform function as in this snippet: ...
0
votes
1answer
227 views

ST_Dump not working with geometry_dump

I am trying to ST_Dump a geometry_dump column comprised of points and paths in PostGIS 2.0 using SELECT (ST_Dump(geom)).geom FROM pointdump However, I get the error message 'function ...
0
votes
0answers
9 views

removing point cloud data from PostGIS

I'm ingesting dozens of LAS files into one table in PostGIS using PDAL using the example from pdal.io: <?xml version="1.0" encoding="utf-8"?> <Pipeline version="1.0"> <Writer ...
3
votes
1answer
46 views

Find all points within 5m with same name on large dataset

I have a large dataset (500,000 rows) in cartoddb which contains data like this.(abbreviated for easier typing) cartodb_id | count | lat | long | name | the_geom 1 ...
2
votes
3answers
611 views

ST_MakePoint or ST_PointFromText to generate points

I'm new to postGIS and am having trouble finding an answer to this question. I have loaded UK postcode data (OSGB36, SRID 27700 with eastings and northings fields) into a postGIS database. I now want ...
5
votes
1answer
93 views

Intersection of a vector linestring and underlying DEM

Following is an screen-shot where ASTER DEM raster layer has been overlaid by a road linestring vector layer. I want to extract those DEM pixels which are lying exactly beneath the linestrings. I want ...
2
votes
2answers
378 views

QGIS/PostGIS: Select Counties within Region via Spatial Query

I'm using GQIS 2.2 and PostGIS on Postgresql 9.3. I have 5 regions in the contiguous United States. Each region has states, and each state has counties. I would like to think that the data I'm given ...
1
vote
1answer
271 views

How to refresh features on a OL3 map automatically?

I am using OL3 and GeoServer and PostGIS as database. My database is connected to GeoServer and OL3 conected to GeoServer and reads the points in database as vector layer and shows on the map. My ...
1
vote
1answer
35 views

How to transform from a SRID to another?

How can I transform a geometric column of table from "SRID=4326" to "SRID=32650". I saw "ST_Transfom" and " ST_SETSRID" operator before. To do so, I used follow construction operator, But it dosen't ...
0
votes
1answer
23 views

How to identify the right road using postgres and postgis

I want to identify a road at particular point of intrest using post gis. Example Input String : 16th cross near xyz mall. Problem I am facing As there will be many "16th cross roads" in the map , ...
0
votes
2answers
440 views

PHP PostGIS to geoJSON missing required parametar error

I'm using this PHP PostGIS to geoJSON script: https://gist.github.com/bmcbride/1913855 But I keep getting this error: 'missing required parameter: geotable' This is my code: # Retrive URL ...
1
vote
2answers
480 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
0
votes
1answer
17 views

Selecting points from intersecting an arbitrary (non-database) polygon with PostGIS

Determining a polygon as follows, and the points to check against, in ruby @poly = GEOFACTORY.polygon(@line_string1) @locations = Location.all @valid_locations = ...
0
votes
1answer
466 views

ERROR: Operation on two geometries with different SRIDs

I'm new when it comes to GIS and PostgreSQL. I have searched everywhere for the cause of this problem but I can't find the solution. I was following the documentation here First i created a table: ...
1
vote
1answer
734 views

Error saving polygon with hibernate spatial and postgis

I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin. Caused by: ...
0
votes
1answer
29 views

How to resolve the postgis “type geometry does not exist” issue on installing tiger_geocode extension?

I have installed postgis extension in my db. I have few columns associated with its type in few tables and now I would like to use reverse geocode functionality in my app. Hence I tried to create ...
0
votes
1answer
144 views

I converted a KML file into a PostGIS db using ogr2ogr. How do I publish all the tables as seperate layers?

As the title says I converted/imported a KML file into my PostGIS database using the ogr2ogr command. Now I am trying to publish each table as a seperate layer onto a GeoServer. I know about cURL, but ...
0
votes
1answer
23 views

How to set srid of a single point coordinates pair?

I think is better explain with a small example: selected a geometry point i get it back in a coordinate pair SELECT ST_AsGeoJSON('010100002031BF0D009A999919F9BD2D41CDCCCC4C758E5241') --result: ...
2
votes
1answer
20 views

GeoDjango/PostGIS distance lookup not working

I'm building an api to make distance lookups using Django 1.8, GeoDjango, Django REST Framework and PostGIS. Locally I'm using PostGIS 2.1.7, my host (PythonAnywhere) uses 2.1.4... I'm not able to ...
1
vote
1answer
25 views

How to merge(transfer) one layer into another postgis layer?

I want to merge 2 layer which have identical structure. First layer is from postgres database table say "layer1" and other layer is shapefile say "layer2". I want to merge layer2 "INTO" layer1 (NOT ...
-2
votes
0answers
25 views

How to publish a PostGIS table on Google maps? [on hold]

I am attempting to take a shape file and display it on a map: I can do it!! if you please meaning!!
0
votes
2answers
56 views

Computing View Distance in One Direction from Point on Elevation Raster in PostGIS?

I'm a software developer just getting into GIS, so please forgive me if I don't use proper lingo, or if I use proper lingo incorrectly! I have a raster of elevation data. For a given point in the ...
1
vote
3answers
320 views

Create shapefile from data PostGIS or KML using Java

I'm working on a geographic information system project, whose products form shapefiles. I am using the Java programming language and a PostGIS database. Is there a way to generate a shapefile from ...
1
vote
1answer
51 views

counting overlapping polygons - ST_Union very slow, how to make it more efficient?

I have a set of 1000 polygons that overlap and I want to count the areas of overlap. I am using this blog post's instructions to create multilines from the 1000 polygons then use this line file to ...
0
votes
1answer
18 views

Mapbox Studio Draw Order

I have made a map using Mapbox Studio. The map is made up of 2 map sources, MapBox Streets Custom Style - a PostGIS layer I am having trouble working out how to set the draw order. I have tried ...
3
votes
1answer
168 views

How to create an exact tracking route from GPS data with animated icon?

Probably this is not purely GIS related question, its related to developing issues. I am just asking if there is any kind of suggestions from Gurus. I am building an tracking application where GPS ...
0
votes
1answer
37 views

PostGIS: Closest outside point to point inside polygon

There is the famous ST_ClosestPoint() return the closest point inside polygon to some outside point. I'm looking the inverse problem: I have a location inside polygon, and I want to get the closest ...
4
votes
3answers
2k views

Importing .shp to postgreSQL

I want to import a shp file to postgreSQL. First I create sql file and then run PostgreSQL. To create sql file, I run this command in windows cmd: shp2pgsql -s 4326 worldCountries.shp worldcountries ...
0
votes
0answers
18 views

PostGIS: Lines from location touches but not intersecting polygons

I have OSM .shp file of buildings. I created vertices along each line of the building in that way: vertices (red) & mid points (green). The mid points made by ST_Line_Interpolate_Point() after ...
0
votes
1answer
20 views

How to use intersection in spatial guery in postgresql?

I want to get id, time and point_metric columns from intersection between two geometry(geom_lines and gem_houses). I wrote following sql code, however it fore an error (argument of WHERE must be type ...
1
vote
0answers
24 views

Create HexBins for shapefiles

I usually create hexbins using the MMQGIS tools in QGIS. I would create a hex layer and intersect it with a shapefile. I've tried to create a hex shapefile and importing it into a PostGIS and tried to ...
0
votes
1answer
19 views

Uploading shapefile into postgis

I am trying to import some shapefiles into postgis. Now I have an example database within my download of postgis. In this database I can import the shapefile by changing the DBF file character ...
0
votes
1answer
195 views

Shp2pgsql - exec() not allowed on external server

Me and my collegue are using the shp2pgsql and psql commands in php code (a Drupal module to be precise). We put these commands in a php variable and use the exec() command to execute them. This ...
0
votes
2answers
55 views

PostGIS: Closest polygon to point [duplicate]

I have .shp file of polygons and single (point) location. How can I retrieve the closest polygon to that single location? Thanks,
2
votes
0answers
56 views

QGIS does not display all Features of Layer and behaves weird instead

I have a weird problem with QGIS trying to load a Layer from a Postgis Database When I open the Layer from Postsgis I have two choices: Method one: Either, I use the Panel "Browser", where I can ...
6
votes
2answers
171 views

What controls the direction of TopoGeometry Linestrings?

In PostGIS, what if anything controls the direction that topogeometry LINESTRINGs will have when converted to geometry? It doesn't appear to be the order in which the edges are listed in the call to ...