Questions tagged [osm2pgsql]

Converts OpenStreetMap data to a PostgreSQL / PostGIS database

Filter by
Sorted by
Tagged with
1 vote
2 answers
28 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 -...
  • 11
1 vote
1 answer
52 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 ...
1 vote
1 answer
46 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 ...
  • 377
0 votes
1 answer
197 views

overpass-turbo Export CSV of all adresses

[out:json][timeout:25]; ( node["addr:housenumber"="44"]({{bbox}}); way["addr:housenumber"="44"]({{bbox}}); relation["addr:housenumber"="44"](...
0 votes
0 answers
17 views

Import relation with no geometry using flex

Is there a way to import a relation using the flex style when that relation doesn't have any related geometry data? I'm trying to import a list of ski resorts in Scotland but one is not being imported ...
0 votes
0 answers
111 views

Presenting OSM natively in WGS84 (EPSG:4326)

I hope this isn't a repeat of some questions. I've searched quite a bit and I think I've exhausted resources, so here I am. I am standing up an internal OSM Server for my company. We operate strictly ...
0 votes
1 answer
52 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-...
0 votes
1 answer
68 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 ...
  • 3,440
1 vote
1 answer
81 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://...
  • 165
0 votes
0 answers
52 views

Rendering OSM data in Windows in MapServer causing error during generating Mapfile

I am following the documentation steps at https://github.com/mapserver/mapserver/wiki/RenderingOsmDataWindows. This is great documentation and everything is clear. However, I am getting the following ...
  • 103
0 votes
0 answers
9 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, ...
  • 111
0 votes
1 answer
113 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 | ...
  • 111
1 vote
1 answer
3k 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 ...
  • 742
1 vote
0 answers
29 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 ...
  • 111
4 votes
1 answer
285 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 ...
2 votes
1 answer
91 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=...
  • 21
1 vote
1 answer
335 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 ...
  • 3,227
0 votes
0 answers
345 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 ...
0 votes
0 answers
104 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 ...
0 votes
1 answer
80 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, ...
0 votes
2 answers
115 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 ...
  • 105
0 votes
2 answers
720 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 ...
1 vote
0 answers
192 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:...
  • 119
3 votes
1 answer
161 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 ...
  • 265
1 vote
2 answers
125 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 ...
3 votes
1 answer
68 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 ...
  • 2,932
0 votes
1 answer
229 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, ...
1 vote
0 answers
72 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 --...
0 votes
1 answer
299 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....
  • 193
0 votes
1 answer
172 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 ...
  • 807
0 votes
0 answers
70 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 ...
0 votes
1 answer
802 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 ...
0 votes
1 answer
129 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....
  • 23
0 votes
0 answers
58 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 ! ...
0 votes
0 answers
100 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&...
  • 1
0 votes
1 answer
673 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 ...
1 vote
0 answers
158 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 ...
  • 2,566
1 vote
0 answers
63 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 ...
  • 11
1 vote
1 answer
164 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 ...
0 votes
0 answers
58 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 ...
0 votes
2 answers
236 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 ...
0 votes
1 answer
550 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 ...
  • 1,093
0 votes
1 answer
50 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 ...
  • 3,440
2 votes
1 answer
333 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 ...
  • 154
0 votes
0 answers
40 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 ...
  • 143
3 votes
3 answers
221 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 ...
  • 231
2 votes
1 answer
715 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 ...
1 vote
1 answer
119 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 ...
0 votes
0 answers
306 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 ...
  • 101
1 vote
2 answers
236 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 ...
  • 2,040

1
2 3 4 5
7