Skip to main content

Questions tagged [osm2pgsql]

Converts OpenStreetMap data to a PostgreSQL / PostGIS database

Filter by
Sorted by
Tagged with
1 vote
1 answer
38 views

"addr:street" seems to be missing after using osm2pgsql to load data into postGIS

I have some geographic usecases for a personal usage (i.e. real-estate price forecast), and after digging through different tools, I wanted to learn more about PostGIS. osm2pgsql seemed like a great ...
Volantis's user avatar
0 votes
1 answer
29 views

Osm2pgsql does nothing [closed]

When I try to use osm2pgsql, it returns after a second without any import or error message. What may be wrong? C:\osm2pgsql>C:\osm2pgsql\osm2pgsql.exe --database=postgres --host=ubuntu.forplan....
Redoute's user avatar
  • 2,242
0 votes
0 answers
24 views

osm2pgsql error: Connecting to database failed (context=check)

I got this error while importing an osm file to PostgreSQL directly. My code is: osm2pgsql –c –d highway -U postgres –P postgres –W postgres -H localhost "D:\data\highway.osm" The result ...
Yến Giang's user avatar
1 vote
1 answer
37 views

Does PostgreSQL function concat_ws works as expected?

You find the documentation of the concat_ws PostgreSQL function here. It says this request concat_ws(',', 'abcde', 2, NULL, 22) results in this reply abcde,2,22. This example does not proves the ...
dancesWithCycles's user avatar
0 votes
1 answer
27 views

How to fix error from osm2pgsql importing buildings - Column entry must contain a 'type' string field

I'm trying to follow https://osm2pgsql.org/examples/buildings/ to import building polygons into a Postgres DB. I have downloaded a pbf file from https://download.geofabrik.de/europe.html. Specifically,...
mchr's user avatar
  • 111
0 votes
1 answer
421 views

Setting up MapLibre, osm2pgsql and Martin Tile Server

I want to display dynamic maps served by the Martin tile server. TLDR: I don't know if the bug comes from the MapLibre code or the Martin tile server. I just created a repo for testing, it tries to ...
Big_Boulard's user avatar
0 votes
0 answers
28 views

In osm2pgsql flex output, many road types I retrieve are highway: construction? How do I find what road type they are?

I am using pgosm-flex to load in the OpenStreetMap OSM files for many files. I then passed in many (latitude,longitude) points to get the nearest road type to those points. The query works, but the ...
Vivek Reddy's user avatar
1 vote
0 answers
86 views

Updating existing PostgreSQL database with OSM data

I currently work on the project which is directly working with the geo data of the country where I live. The database we have is quite huge, containing not only the geo data but also some other stuff. ...
qwerty's user avatar
  • 11
0 votes
0 answers
92 views

Uploading large OSM files to PostGIS with command line

I'm trying to upload the nationwide US OSM dataset from Geofabrik website to a PostGIS database (about 200 GB). For small OSM files, I'm able to import the OSM file as layers into QGIS with the ...
Vivek Reddy's user avatar
2 votes
1 answer
119 views

Query to find nearest road highway tag to a (latitude,longitude) point

I imported an OSM file for the state of Delaware into the PostGIS Database via connecting to it through QGIS. I would like to build a query to retrieve the nearest roads to the (latitude,longitude) ...
Vivek Reddy's user avatar
0 votes
0 answers
43 views

osm2pgsql : How to store "nd ref" data to a column in PostgreSQL/PostGIS

I'm using osm2pgql to import an OSM map. I imported it successfully but I need also the information in the "nd ref" node of the OSM XML. I.e. my OSM XML has a node like: <way id='1805' ...
Emanuele Gian's user avatar
1 vote
1 answer
240 views

"Bad allocation" error when importing a large PBF file (OpenStreetMap) on PostgreSQL with osm2pgsql

I downloaded the 72 GB OpenStreetMap PBF file (planet-230619.osm.pbf) at this link https://planet.osm-hr.org/pbf/ and I am trying to import it into PostgreSQL + PostGIS with the library osm2pgsql ...
Koba's user avatar
  • 159
1 vote
1 answer
104 views

Install osm2pgsql in a conda environment

I have OpenStreetMap data and a database with the postgis extension, on a supercomputer (precisely Jean Zay, French cluster). In order to use JZ and install all the programs, packages etc I need on JZ,...
DianeS's user avatar
  • 103
1 vote
1 answer
285 views

Query to find all buildings in area using PostGIS on OpenStreetMap database

I have a PostGIS database filled using OpenStreetMap (OSM) data of a French region. If I made no mistake, the zone I want to investigate is bounded to the zone of the data, so I should be able to ...
DianeS's user avatar
  • 103
