NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

May I ask how to parse PBF files as text. I need to upload it through a HTTP requester using PUT command. However, it only supports plain text body, without any file format support. Thanks

asked 07 Dec '16, 16:24

Wetitpig0's gravatar image

Wetitpig0
307161928
accept rate: 10%

1

Can you explain what you are trying to do in a few more words? Why do you need to upload a plain text file?

(08 Dec '16, 08:29) scai ♦

You could try to upload a base64 encoded PBF file.

permanent link

answered 07 Dec '16, 18:21

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

How! How can a plain text request upload a file in Ubuntu?

(07 Dec '16, 23:27) Wetitpig0
1

On Ubuntu use base64, it is located in the coreutils package and already preinstalled.

To transform any file into a base64 encoded ASCII file run base64 origFile > asciiFile. To transform it from ASCII back into the original format run base64 -d asciiFile > origFile. Note that a base64 encoded file will be around 33% larger.

(08 Dec '16, 08:28) scai ♦

The first web search result after the adverts is this. Does that help?

permanent link

answered 07 Dec '16, 16:30

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

edited 07 Dec '16, 16:31

No, it suggests parsing into an OSM XML file, but that would be too large for my computer.

(07 Dec '16, 23:27) Wetitpig0

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×60
×22

question asked: 07 Dec '16, 16:24

question was seen: 4,087 times

last updated: 08 Dec '16, 08:29

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum