Skip to content

Commit

Permalink
add html documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lonvia committed Sep 19, 2024
1 parent e7915e1 commit 0a4ea17
Show file tree
Hide file tree
Showing 51 changed files with 21,472 additions and 0 deletions.
150 changes: 150 additions & 0 deletions man/pyosmium-get-changes.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "PYOSMIUM-GET-CHANGES" "1" "Sep 19, 2024" "3.5" "Pyosmium"
.SH NAME
pyosmium-get-changes \- Download OSM change files
.SH USAGE
.SS pyosmium\-get\-changes.py
.sp
Fetch diffs from an OSM planet server.
.sp
The starting point of the diff must be given either as a sequence ID or a date
or can be computed from an OSM file. If no output file is given, the program
will just print the initial sequence ID it would use (or save it in a file, if
requested) and exit. This can be used to bootstrap the update process.
.sp
The program tries to download until the latest change on the server is found
or the maximum requested diff size is reached. Note that diffs are kept in
memory during download.
.sp
On success, the program will print a single number to stdout, the sequence
number where to continue updates in the next run. This output can also be
written to (and later read from) a file.
.sp
\fINote:\fP you may pipe the diff also to standard output using ‘\-o \-’. Then
the sequence number will not be printed. You must write it to a file in that
case.
.sp
Some OSM data sources require a cookie to be sent with the HTTP requests.
pyosmium\-get\-changes does not fetch the cookie from these services for you.
However, it can read cookies from a Netscape\-style cookie jar file, send these
cookies to the server and will save received cookies to the jar file.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
usage: pyosmium\-get\-changes [options]
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
show this help message and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-v
Increase verbosity (can be used multiple times)
.UNINDENT
.INDENT 0.0
.TP
.B \-o <outfile>, \-\-outfile <outfile>
Name of diff output file. If omitted, only the sequence ID will be printed where updates would start.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-format <format>
Format the data should be saved in.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-server <server_url>
Base URL of the replication server
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cookie <cookie>
Netscape\-style cookie jar file to read cookies from
and where received cookies will be written to.
.UNINDENT
.INDENT 0.0
.TP
.B \-s <outsize>, \-\-size <outsize>
Maximum data to load in MB (default: 100MB).
.UNINDENT
.INDENT 0.0
.TP
.B \-I <id>, \-\-start\-id <id>
Sequence ID to start with
.UNINDENT
.INDENT 0.0
.TP
.B \-D <date>, \-\-start\-date <date>
Date when to start updates
.UNINDENT
.INDENT 0.0
.TP
.B \-O <osmfile>, \-\-start\-osm\-data <osmfile>
start at the date of the newest OSM object in the file
.UNINDENT
.INDENT 0.0
.TP
.B \-f <seq_file>, \-\-sequence\-file <seq_file>
Sequence file. If the file exists, then updates will start after the id given in the file. At the end of the process, the last sequence ID contained in the diff is written.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ignore\-osmosis\-headers
When determining the start from an OSM file, ignore potential replication information in the header and search for the newest OSM object.
.UNINDENT
.INDENT 0.0
.TP
.B \-d, \-\-no\-deduplicate
Do not deduplicate diffs.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-socket\-timeout <socket_timeout>
Set timeout for file downloads.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
show program’s version number and exit
.UNINDENT
.SH AUTHOR
Sarah Hoffmann
.SH COPYRIGHT
2015-2020, Sarah Hoffmann
.\" Generated by docutils manpage writer.
.
151 changes: 151 additions & 0 deletions man/pyosmium-up-to-date.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
.\" Man page generated from reStructuredText.
.
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.TH "PYOSMIUM-UP-TO-DATE" "1" "Sep 19, 2024" "3.5" "Pyosmium"
.SH NAME
pyosmium-up-to-date \- Bring OSM files up-to-date
.SH USAGE
.SS pyosmium\-up\-to\-date.py
.sp
Update an OSM file with changes from a OSM replication server.
.sp
Diffs are downloaded and kept in memory. To avoid running out of memory,
the maximum size of diffs that can be downloaded at once is limited
to 1 GB per default. This corresponds to approximately 3 days of update.
The limit can be changed with the –size parameter. However, you should
take into account that processing the files requires additional memory
(about 1GB more).
.sp
The starting time is automatically determined from the data in the file.
For PBF files, it is also possible to read and write the replication
information from the osmosis headers. That means that after the first update,
subsequent calls to pyosmium\-up\-to\-date will continue the updates from the same
server exactly where they have left of.
.sp
This program can update normal OSM data files as well as OSM history files.
It detects automatically on what type of file it is called.
.sp
The program returns 0, if updates have been successfully applied up to
the newest data or no new data was available. It returns 1, if some updates
have been applied but there is still data available on the server (either
because the size limit has been reached or there was a network error which
could not be resolved). Any other error results in a return code larger than 1.
The output file is guaranteed to be unmodified in that case.
.sp
Some OSM data sources require a cookie to be sent with the HTTP requests.
Pyosmium\-up\-to\-date does not fetch the cookie from these services for you.
However, it can read cookies from a Netscape\-style cookie jar file, send these
cookies to the server and will save received cookies to the jar file.
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
usage: pyosmium\-up\-to\-date [options] <osm file>
.ft P
.fi
.UNINDENT
.UNINDENT
.INDENT 0.0
.TP
.B <osm file>
OSM file to update
.UNINDENT
.INDENT 0.0
.TP
.B \-h, \-\-help
show this help message and exit
.UNINDENT
.INDENT 0.0
.TP
.B \-v
Increase verbosity (can be used multiple times)
.UNINDENT
.INDENT 0.0
.TP
.B \-o <outfile>, \-\-outfile <outfile>
Name output of file. If missing, the input file will be overwritten.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-format <format>
Format the data should be saved in.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-server <server_url>
Base URL of the replication server. Default: ‘\fI\%https://planet.osm.org/replication/hour/\fP’ (hourly diffs from osm.org).
.UNINDENT
.INDENT 0.0
.TP
.B \-s <size>, \-\-size <size>
Maximum size of change to apply at once in MB. Default: 1GB.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-tmpdir <tmpdir>
Directory to use for temporary files. Default: directory of input file
.UNINDENT
.INDENT 0.0
.TP
.B \-\-ignore\-osmosis\-headers
Ignore potential replication information in the header of the input file and search for the newest OSM object in the file instead.
.UNINDENT
.INDENT 0.0
.TP
.B \-b <wind_back>, \-\-wind\-back <wind_back>
Number of minutes to start downloading before the newest addition to input data. (Ignored when the file contains a sequence ID.) Default: 60.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-force\-update\-of\-old\-planet
Apply update even if the input data is really old.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cookie <cookie>
Netscape\-style cookie jar file to read cookies from and where
received cookies will be written to.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-socket\-timeout <socket_timeout>
Set timeout for file downloads.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-version
show program’s version number and exit
.UNINDENT
.SH AUTHOR
Sarah Hoffmann
.SH COPYRIGHT
2015-2020, Sarah Hoffmann
.\" Generated by docutils manpage writer.
.
4 changes: 4 additions & 0 deletions site-html/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 53190cda3a26b8321aba70b66193a9ce
tags: 645f666f9bcd5a90fca523b33c5a78b7
24 changes: 24 additions & 0 deletions site-html/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
.. Pyosmium documentation master file, created by
sphinx-quickstart on Tue Mar 10 18:09:49 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Pyosmium's documentation!
====================================

Pyosmium is a library to process OSM files in different formats. It is
a wrapper of the C++ library `osmium <http://osmcode.org/libosmium/>`_
and allows fast and efficent sequential processing of OpenStreetMap data.

.. toctree::
:maxdepth: 2

intro
reference
tools
troubleshooting


* :ref:`genindex`
* :ref:`search`

Loading

0 comments on commit 0a4ea17

Please sign in to comment.