6 votes
1 answer
226 views

Wrong shortest path using pg routing

I want to find the shortest distance between two coordinates using pg routing. I am using Dijkstra algorithm but the shortest distance is incorrect. The correct value is approx. 6 km but I am getting ...
Piyush Narula's user avatar
1 vote
1 answer
158 views

Import all nodes that don't have tags into a PostGIS database using osm2pgsql

I want to import an OSM file into my PostGIS database using osm2pqsql. My input .osm file has around 300,000 nodes, but the planet_osm_point table ends up with only around 50,000 records. On closer ...
Butts Carlton's user avatar
1 vote
2 answers
176 views

osm2pgsql error "no COPY in progress" when importing map data into PostgreSQL

I've been trying to import map data into PostgreSQL 12 database (on Ubuntu 20.04.5 with wsl) using osm2pgsql, but I get this error after executing this command: $ osm2pgsql -U postgres -H localhost -...
Maria's user avatar
  • 21
1 vote
1 answer
88 views

How to find parks using PostGIS

I have OSM data imported with osm2psql that contain 4 tables planet_osm_line planet_osm_point planet_osm_polygon planet_osm_roads I want to pass a set of lat long to check if there is any park on the ...
svikramjeet's user avatar
1 vote
1 answer
104 views

OSM to PostgreSQL/PostGIS

I am trying to upload OSM files (PBF file) to my DB in PostgreSQL. I am using the osm2pgsql tool. If I will upload one file (Ontario, Canada) and after a few days another file (LA, USA) will it add ...
YuvalM's user avatar
  • 399
0 votes
1 answer
133 views

Osm2pgsql data dump in specific schema not working

While using osm2pgsql 1.6 i am trying to dump PBF into specific schema of postgres DB using following commands using docker. (i am setting database properties in docker env) docker run -v /mnt/ne-...
deewreck's user avatar
0 votes
1 answer
285 views

Keeping only features with certain attribute values in osm2pgsql

Is there a way to use osm2pgsql and have it only keep features that have values for certain attributes? For example, only keeping features which have a value (i.e. not null) in the default highway ...
wfgeo's user avatar
  • 3,598
2 votes
1 answer
182 views

Extending TileMill map (OSM CartoCSS) with layer and style for man_made=pier (YML/MSS, MML)?

I would like to extend the Stamen Toner map style (https://github.com/stamen/toner-carto/) with a layer to render piers (Way:area,man_made=pier). I managed to install tilemill on Ubuntu (https://...
handle's user avatar
  • 175
1 vote
1 answer
332 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 | ...
Chang's user avatar
  • 121
1 vote
1 answer
7k 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 ...
brink's user avatar
  • 820
1 vote
1 answer
191 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 ...
z3nth10n's user avatar
  • 111
4 votes
1 answer
636 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 ...
Bad_deepLearner's user avatar
2 votes
1 answer
123 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=...
Pabos's user avatar
  • 21
2 votes
1 answer
972 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 ...
four-eyes's user avatar
  • 3,398
0 votes
2 answers
218 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, ...
Sam Crawford's user avatar
0 votes
2 answers
327 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 ...
roland's user avatar
  • 105
0 votes
2 answers
2k 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 ...
user1826116's user avatar
1 vote
0 answers
237 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:...
Musketyr's user avatar
  • 119
3 votes
1 answer
279 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 ...
Stephen's user avatar
  • 285
1 vote
2 answers
198 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 ...
Sebastian's user avatar
3 votes
1 answer
188 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 ...
Encomium's user avatar
  • 3,143
1 vote
1 answer
415 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, ...
0xC0DEGURU's user avatar
1 vote
0 answers
98 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 --...
Julia Leder's user avatar
0 votes
1 answer
683 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....
swan's user avatar
  • 193
0 votes
1 answer
230 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 ...
Lenn's user avatar
  • 1,297
0 votes
0 answers
106 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 ...
user144483's user avatar
0 votes
1 answer
2k 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 ...
user144483's user avatar
0 votes
1 answer
268 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....
olro's user avatar
  • 23
0 votes
0 answers
104 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 ! ...
Vangogh's user avatar
0 votes
0 answers
151 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&...
ane's user avatar
  • 1
0 votes
1 answer
1k 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 ...
Ruinaga's user avatar
1 vote
0 answers
323 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 ...
Riccardo's user avatar
  • 2,668
1 vote
0 answers
74 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 ...
ib1's user avatar
  • 11
1 vote
1 answer
250 views

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 ...
Anibal Urrutia's user avatar
0 votes
0 answers
86 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 ...
chentoz's user avatar
0 votes
2 answers
388 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 ...
Skippy le Grand Gourou's user avatar

1
2 3 4 5
7