Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [osm2pgsql]

Converts OpenStreetMap data to a PostgreSQL / PostGIS database

1
vote
1answer
45 views

Some OSM tags in polygons and some in points - how to bring them together

Tagging objects in OSM can sometimes be done as polygon or as point. For example ruins or museum So far so good, but finding a specific object in a osm-dataset makes it necessary to look into the ...
0
votes
1answer
28 views

How to load OSM file from local machine to the server using osm2pgsql?

I wanted to upload the OSM file from my local machine to server using osm2pgsql, but the data is not imported. I have just created the database s1(no table), do I need to create the table also, if ...
0
votes
1answer
32 views

How to add a custom layer to OSM data in switch2osm?

I'm new to switch2osm and I've created an OSM Tile Server with switch2osm on Ubuntu 16.04 LTS. It uses Apache, Mod_tile, renderd and Mapnik to render tiles. It uses PostgreSQL as DBMS and osm2pgsql to ...
0
votes
0answers
8 views

Seeking approach to simulate taxi on NYC map data? [duplicate]

I am new to GIS field. As part of my class project we want to simulate 100-1000 taxi agents on NYC map.We plan to write java application which fetches road network information and moves these agents ...
5
votes
1answer
123 views

Create a line string from street geometry

I'm currently facing some hard times trying to create a simplified line from a street geometry. The data that I'm currently using comes from OpenStreetMap, using osm2pgsql.(Which means PostGIS, but I'...
2
votes
0answers
34 views

osm2pgsql import OSM data in EPSG:27700

I am trying to use osm2pgsql on Windows to import OSM data to a PostGIS database. I want to pass the EPSG:27700 via the --proj option as follows: osm2pgsql --proj 27700 <other options not shown>...
0
votes
1answer
37 views

Why can't I load layers from PostGIS db (populated with osm2pgsql) in QGIS?

I have downloaded some OSM data from geofabrik and used this to create a PostgreSQL/PostGIS database using the osm2pgsql tool: osm2pgsql -G -d <db> -U postgres myfile.osm Examining the ...
0
votes
1answer
127 views

Where to find Windows osm2psql binaries in 2018?

I've read all the stuff in their git, here at stackexchange, in OSM wiki, but all links are broken and the latest windows binary I found is HOTOSM bundle built at 2010. Download link to osm2pgsql ...
1
vote
1answer
54 views

Creating osm2pgsql hstore tags using PostGIS column

This is the opposite question to this one: Creating columns in PostGIS using osm2pgsql hstore tags First, I changed default.style to make separate 'lanes' column. Then I extracted osm database ...
1
vote
1answer
62 views

Find polygon boundary dynamically based on a point (lat/long) having type farmland using OSM

There are many ways to retrieve the polygon information when you know that the information is already present somewhere (data locally or in database containing extracted info about polygon). But this ...
1
vote
2answers
65 views

Ring geometries in pgRouting OSM DUMP

After performing pgRouting's "pgr_analyzeGraph" algorithm, over an Open Street Map dump uploaded to my PostGIS DB, I get this output, by I can't figure out what "ring geometries" are. Does somebod ...
0
votes
0answers
33 views

osm2pgsql stops after importing several extracts

I want to import several city extracts from the bbike website into my postgis database. I use windows on a desktop pc with 16GB RAM and a quadcore processor. The first couple of extracts imported ...
0
votes
1answer
117 views

Where is flat-nodes file located?

I would like to use osm2pgsql to load the europe.osm.pbf to the database. I've already read about the optimalization to make the osm2pgsql do it as fast as possible. However, there's one option, that ...
2
votes
1answer
75 views

finding isolated rings in postgis

I want to find the isolated rings in an OSM dump loaded into PostGIS, using pgRouting. I need to do this in order to delete the isolated rings of the network. Does anyone know how to do it?
0
votes
1answer
124 views

Osm2pgsql, permission denied when creating node cache file

This is probably a dumb issue but I'm kind of stuck while trying to import a big data set into an existing database with osm2pgsql. More specifically, I'm getting a permission denied error when using ...
1
vote
0answers
60 views

Build a tile server using MySQL as backend

I need to set up a tile server using MySQL but cannot find any documentation for it. I have done it with Postgres by following this link and it works fine. I understand that after downloading the ...
2
votes
1answer
299 views

Periodically updating OpenStreetMap tile server to keep it up to date?

I have successfully built my tile server by following this link (https://switch2osm.org/manually-building-a-tile-server-18-04-lts/) and open layers for viewing the tiles. How do I keep automate the ...
1
vote
1answer
165 views

OSM updates with Osmosis -> Osm2Pgsql resulting in missing features?

For my project, I have successfully created a PostgreSQL database of the entire planet file using osm2pgsql. My next task was to sucessfuly update the database using daily change files through the ...
1
vote
1answer
59 views

Osm2pgsql - Lines instead of polygons that represent buildings

So I am using a PostgreSQL database with the PostGIS extension to extract building data with addresses from osm data. I just discovered that in my dataset, imported with osm2pgsql of the german city ...
1
vote
1answer
59 views

What are the options for generating images from OSM data without importing it to PostgreSQL

While I'm waiting for my first try of an osm2pgsql import to succeed I am wondering if what I'm doing is really necessary. The goal is to periodically produce some .png maps from a slightly filtered ...
1
vote
2answers
54 views

Using local OSM server in ArcMap?

I have a local OSM server that cached osm.pbf. How can I add data from this server to ArcMap like a base map layer? OSM was made by instr: https://www.linuxbabe.com/linux-server/openstreetmap-tile-...
2
votes
0answers
142 views

osm2pgsql --append super slow (node 2k/s vs 1500k/s for --create)

I'm working with multiple pbf files (one per administrative region). I thought I would import them one by one in postgis, with: osm2pgsql --proj 4326 --hstore-all --database gis first.pbf --style ...
0
votes
2answers
353 views

Column “tags” is missing in PostgreSQL table created with osm2pgsql

I downloaded osm2pgsql for Windows from AppVeyor (https://ci.appveyor.com/api/projects/openstreetmap/osm2pgsql/artifacts/osm2pgsql_Release_x64.zip?tag=0.96.0&job=Environment%3A%20arch%3Dx64) and ...
0
votes
0answers
55 views

Converting .pbf to PostrgreSQL table using osm2pgsql

Hello GIS StackExchange! I trying to import a .pbf file into a PostgreSQL table using osm2pgsql in python using the subprocess module. The command works perfectly in the command-line, but when I ...
0
votes
1answer
61 views

Qgis Server Error while rendering postgis osm layer planet_osm_polygon

I have hosted QGIS server on a remote server. I want to publish OSM layer which is stored in PostgreSQL database. I have prepared one project file with .qgis extension and copied to the desired ...
1
vote
1answer
152 views

Configure styling of OSM with T-Rex vector tile server

I am using T-Rex as vector tileserver, osm2pgsql for importing the .osm.pbf file into the PostGIS database (table format - planet_osm_line, planet_osm, point, planet_osm_polygon, planet_osm_road). I ...
1
vote
1answer
201 views

Serving multiple styles openstreetmap-carto(4.x versions) and osm-bright from tile server?

I have followed this link to implement serving multiple tile styles from tile server. It says that I just need to update .xml style file path in renderd.conf file. But the openstreetmap carto recent 4....
1
vote
1answer
170 views

Is it mandatory to specify --style argument and --tag-transform-script in osm2pgsql query for importing .pbf file?

I am trying to build a tile server that serves tiles of multiple styles(osm and osm-bright). I have followed this link for implementing this. But here I found that osm2pgsql query for importing .pdf ...
1
vote
1answer
110 views

How to import OSM relations to PostgreSQL databases? [closed]

I have created PostgreSQL databases using Osm2pgsql. I have all the lines and points data. How can I import the relations stored in OSM file? for example turn restriction? Is there an easy way to ...
0
votes
1answer
46 views

Recreating index on planet_osm_nodes

It appears that I have corrupted / overwrote the index planet_osm_nodes for my Open Street Map installation. I would like to recreate it, but am not sure of the access method (b-tree, GIST...) which ...
2
votes
2answers
427 views

OpenStreetMap - Determining number of nodes, ways, and relations in a PBF file?

I'm currently importing a subsection of North America into PostGIS to render my own basemap tiles using osm2pgsql. Is there any way to get an accurate count of the number of nodes, ways, and relations ...
0
votes
1answer
119 views

ST_AsGeoJSON providing unexpected values

GIS newbie here! I have been playing around with the import I did from an OSM region (that I got from here) to postgres using the osm2pgsql conversion tool. The command I used to import was this: ...
1
vote
0answers
64 views

osm2pgsql. Loading data into tables with non-standard columns

I have an * .osm file with a lot of data. To load the data into postgis I use osm2pgsql. Tell me, please, how to load in the table "my_table" data that have amenity = parking. Coordinates of polygons ...
1
vote
1answer
432 views

Extract OSM data (xml) from large polygon (up to 1GB of data)

I need to extract a large area from OSM to import it into my local PostGIS-DB (using osm2pgsql). For smaller areas I was using http://extract.bbbike.org/ to download OSM-XML-Data. It's possible to ...
1
vote
1answer
78 views

nodes geographic coordinates with pgRouting Query

Can we get the coordinate of nodes belongs to shortest path??? I give brief description, I calculate the shortest path with A* algorithm using Pgrouting, but what I'm looking for coordinates (long, ...
1
vote
2answers
92 views

Building graph from database structure to implement A* algorithm?

I imported an osm file into a postgresql database using osm2pgsql. Now, I want to implement a route/path generating algorithm (routing algo) based on two locations entered by a user. It is not ...
1
vote
0answers
110 views

--flat-nodes osm2pgsql data import and tilemill

This is more so a question regarding the import process with osm2pgsql and the use of the --flat-nodes option as i have seen that this is very useful especially when it comes to importing the entire ...
1
vote
0answers
132 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 ...
0
votes
1answer
237 views

How to extract data from planet_osm_ways and insert into planet_osm_polygon again?

I have an OSM import in my PostgreSQL database and can see my map using Geoserver. I've noticed some data have disapeared ( most water related data ) maybe after an import failure, I don't know. I'm ...
0
votes
0answers
182 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....
1
vote
1answer
83 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(...
1
vote
0answers
217 views

Osm2pgsql importing speed not improving when using a SSD?

I have built my own OSM server and I am trying now to import UK into my Postgis database using osm2pgsql. I have changed the data directory of the database (succesfully) and I have mounted a Samsung ...
1
vote
1answer
296 views

How to merge OSM files with same ID?

After read this How merge osm files with same ID objects? I can't get any conclusion so please don't flag as duplicate. I have some PBF files came from NASA SRTM ( http://katze.tfiu.de/projects/...
4
votes
1answer
317 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
1answer
777 views

Updating OpenStreetMap maps database of own tile server?

I am working with a osm2pgsql database, and I do not know wheter I can use Osmupdate or not because in the StreetMapWiki it says furry-sansa should be used for osm2pgsql databases. The problem is ...
1
vote
0answers
135 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 ...
4
votes
1answer
55 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 ...
3
votes
0answers
36 views

osm2pgsql backwards compatability issue during my biannual elevation contours import process

Every two years when I upgrade to the latest debian stable I start from scratch with my elevation contours pgsql/postgis database. This year I spent an entire day trying to find some new combination ...
2
votes
1answer
210 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 |...
3
votes
2answers
1k views

Loading OpenStreetMap data to a custom PostgreSQL schema via osm2pgsql

What is the procedure to load OSM to a different schema than public? The osm2pgsql documentation mention the parameter --prefix for specifying the tables prefix (planet_osm by default) but does not ...