Tagged Questions

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

learn more… | top users | synonyms

3
votes
2answers
1k views

Split Line at intersection and attach attributes

I want to slit line at intersection and attach attributes and export I have roads table with columns id,road_name,road_type,geom with 2115 records. I try using this query - select ...
1
vote
1answer
1k views

Mapnik Initialization does not work

I create geodatabase "training" sudo su su postgres createdb -E UTF8 template_postgis2 createlang -d template_postgis2 plpgsql psql -d postgres -c "UPDATE pg_database SET datistemplate='true' WHERE ...
2
votes
2answers
163 views

How to create a network from nodes and boundaries?

I have a table of nodes (points) and i wish to route between the points. Its my understanding that i first need to build a pgrouting compatible topology (graph ?) that connects all the nodes using ...
2
votes
3answers
2k views

How to create a new 'gis' database in PostGIS?

I'd like to create a new database in PostGIS, so I can load stuff into it while the current database is being used. According to the docs Some packaged distributions of PostGIS (in particular the ...
5
votes
4answers
594 views

How to merge close points into polygon?

I have a set of coordinates (points & no overlaps) in a single table,each containing attribute number fields,like in the following image. I want to merge these points into smallest polygons by ...
4
votes
0answers
128 views

Find and destroy duplicate OSM multipolygon/polygons in TileMill/PostGIS

In OpenStreetMap there are sometimes multipolygons where attributes are present on both the polygon and the multipolygon relation, such as the Grampians National Park: ...
0
votes
1answer
104 views

PostGIS import csv encoding problem

I want to import csv into PostGIS database, I receive error massage: alpha=# COPY project FROM '/home/alpha/database/project.csv' DELIMITERS ',' CSV; ERROR: invalid byte sequence for encoding ...
1
vote
1answer
412 views

Installation question: initdb is missing after install of postgis2 via RPMS on RHEL 6.4

I'm attempting to install postgis2 on RHEL 6.4 by using the instructions postgis.net/install, but after the postgis2 install, neither initdb nor /etc/init.d/postgreql92 is present. The same thing ...
2
votes
0answers
55 views

Can't connect to WMS service? An Amazon-EC2 problem?

I'm running GeoServer 2.3.5 on a Windows instance in AWS for the first time. The data is on the server in PostGIS. The map layers have been published and I can see them locally without any problems. ...
1
vote
0answers
30 views

PostGIS. Obtain the rotation between two equal Geometries

I've got two features with the same drawing (poliline) but one is rotated relative to the other. I would like no know in PostGIS the rotation between the two geometries to apply this rotation to a ...
1
vote
2answers
1k views

Attempting to use ST_DWithin to locate objects within a given distance of meters using SRID 4326

I'm a Rails developer with minimal GIS experience, working with PostGIS and the RGeo gem. I'd like to find all of the cows within 500 meters of my current location. So, I'll create a model for my ...
2
votes
1answer
3k views

Transforming from SRID 900913 to 4326 with PostGis

I have two Postgres tables with different SRIDs, 4326, and 900913. I want to convert the latter to 4236. I first changed the SRID using: Select UpdateGeometrySRID('table', 'geomcolumn', 4326). I ...
2
votes
1answer
89 views

How do you get a schema report from SHP, PostGIS, or other file type?

All, We're loading City and County data into our database, but looking to remove several fields we don't use. Those fields we do use I'd like our users to simply highlight on a printout I give them ...
2
votes
2answers
334 views

Finding points along a path

I am unsure of the best approach to this problem. I can think of some ways of doing it which I will list below but I am looking for the best and most efficient way of doing this. Problem Given a ...
3
votes
2answers
2k views

Where download sld styles for OpenStreetMap for GeoServer?

I display OpenStreetMap with some sld styles. This map is not the same OSM. I want that this map is equal OSM map. I use geoserver 2.3.5 Does anyone display OSM through MapServer, ArcGisServer ...
2
votes
1answer
101 views

Draw a line and a buffer around it onto the spheroid

I need to draw a line between two points and create a buffer around this line. The only difficulty is that I need to draw not a "cartesian" line but a line that is laying on the spheroid. I tried to ...
0
votes
1answer
119 views

Is it possible to install the PostGIS to the PostgreSQL (binary version)?

I'm using the PostgreSQL 9.2.4 which is the no installation version.I run this by using the command "Program Files/PostgreSQL/9.0/bin/pg_ctl" -D "Program Files/PostgreSQL/9.0/data" -l "Program ...
0
votes
1answer
97 views

