Questions tagged [osm2pgsql]

Converts OpenStreetMap data to a PostgreSQL / PostGIS database

Filter by
Sorted by
Tagged with
0
votes
1answer
15 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 ...
0
votes
1answer
18 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 ...
2
votes
1answer
99 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 ...
0
votes
0answers
28 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 ...
1
vote
1answer
82 views

Matching GPS trackers POINT data between Nodes of OSM (Open Street Map) [closed]

I have GPS point data of vehicles from XYZ Tracking Company. The data has following columns: UnitID RecordDateTime LATITUDE LONGITUDE Speed Direction Reason Altitude Data Dictionary is given below:...
3
votes
3answers
96 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 ...
2
votes
1answer
117 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
1answer
31 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
0answers
75 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 ...
1
vote
2answers
42 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
votes
0answers
45 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 ...
2
votes
1answer
159 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 ...
1
vote
0answers
35 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 ...
0
votes
0answers
47 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 ...
1
vote
0answers
73 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: ...
0
votes
0answers
35 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, ...
0
votes
0answers
21 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 ...
0
votes
0answers
49 views

Where can I find hierarchies of polygons in OSM data?

I extracted nationwide data from the geofabric.de website for Germany and used the osm2pgsql tool to get the tables into Postgres. I am trying to extract shapefiles from this data and most ...
1
vote
0answers
70 views

Combine data of OSM roads into longer lines using PostGIS

For my vector map I'd love to display highways at a quite early zoom level. The problem is that this data would be quite big, so I thought I simply ST_Simplify it. The problem though is that the OSM ...
3
votes
1answer
96 views

How to set schema parameter in osm2pgsql calling

How I can to set schema name parameter when call osm2pgsql? For example: osm2pgsql --create -s -C 2500 -G -S D:\default.style -d osm_db -o input -U osm_user -W -H localhost -r pbf D:\osm.pbf I set ...
1
vote
1answer
68 views

Creating Isochrones - pgr_drivingDistance 2.6 SQL error

Im trying to create a matrix of driving distances from an osm2pgrouting parsed dataset. Following many blogs I have the below incorrect SQL: SELECT * from ways join ( SELECT * FROM ...
1
vote
1answer
35 views

mod_tile renders OpenStreetMap without some water

My rendered map: The same view from openstreetmap.org: What went wrong? I downloaded europe_latest.osm.pbf and nigeria_latest.osm.pbf and imported these files using --append. Now, I'm trying to ...
1
vote
1answer
89 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
52 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
309 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 ...
5
votes
1answer
250 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
154 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
87 views

Loading 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
211 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
108 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
85 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
95 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
44 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 ...
1
vote
1answer
484 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
104 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
321 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
124 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
384 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
331 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 ...
2
votes
1answer
96 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
64 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
94 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
309 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
701 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 ...
1
vote
0answers
121 views

Converting .pbf to PostrgreSQL table using osm2pgsql?

I try 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 try to use it in subprocess it ...
0
votes
1answer
132 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 ...
2
votes
1answer
276 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
300 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
326 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
197 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 ...

1
2 3 4 5 6