Questions tagged [osm2pgsql]

Converts OpenStreetMap data to a PostgreSQL / PostGIS database

Filter by
Sorted by
Tagged with
0 votes
0 answers
6 views

Finding the shortest path length between two coordinates using pgRouting [duplicate]

Given two pairs of latitude and longitude, how can I find the length of the shortest path, traveled by car? Following the instructions and tutorials from OpenStreetMap, pgRouting, osm2pgsql, ...
user avatar
  • 111
0 votes
1 answer
15 views

After pgr_createTopology, how should I use pgr_dijkstra?

Using the OpenStreetMap data and osm2pgsql, I created a topology by using the pgr_createTopology() function. These tables are what I have: List of relations Schema | ...
user avatar
  • 111
1 vote
1 answer
32 views

Osm2pgsql error: authentication method 10 not supported

I'm getting the following error when trying to import osm data using osm2pgsql. I just installed pgAdmin4 today so it should all be up to date. osm2pgsql version 0.92.0 (64 bit id space) pgAdmin4 ...
user avatar
  • 710
1 vote
0 answers
10 views

osm2pgsql can reimport with multi-geometry once imported full OSM data without starting from zero?

Well, I executed the osm2pgsql command without the -G param which is intended to do a multi geometry search: https://osm2pgsql.org/doc/manual.html#geometry-processing But I already did: sudo -u ...
user avatar
  • 111
4 votes
1 answer
89 views

Use ST_DWithin on WGS84 geometry data

I've just used osm2pgsql to import osm data to a PostGIS database, using lat/long option to store it in WGS84 projection. I would like to use ST_DWithin to select nodes close to a random point. When I ...
user avatar
2 votes
1 answer
51 views

Running osm2pgsql 1.4+ with custom projection, proj 8.2

first some context... I have a custom projection, here is the projection string: <5514> +proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=...
user avatar
  • 21
1 vote
1 answer
45 views

Use flex-output and lua style file with osm2pgsql

I want to use osm2pgsql. I have a osm.pbf file for whole Europe from geofabrik. I am only interested in features (point and polygons) containing the tags Religious amenity=place_of_worship (is ...
user avatar
  • 3,017
0 votes
0 answers
38 views

Pre-render entire map and database, then upload to tile server?

I was playing around with the switch2osm tool and managed to import a country on a Ubuntu server (VPS). From my tests, it seems like the server-intensive operation is the import itself (osm2pgsql) and ...
user avatar
0 votes
0 answers
47 views

Update OSM database via osmosis causes PSQLException: ERROR: could not create unique index "pk_users"

We want to load OSM USA data (state by state) in our PostgreSQL database. We already have one state's data loaded via osmosis 0.48.0. But in updating it with new state's data, we run into this error ...
user avatar
0 votes
1 answer
36 views

Filtering out parts of a relation on osm2pgsql import

Is there any way with osm2pgsql to filter out members of a relation during the import phase, based upon the tags of the member? My use case is that I want to gather a set of road cycling relations, ...
user avatar
0 votes
0 answers
19 views

Import only Point features with osm2pgsql | Import only certain Tags of point features with osm2pgsql

I am very new osm2pqsgl. I have downloaded a osm.pbf file for all of Europe and I want to add this data to my Postgres database. However, I am only interested in points, no linestrings nor polygon, ...
user avatar
  • 3,017
0 votes
2 answers
58 views

OpenStreetMap: find public transportation belonging to a road - Tools ot algorithm

I'd like to find the public transportation lines (bus, tramways) that operate on a particular road. Do you know any tool doing that? If not, do you know any algorithm doing that? The only generic ...
user avatar
  • 105
0 votes
2 answers
241 views

Pre Rendering tile using render_list command is extremely slow

I have created a OSM tile serving server using osm2pgsql with entire asia tiles. I am using Ubuntu 18.04, 32 CPU cores, 132 GB RAM, 1 TB HDD. This I believe is a reasonable hardware. Now, I feel that ...
user avatar
1 vote
0 answers
133 views

osm2pgsql get_way failed: server closed the connection unexpectedly

I'm trying to import OSM Europe to postgresql under Debian. If I am importing only e.g. Czech Republic, then import is successful. But if I try to import Europe then I always got an warnings and error:...
user avatar
  • 119
3 votes
1 answer
62 views

pgrouting - pgr_nodeNetwork: Can NOT determine the srid of the geometry "osm_id" IN table

I have been following the guide in order to import PBF data into a PostGIS database: pgrouting - documentation. I have downloaded the Belgium PBF from Geofabrik and installed all extensions needed ...
user avatar
  • 225
1 vote
2 answers
66 views

osm2pgsql-flex output: Lua dependecies 'dkjson' under windows10

I'am using PostgrSQL 12 on a windows 10 machine. I need to import .pbf-files from OSM. I have a lua-script using the dkjson package: local json = require('dkjson') However if I use osm2pgsql it gives ...
user avatar
0 votes
0 answers
43 views

Updating OSM using Pyosmium Tool

I am trying to create an automation process of Update OSM data in Postgresql database. I found pyosmium tool which is handy. I have downloaded the updates using the following command pyosmium-get-...
user avatar
  • 2,931
3 votes
1 answer
46 views

osm2psql: errors with default.style

I'm using osm2psql to import some OSM data, but the default style file that comes packaged with the tool for Windows returns an error. It seems to be expecting a differently formatted style file, but ...
user avatar
  • 2,751
1 vote
1 answer
93 views

How much disk space is expected to take an osm2pgsql import of Europe in 2021?

My europe-latest.osm.pbf file is 24GB. I'm currently importing it on 8-core 32GB-RAM server with osm2pgsql as part of switch2osm. I've run the default docker container of switch2osm and after 2 days, ...
user avatar
0 votes
0 answers
48 views

Extract all cities with lat lon coords from Slovakia OSM using PostGIS

I need to extract all cities with lat lon coords from Slovakia OSM. This is how I imported OSM file downloaded from Geofabrik: osm2pgsql --slim --username postgres --database gis --hstore slovakia-...
user avatar
  • 1
1 vote
0 answers
47 views

OSM tile server -- too many highway labels

I'm running a local OSM tile server. I've combined three pbfs (three neighboring states) using osmconvert, then loaded them into postgis database: osm2pgsql --slim -d gis --hstore --multi-geometry --...
user avatar
0 votes
1 answer
87 views

Exporting the data in pbf format, which is imported using osm2pgsql tool

I have imported the pbf data to postgres using osm2pgsql. osm2pgsql -U postgres -W -d osmdbv4 --output-pgsql-schema=db_snapshot --latlong -H localhost -C 20480 --middle-schema=db_snapshot -S default....
user avatar
  • 183
0 votes
1 answer
118 views

Download all coffe-shop locations in Italy from OSM. Stuck with Qgis, R and geofabrik

I wanted to download all café locations from OSM in Italy. I tried various ways and one of them was in qgis. I used the awesome quickosm-plugin and did the following: But it always fails with a ...
user avatar
  • 657
0 votes
0 answers
37 views

Installing older version of osm2pgsql

I am trying to use open source project named SciGRID to construct a power network. The project requires power tag data to be filtered (using osmosis) and loaded into a postgres database using ...
user avatar
0 votes
1 answer
393 views

No password supplied error from osm2pgsql

I want to load some power data to a database I have created in postgres (postgis). But when type the following command in the terminal (ubuntu 18.04) I ended up with the following error. osm2pgsql -r ...
user avatar
0 votes
1 answer
76 views

Import OSM file into pgrouting, keeping certain key/values

i want to import a big (10G) OSM network into PostGIS for pgRouting. As i have to do some postprocessing with Postgres i need to load some key/values from the OSM dataset into the database as well, e....
user avatar
  • 23
0 votes
0 answers
25 views

Tile server fail to display map

I ma begining with vector tiles and geo data in general. I am running a T-rex server to serv data post a postGIS database. i have an issue with my browser part because i can't display anything ! ...
user avatar
0 votes
0 answers
47 views

osmpgsql fails to load all data from OSM file

I have a project where I need to use osm2pgsql to load an OpenStreetMap file (osm.pbf). (Using a command like this: osm2pgsql -c -d database_name -U user -H localhost -W -S "path to style file&...
user avatar
  • 1
0 votes
1 answer
351 views

Error appending data to existing PostgreSQL database for OSM with osm2pgsql

When running osm2psql on an existing database I get an error osm2pgsql -v -d gis -a -s -G --flat-nodes ./nodes.cache --number-processes 8 ./thailand.osm.pbf Output is : Allocating memory for dense ...
user avatar
1 vote
0 answers
94 views

Get all bus lines for a set of stops in overpass / OSM

I am trying to get a list of lines for a large set of busstops (lets assume to query worldwide). As far as I have figured it out, I get a set of busstops from download.osmdata.xyz. Now I could query ...
user avatar
  • 2,494
1 vote
0 answers
49 views

Extending OSM database with new data

I want to add a new table inside my OSM database with extra data for every restaurant, and then when retrieving the places join the table by the "osm_id", is this possible and if yes, any ...
user avatar
  • 11
1 vote
1 answer
101 views

Troubles translating own OSM server tile to English (ubuntu 18.04)

I have created a OSM tile server using the https://switch2osm.github.io/ tutorial for ubuntu 18.04 with great success but no matter what I cannot display the map labels in English only, I have tried ...
user avatar
0 votes
0 answers
41 views

Osm2pgql failed to output expired tiles for "delete" operation when running in cron

I am using osm2pgsql to: Append .osc files into gis rendering database (based on mod_tile / Mapnik stack) to "delete" some features Generate expired tiles list via -e -o options Fed the ...
user avatar
0 votes
2 answers
171 views

GeoServer complains because osm2pgsql didn’t create primary keys

I imported OSM data into a PostGIS database using osm2pgsql, then served it in WFS via GeoServer. However, QGIS gets stalled when trying to view these layers. I found corresponding GeoServer errors ...
user avatar
0 votes
1 answer
316 views

osm2pgsql failed import The system cannot find the file specified

I got error message, when loading osm file to PostgreSQL by osm2pgsql command. I run the following command line : osm2pgsql -c -G -U postgres --hstore -S D:\osm2pgsql\default.style -U postgres -W ...
user avatar
  • 1,095
0 votes
1 answer
36 views

Coordinate drift when using osm2pgsql and specifying EPSG code

We had a PostGIS database which was initialized quite some time ago using an osm.pbf file from Geofabrik, without a specified coordinate system. It defaulted to using EPSG 900913 (Google Maps Global ...
user avatar
  • 3,236
2 votes
1 answer
217 views

How to increase a PostGIS query efficiency when querying OSM information

I have this SQL query to get roads from my PostGIS server. WITH boxed_roads AS (SELECT * FROM "planet_osm_line" WHERE ST_Within(way, ST_MakeEnvelope(xmax ,xmin, ymax, ymin, 4326)) ) SELECT ...
user avatar
  • 145
0 votes
0 answers
37 views

Problem with osm2pgsql

I'm having a problem importing a .pbf file in PostgreSQL using the osm2pgsql. I've downloaded the italy-latest.osm.pbf and as I do every year I'm going to upload it in PostgreSQL. I did it for other ...
user avatar
  • 143
3 votes
3 answers
170 views

Intersecting Polygons to Build Boundary Hierearchy using PostGIS

I have a set of polygons that are stored flat in a table (these are OSM admin boundaries extracted through Osmium and osm2pgsql). Each polygon has one record for it. However, these polygons form ...
user avatar
  • 231
2 votes
1 answer
567 views

Determine correct tolerance/epsilon for line simplification in different zoom-levels when generating vector tiles

I am writing my own vector-tile generator for a map renderer that I have written, but I am unsure of how to pick the correct epsilon value to use in the PostGIS method ST_Simplify depending on the ...
user avatar
1 vote
1 answer
98 views

Osmosis failed: ERROR: relation "pend_ways" does not exist

I tried to generate osm update using osmosis and osmium(omsium only for setting configuration.txt from existing russia-latest.osm.pbf). I use osmosis like that: osm2pgsql -append --slim --cache ...
user avatar
0 votes
0 answers
230 views

How to load OSM data to RDS instance (PostgreSQL) on AWS

I am trying to load the OSM data to PostgreSQL (RDS on AWS). I could not find any information on loading the OSM data to cloud. I tried the steps outlined in many website and osm2pgsql but nothing ...
user avatar
  • 101
1 vote
2 answers
173 views

How to get land_area polygons with osm2pgsql?

I want to get the polygons of several administrative land areas. For example https://wiki.openstreetmap.org/wiki/DE:Grenze#Innerstaatliche_Grenzen contains the relation numbers for the land areas of ...
user avatar
  • 1,970
2 votes
0 answers
112 views

Download certain POIs for a whole country and transfer to PostgreSQL database

I'd like to extract certain data from OSM for a whole country (Germany). The data I'd like to obtain are POI's, but obviously not all of them. I'd like to filter only the supermarkets for example and ...
user avatar
2 votes
1 answer
203 views

Lossless import of full OpenStreetMap planet dump into PostGIS

I would like to import a full OpenStreetMap planet dump as PBF into a PostGIS tables. With tools like osm2pgsql or imposm3, configuration files are neccessary. Unfortunately, it is not possible to ...
user avatar
  • 460
1 vote
0 answers
52 views

Extracting city information only from OpenStreetMap

I need to extract City as well as hierarchy of admin entities for selected countries. My understanding for now is that I'll have to get node primarily and find a clever filtering based on tags. And ...
user avatar
  • 151
0 votes
0 answers
116 views

osm2pgsql: does table planet_osm_roads contain any non-duplicate data?

Although there is a osm wiki page that attempts to shed light on the different tables which are created within a postgres/postgis database there is something that is not quite made clear: Is the data ...
user avatar
2 votes
0 answers
223 views

Osm2pgsql failed Cannot detect file format. Try using -r

I use Osm2pgsql 1.0 and this my action : sudo osm2pgsql --slim -c --cache 29000 --proj 3857 russia-latest.osm.pbf -H xxxx.local -d osm -U osm_user -W -P 5432 was failed after some time: ...
user avatar
2 votes
0 answers
87 views

Getting node way relationship from Osm2pgsql data

I would like to ask what is the best way to extract which way a node belongs to given a Postgresql databased generated by Osm2pgsql. For example, in https://www.openstreetmap.org/node/4961890042, ...
user avatar
  • 121
0 votes
0 answers
41 views

osm2pgsql osm_timestamp is NULL

I use osm2pgsql to load osm.pbf Data into a PostGIS database. One objective is to store the osm_timestamp into a column. The flag "-x" is used in the cmd code. With the following line in the ...
user avatar
  • 460

1
2 3 4 5
7