Postgis objects inside Leaflet circle

How can I retrieve database objects from postgis database which are contained inside Leaflet circle object? I assume circle is only a point with some radius and not a polygon. I wonder can it be ...
1
vote
0answers
71 views

Is there tutorial available for PostGIS setup in ArcSDE 10.1 geodatabase on Linux?

Is there any tutorial for Set up PostGIS in an ArcSDE 10.1 geodatabase on Linux? There is one in tutorial arcgis 9 for ArcGIS version 9, but I couldn't find any for ArcGIS 10.1.
3
votes
1answer
185 views

Flatten GIS data to a schematic

I want to take a network of roads and lanes and reduce them to a schematic that shows their relationships but not their geographic shape. A similar concept has been used for the London Underground ...
1
vote
1answer
84 views

How to import a postgis database in ubuntu (osgeo live 7)

How does one import a postgis database in the ubuntu/osgeo live environment? In windows I would copy the backed up database file into the postgres bin folder and then use cmd to restore the databse. ...
1
vote
1answer
52 views

Auto column update in postgis

I have a fruit orchard dataset. One of the columns contain the year the orchard was planted. In another column I would like to have the orchard age. However this pose a problem, since the age changes ...
1
vote
1answer
544 views

How to improve poor performance times for PostGIS 2.1 Tiger Geocoder?

I've recently upgraded my PostGIS DB from 2.0 to 2.1. I initially followed the instructions from Waiting for PostGIS 2.1 - Install PostGIS Tiger Geocoder as an Extension and 2.7. Installing, ...
0
votes
2answers
539 views

Override “ERROR: Operation on mixed SRID geometries” and force PostGIS to do the query

I'm trying to do an st_intersects query in postgis for two shapes (a point and buffer zone) which are of the same projected coordinate system. Unfortunately, one of the tables seems to have its ...
1
vote
0answers
96 views

PostGis search query on hstore tags

I am writing a search client, to query postgis db. The search query will be, SELECT tags->'name' AS name,ST_Transform(way,4326) AS pt_lonlattext FROM planet_osm_point WHERE lower(tags->'name') ...
1
vote
0answers
139 views

Problem import shapefile in PostGIS database

I am having a Polygon shape-file. When I try to import this shape-file in PostGIS some of the attributes in Geom Field is found empty. But in attribute table when I select that polygon It is visible ...
8
votes
1answer
271 views

Python with GDAL and PostGIS as a replacement of ArcGIS

Few times ago, I worked with daily land surface temperature satellite images of an area with the size of Alaska. I had to process around one thousand images. I downloaded them, mosaiced, projected, ...
2
votes
1answer
108 views

Tiger geocoder / postgis - get county from point

Looking for some help with getting the county for a lat / lon. I have postgis / tiger geocoder installed and can reverse look up a point and get the addresses. I would like to get the county the ...
0
votes
2answers
171 views

postgis linestring segmentation

How can I divide a single postgis linestring with SRID 4326 into segments (preferably an array of linestrings) with no segment longer than a given distance? I've tried st_segmentize(), but it spits ...
1
vote
1answer
127 views

Is postgres 9.1.9 supported by ArcGis 10.1 Service Pack 1?

