All Questions
Tagged with openstreetmap postgis
388 questions
0
votes
1
answer
266
views
Finding routes from set of points using PostGIS? [closed]
I have lines table (postgis enabled database) representing the streets.
I have collected few gps points along a route and I would like to match it with the streets in order.
Scenario - I am jogging ...
2
votes
2
answers
1k
views
Using OpenStreetMap for routing in GeoServer?
I am new in OSM but now I need create application which will use GIS (Geoserver) and will be provide service to get road from point A to point B.
I found some informations about this but I still have ...
1
vote
0
answers
269
views
Importing osm planet file to PostGIS after osm2pgsql couldn't commit due to connection timed out
I wanted to know if there was a way to import a node.cache file, containing a planet file, after osm2pgsql has crashed because of connection timed out error?
I don't want to launch again the tool and ...
1
vote
0
answers
363
views
Osmosis Extremely Slow After Postgres 9.6 Upgrade
I am seeing extremely slow processing times for syncing my local osm database with the master repo after a Postgres upgrade to 9.6 from 9.5 (Postgis 2.3 from 2.2). The syncing used to happen every day ...
1
vote
1
answer
1k
views
pgrouting with oneway
I have a road network data where roads(edges) are specified with 3 values to identify the category of road(one way).
Road with value 0 can be routed in both direction.
Road with value 1 can be ...
0
votes
1
answer
175
views
Add columns with information OSM by osm2po?
I imported the europa.osm network within my spatial database using the osm2po tool. I use this with pgrouting.
How can I know the information provided by the tag address (city, country, etc) and not ...
2
votes
1
answer
510
views
Importing OpenStreetMap polygons to QGis with relation attributes
I'am trying to import large OSM data to QGis, namely all buildings polygons in Czech Republic.
Finally, I imported polygons using PostGIS layer, because everything else had strong issues. See my ...
2
votes
1
answer
983
views
OSM update without losing own additional data
I have added data (e.g. name keys) to my OSM PostgreSql database. How can I update my database without deleting or overwriting this data? In other words, how can I merge newer OSM data to my existing ...
1
vote
1
answer
489
views
Development guide for beginner? [duplicate]
I'm new to GIS and mapping, and I need to learn how to create web map application for my project. I'm really confused on what to use. I have read PostGIS, OpenStreetMap, and OpenLayers. I'm wondering ...
0
votes
0
answers
446
views
How to import OSM data into postgis and add Elevation Information from raster
In my usecase I want to use OSM data for my routing server, but first, I'd like to add elevation data. And I'd prefer to do that in postgis as I'd need to do further analysis of the data using postgis....
3
votes
0
answers
86
views
Navigating Outdoor Area with obstacles [closed]
I am trying to navigate in an outdoor area from one point to the other, e.g. in an area with hills or mountains, and I would like to declare a hill as an obstacle if the change in elevation is too ...
1
vote
1
answer
257
views
Optimize fetching road information from OSM
I am using the following query to fetch road data from planet_osm_line
SELECT maxspeed, highway, ref, name,
ST_Distance(
ST_SetSRID(ST_Point(-98.224861,38.811898),4326),
ST_Transform(...
5
votes
1
answer
1k
views
Using satellite background images to draw features in PostGIS database?
What tool do I need to have satellite background images to draw features of a PostGIS database?
I looked about Geomajas but seems very complex for what I'm trying to do.
I have osm data imported in ...
2
votes
1
answer
701
views
How to display proper route for OSM data using pgRouting
I am facing a problem while displaying routes using OSM data and pgRouting. I have followed the following procedure:
downloaded OSM data
made it routable using osm2pgrouting
taking point coordinates ...
5
votes
2
answers
710
views
Stitching lines / endpoints with postgres within a certain radius
I have lines from an OpenStreetMap database, which I selected like this:
SELECT sq2.osm_id, sq2.type, sq2.simple_geom, sq2.z_order FROM (
SELECT sq1.osm_id, sq1.type, sq1.z_order, ST_UnaryUnion(...
4
votes
1
answer
730
views
Projection of osm2pgsql nodes table?
When importing data from OSM using osm2pgsql in slim mode, the resulting nodes table has two columns, named 'lat' and 'lon', which contain coordinates for each node. The values are large (~9 digit) ...
1
vote
2
answers
3k
views
How to get a set of all buildings of an OpenStreetMap section in form of single points / Multiple polygons as one point
The objective is to get a set of all buildings of an OpenStreetMap section in form of single points in a shapefile.
I downloaded the section from OSM.
Imported the section into QGIS (and later ...
2
votes
0
answers
317
views
Import only planet_osm_polygon osm2pgsql
My purpose its to only use queries with the ST_Contains function, so for me to have only the planet_osm_polygon its enough i think. How can i tune the osm2pgsl cli command or the style file to import ...
5
votes
1
answer
90
views
Work flow for using AND adding OSM-Data
I produce printed maps out from OSM-Data. While I work with the data, I find some missing places, names or something to fix and I would like to change/add it to OSM directly. But for several reasons I ...
2
votes
1
answer
733
views
Routing Application in Windows
I am making an routing web application similar to Google Maps Get Direction feature. But because of the limited control and data on Google Maps, I decided to use OpenStreetMap instead. This also made ...
1
vote
1
answer
1k
views
Renderd "planet_osm_polygon" not exists?
I'm trying to create my map server. Importing a planet with osm2psql was perfect, I installed nominatim and is working too. I installed the libapache2-mod-tile packet, caring about to not create the ...
4
votes
1
answer
695
views
Define table name with osm2pgsql
When I load OpenStreetMap data to PostGIS using osm2pgsql the resulting tables look like this:
+----------+--------------------+--------+---------+
| Schema | Name | Type | Owner |...
5
votes
1
answer
395
views
Detect and measure loop at end of linestring
In PostGIS, is there a good way of finding out whether a linestring loops back on itself and, in that case, how long the loop is?
I am rendering 1:50000 topographic maps from OpenStreetMap data, ...
1
vote
2
answers
653
views
Cutting OSM roads in sections using PostGIS
I define a section by a part of a road that has no intersection. See image below:
I'd like to extract all sections from all the roads of my PostGIS database. This GIS database was created with ...
2
votes
2
answers
1k
views
PostGIS SQL syntax for bounding box
I have the following query:
SELECT row_to_json(fc)
FROM (
SELECT ST_AsGeoJSON(lg.geometry)::json As geometry,
(
select row_to_json(t)
from (
...
6
votes
3
answers
960
views
Calculate Color of Object So No Adjacent Objects Repeat
I am attempting to assign one of 16 colors to map objects (e.g. counties, states, ZIP Codes, etc.) so that no two adjacent objects share the same color.
I'm seeing tons of articles online about "...
0
votes
0
answers
137
views
Updating OpenStreetMap in PostgreSQL?
I can't use imposm tool, because it is not compatible with Nominatim.
So it seems that I can use only osm2pgsql. But is there any ready to use toolchain, that allows to update OSM in an easy way.
I ...
3
votes
1
answer
111
views
Assigning bars to closest building using PostGIS?
I'm using PostGIS and OpenStreetMap, I tried to assign some bars to the nearest building from themselves I based myself on an example, see: link You can see below picture that resulted from below ...
1
vote
1
answer
602
views
Slow execution of request for searching nearest street to GPS point
I use OSM data. I need to find nearest street for GPS point. I wrote next SQL query:
SELECT
osm_id,
name,
ST_DISTANCE(geometry, ST_SetSRID(ST_POINT(37.72308, 55.47957), 4326), true)...
0
votes
1
answer
265
views
Unable to completely download OSM file to PostGIS?
I used this command to import the osm file to PostGIS:
osm2pgsql /Desktop/osm/mtl.osm -d demo_data -U blanco -P 5432 -S "/usr/local/share/osm2pgsql/default.style" --hstore
I am using osm2pgsql SVN ...
3
votes
0
answers
300
views
Weird (longer) route from using cost_s as cost in pgRouting?
I am currently developing application that want to use the fastest time to arrive as parameter for the routing. And i know that pgRouting has 'cost_s' column which calculated from length_m and ...
2
votes
1
answer
973
views
How to load OpenStreatMap dump to PostgreSQL?
I found tool named imposm, I want to make local copy of OSM data and load them to PostgreSQL.
I can't understand how to do it. I run it with follow command:
imposm3 run -config /apps/imposm/config....
0
votes
1
answer
515
views
I would like to extract 'landuse' information from OSM data using postgis
I am trying to extract OSM land use information for a given bounding box in PostGIS. Using this example I wrote my code:
SELECT *
FROM planet_osm_polygon
WHERE
planet_osm_polygon.landuse &&...
2
votes
0
answers
88
views
Routing for specific subjects (cars, pedestrians, ..) dynamically
I need create app which will be provide routing for specific category. For example only for cars, only for bikes or only for pedestrians. For importing OSM data I'll used default mapconfig for all way ...
2
votes
0
answers
1k
views
OSM data as Postgresql dump
Does anywhere host the OSM planet DB as a Postgresql dump? I have tried using osm2pgsql but I have limited processing capabilities so it is never finishing. I do not have bandwidth limitations so ...
0
votes
1
answer
804
views
Moving file flat-nodes.bin from an osm2pgsql import
I'm running PostgreSQL 9.4 and osm2pgsql 0.82.0 on Ubunt 14.04 (64bit).
I'm new-ish to postgres and less new to OSM. My goal was to import the planet file.
Unfortunately, when I started the import, ...
0
votes
1
answer
3k
views
Extract addresses from osm file
I am new in GIS, but I need extract addresses (city, street, housenumber, lat, lon) from my osm file. Can you give me advice what is the best way to do that? I found project openaddresses, but a lot ...
1
vote
0
answers
95
views
postgres / postgis detecting new roads algorithm [closed]
I have a postgres (psql 9.1.22) database containing all the lines that ever existed in a region in OSM. I would like to detect newly mapped roads by year. This has to be done by a spatial query (...
1
vote
0
answers
73
views
Keep multiple OSM Imports up to date
I have multiple instances of my application for my users. Each user can specify an area which I want to load in my own PostgreSQL server, that make it's possible to render maps with my own mapnik ...
2
votes
1
answer
855
views
Split all OSM roads within boundingbox in 20m segments and save to new table
I have a PostGIS database with all streets from OSM within a given bounding box. Now I want to split all roads from my table planet_osm_roads into segments of max 20 meters length and save those ...
2
votes
0
answers
90
views
Positioning a map
Somebody recommended me to use this site:- http://cs2cs.mygeodata.eu/ after I explained that this coordinates[-28.23078, 28.30707] which belongs to Bethlehem in South Africa centers the map to towards ...
1
vote
0
answers
293
views
After osm to pgsql conversion with ogr2ogr, can't add/view tables in qgis?
I'm converting an osm .pbf file to a postgres/PostGIS database with ogr2ogr. I can view the tables in psql, but when I connect to the database in qgis, I can't see any of the tables after connecting ...
3
votes
2
answers
215
views
Multiple queries in a row
I have osm data imported into PostgreSQL with osm2po tool (which makes the data routable). Also I have imported data relationed with nodes and node_tags with osmosis tool.
I need to obtain a set of ...
9
votes
1
answer
220
views
How to get the contributors on OpenStreetMap
I have put my osm file in base thanks to osm2pgsql and I am looking for a way to get the contributor list. I have searched in my database and haven't found so much... and the osm wiki about the ...
3
votes
2
answers
377
views
Splitting OSM roads and adding additional data
I am using OSM road data as a basis for my project. For some of the roads I have additional info. Pink roads are OSM roads and green is the road data I got elsewhere.
What I need to do is to find ...
2
votes
1
answer
371
views
How can I get the length of segments from the output of pgr_dijkstra?
I created a topology from OSM data with osm2pgrouting.
I use a very simple Query
SELECT * FROM pgr_dijkstra('
SELECT gid AS id,
source,
target,
cost_s AS cost,
...
3
votes
3
answers
2k
views
osm2pgsql --hstore
I'm working with PostgreSQL 8.$ and PostGIS and I need to import an OSM file to the database. I tried it with the utility osm2pgsql, but I have problem with the hstore extension.
Does anyone know ...
2
votes
0
answers
94
views
Some PostGIS functions explanations [closed]
I'm trying to optimize a route SQL function and playing with some ST_* functions I found around.
But even found a good one, I don't want to simply copy/paste what someone wrote. I want to understand ...
3
votes
1
answer
1k
views
Detect city from coordinates
I need to know how to detect which city has certain coordinates.
Which is the best way to do this?
1
vote
1
answer
2k
views
Shortest path postgis query with in a bounding box
I have been following this article to find shortest path in vector data. I can already find shortest path between 2 OSM nodes using Dijkstra algorithm in pgrouting. My working query is as below:
...