Skip to main content

All Questions

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

Store in a table some tags in JSON while others in JSONB

I want to import a road network, and I tried to store the most used tags in JSON, while ONLY the least used in JSONB (if I use { column = 'tags', type = 'jsonb' }, I get all tags inside JSONB). I ...
Ale_Zena_IT's user avatar
1 vote
1 answer
74 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
0 answers
84 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
48 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
1 vote
0 answers
110 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
121 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
143 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
56 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
387 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
1 vote
1 answer
194 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
1 answer
101 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
0 votes
1 answer
149 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
1 vote
1 answer
364 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
  • 830
2 votes
1 answer
1k 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,440
0 votes
2 answers
246 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
346 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
252 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
1 vote
2 answers
223 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
1 vote
0 answers
101 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
721 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
240 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,379
0 votes
0 answers
164 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
347 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,677
1 vote
0 answers
78 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
272 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
1 vote
1 answer
973 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 ...
GIS Man's user avatar
  • 1,123
0 votes
1 answer
109 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 ...
wfgeo's user avatar
  • 3,638
2 votes
1 answer
582 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 ...
Oren_C's user avatar
  • 154
0 votes
0 answers
69 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 ...
Forna's user avatar
  • 153
3 votes
3 answers
275 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 ...
c00der's user avatar
  • 231
1 vote
1 answer
162 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 ...
Tyomik_mnemonic's user avatar
2 votes
0 answers
415 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 ...
Ravi's user avatar
  • 121
2 votes
1 answer
258 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 ...
Michael's user avatar
  • 550
1 vote
0 answers
146 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 ...
coolnodje's user avatar
  • 151
0 votes
0 answers
274 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 ...
humanityANDpeace's user avatar
2 votes
0 answers
374 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: ...
Tyomik_mnemonic's user avatar
2 votes
0 answers
195 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, ...
stormzhou's user avatar
  • 121
2 votes
0 answers
352 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 ...
Georg's user avatar
  • 1,011
3 votes
1 answer
440 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 ...
Tyomik_mnemonic's user avatar
2 votes
1 answer
79 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 ...
Defozo's user avatar
  • 181
2 votes
1 answer
735 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 ...
MartinMap's user avatar
  • 8,406
1 vote
1 answer
2k views

Adding 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 ...
Mahdi Nazari Ashani's user avatar
6 votes
1 answer
1k 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'...
Nick's user avatar
  • 226
0 votes
1 answer
289 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 ...
Maxim Popravko's user avatar
1 vote
1 answer
368 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 ...
kujaw's user avatar
  • 215
1 vote
1 answer
563 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 ...
GeoFresher's user avatar
1 vote
2 answers
174 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 ...
guillermo_dangelo's user avatar

1
2 3 4 5