I want to install Postgres and Postgis. Now we use ArcGis 10.1 So I install Postgres 9.0.5 But there is not exist Postgis for this version. I try install postgis 2.0.3 But I fail(it is only 32 bit ...
0
votes
0answers
101 views

Transforming WFS Projection

I am trying to overlay features from a WFS using OpenLayers, my geometries in database are in EPSG:27700 and my map's projection is EPSG:3857. My mapfile returns data in EPSG:27700. Is there any way ...
3
votes
1answer
138 views

Select linestrings containing points with duplicating M coordinates in postgis

I have a table of LineStringM geometries. Some of lines have points with same measure (M coordinate). This is a bug in initial data, that I want to clean somehow. So I need to: 1. Select all records, ...
2
votes
1answer
105 views

advice on browsing multiple points with leaflet - query only the points in the viewport

This a very basic question, but I don´t quite know where to start I have a postgis table with aproximately 15.000 points hosted on CartoDB And I'm developing an application that should let the user ...
5
votes
2answers
327 views

10 GB Raster Aerial Image in Quantum and POSTGIS

I have a problem... I have been successful in uploading the raster in postgis but when I access it through Qgis. it does not open even after several hours. I have 10GB aerial image raster and ...
1
vote
1answer
256 views

PostGIS is rejecting an srid code for my projection. I've found a nearly identical projection w/ a legit srid. Will it work?

My projection is this: NAD 1983 StatePlane North Carolina FIPS 3200 Feet, which has a proj4 string that looks like this: +proj=lcc +lat_1=34.33333333333334 +lat_2=36.16666666666666 +lat_0=33.75 ...
0
votes
1answer
481 views

Best way to store polygon geospatial data in postgreSQL?

I have to store longitude and latitude coordinates for several places in a PostgreSQL db table. Each row in this table has a field with a set of pairs {latitude1, longitude1, ....latitudeN, ...
1
vote
1answer
458 views

SharpMap WMS - How to add labels to a map containing a VectorLayer

First, I'm new to SharpMap. I'm adding in labels for a vector layer, but for some reason the labels are not showing up. My PostGIS data is in Geographic NAD 83 and the UI is OpenLayers so am ...
2
votes
2answers
532 views

finding the correct transformation (from EPSG:31300 to EPSG:4326) or how to store two srid in one table

I have a very specific problem. I have data crossing two coordinate-systems, more specifically: the Netherlands and Belgium. Previously the data was stored in one table in Oracle, using the RD ...
1
vote
1answer
328 views

Is there any instructions to download OSM in postgres database?

Is there any instructions to download OSM in postgres database? I use geosuite (geoserver, postgres, postgis). I'd like to download USA and Russia (1-12 levels). I also want to download sld styles. ...
3
votes
0answers
272 views

Finding poi using st_dwithin in postgis

I am not familiar with gis or writing sql, so my understanding in this field is lacking. I have a hundreds of lat/lng geographic coordinates stored in a single table called Places like this: ID | ...
0
votes
1answer
172 views

Calculating distance from a central point in three dimensions and visualising the result

We will shortly be collecting data from our remote systems that track ADS-B signals from Aircraft. This data will provide the lat/lon in epsg:4326 (wgs84) and a height in meters. The station location ...
2
votes
2answers
439 views

Iterating polygons on a SpatialPolygonsDataFrame in R with readWKT

I have fetched some data (39 objects) from my PostGIS database and converted this data into a matrix: rs <- dbSendQuery(con, "SELECT ST_AsText(polygon_accumulation) AS ShapeWKT from ...
0
votes
0answers
223 views

Why does QGIS not show my new geometry columns?

I am trying to connect a few PostGIS Tables to Quantum GIS. The problem is that the geometry columns QGIS is showing are not the ones from the PostGIS database. QGIS shows me some columns I used to ...
0
votes
1answer
113 views

cartodb: query for the points within a radio from another point - postgis

I've georreferenced a couple of points in a CartoDb table, so now I have a the_geom column of type point I'd like to get all the points that are x meters away from a certain x,y point. So far now, ...
0
votes
1answer
587 views

How to fix “Connection failed - Check settings and try again” when connecting to PostGIS?

I have Postgres running via Postgres.app on rails already and am trying to connect QGis to the database. PostGIS is working already. (questions already found online deal with this issue only) I do ...
0
votes
1answer
97 views

How to start WebGIS for broke people? [duplicate]

I want to make a web GIS system. I will be graduating in 3 months and have time on my hands before going for interviews. if i can build something then i can show it off in the interviews and hopefully ...
0
votes
1answer
346 views

How to upgrade PostGIS 2.0 to 2.1 on Windows 7?

PostGIS 2.1 was recently released and I would really like to upgrade from 2.0, but can't quite figure it out. I had previously installed PostgreSQL 9.2 and PostGIS 2.0 using StackBuilder. Running ...
1
vote
1answer
127 views

Three table postgres sql join query

I'm having trouble getting my SQL query to work with three tables. I'm new to SQL to I've already spent considerable time trying to understand the documentation and making some sense of it. I'm using ...
3
votes
1answer
270 views

Best way to visualize the PostGIS Raster in OpenLayers

I have been stuck by this problem for a long time. Several ways have already been tried, but none of them works as I was expecting. Here are the description of each of these method as well as the ...
3
votes
1answer
355 views

Merging partially overlapping polygons into a table in PostGIS

I have a couple of tables (three) with polygons (landuse coverage in this case). Within each table, there is no overlap, but between tables there might be a lot of overlap. I would like to combine ...