summaryrefslogtreecommitdiff
path: root/localosmfeature2pdf
blob: 64a89e0aa997082f7b8387bea0e1ff9b347b9e7b (plain)
  1. #!/bin/sh
  2. #
  3. # Copyright © 2014 Jonas Smedegaard <dr@jones.dk>
  4. # Description: resolve GeoJSON from OSM node, way and relation objects.
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3, or (at your option)
  9. # any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. # Depends: gdal-bin perl-modules
  20. set -eu
  21. # type must be either polygons, lines or points
  22. type="$1"
  23. feature="$2"
  24. outstem="${3:-$(basename "$feature")}"
  25. case "$feature" in
  26. node/*)
  27. url="http://www.openstreetmap.org/api/0.6/$feature"
  28. ;;
  29. *)
  30. url="http://www.openstreetmap.org/api/0.6/$feature/full"
  31. ;;
  32. esac
  33. case "$type" in
  34. polygons)
  35. ogr2ogr -t_srs EPSG:3857 -f PDF \
  36. "$outstem.pdf" /vsicurl_streaming/"$url" \
  37. --config OSM_USE_CUSTOM_INDEXING NO \
  38. -nlt PROMOTE_TO_MULTI multipolygons
  39. ;;
  40. lines)
  41. ogr2ogr -t_srs EPSG:3857 -f PDF \
  42. "$outstem.pdf" /vsicurl_streaming/"$url" \
  43. --config OSM_USE_CUSTOM_INDEXING NO \
  44. -nlt PROMOTE_TO_MULTI multilinestrings
  45. ;;
  46. points)
  47. ogr2ogr -t_srs EPSG:3857 -f PDF \
  48. "$outstem.pdf" /vsicurl_streaming/"$url" \
  49. --config OSM_USE_CUSTOM_INDEXING NO \
  50. points \
  51. ;;
  52. esac
t'>0
-rw-r--r--tags/a7/e1/20150207163734.GA5029@local.schweer-online.de/debian0
-rw-r--r--tags/a7/e1/20150207163734.GA5029@local.schweer-online.de/signed0
-rw-r--r--tags/a7/e1/20150207163734.GA5029@local.schweer-online.de/unread0
-rw-r--r--tags/a7/e1/20180502070002.6D999927C@lxp5.free-owl.de/sys0
-rw-r--r--tags/a7/e1/20180502070002.6D999927C@lxp5.free-owl.de/unread0
-rw-r--r--tags/a7/e1/20210804215209.GA21681@seger.debian.org/debian0
-rw-r--r--tags/a7/e1/20210804215209.GA21681@seger.debian.org/unread0
-rw-r--r--tags/a7/e1/20220730041716.goomizqp23rwp6lp@blacktop.localdomain/debian0
-rw-r--r--tags/a7/e1/252db07216a479fecbc5786aa377ad06@async.facebook.com/inbox0
-rw-r--r--tags/a7/e1/252db07216a479fecbc5786aa377ad06@async.facebook.com/old0
-rw-r--r--tags/a7/e1/510892A1.9030407@gmail.com/debian0
-rw-r--r--tags/a7/e1/56C4547E.1080905@unibas.ch/inbox0
-rw-r--r--tags/a7/e1/56C4547E.1080905@unibas.ch/old0
-rw-r--r--tags/a7/e1/BN6PR05MB3474EF981F1D8F9087E16F99D9C00@BN6PR05MB3474.namprd05.prod.outlook.com/inbox0
-rw-r--r--tags/a7/e1/BN6PR05MB3474EF981F1D8F9087E16F99D9C00@BN6PR05MB3474.namprd05.prod.outlook.com/old0
-rw-r--r--tags/a7/e1/CAApBw354HyAiHVqOAM6py5jifvdaSROMpoeQcBuhsPC7N4ZqVg@mail.gmail.com/replied0
-rw-r--r--tags/a7/e1/CAApBw354HyAiHVqOAM6py5jifvdaSROMpoeQcBuhsPC7N4ZqVg@mail.gmail.com/unread0
-rw-r--r--tags/a7/e1/E1kXCwd-000IdD-38@fasolo.debian.org/debian0
-rw-r--r--tags/a7/e1/E1kXCwd-000IdD-38@fasolo.debian.org/inbox0
-rw-r--r--tags/a7/e1/E1kXCwd-000IdD-38@fasolo.debian.org/killed0
-rw-r--r--tags/a7/e1/E1kXCwd-000IdD-38@fasolo.debian.org/unread0
-rw-r--r--tags/a7/e1/E1nlXGM-0003hL-Jq@usper.debian.org/debian0
-rw-r--r--tags/a7/e1/E1nlXGM-0003hL-Jq@usper.debian.org/inbox0
-rw-r--r--tags/a7/e1/E1nlXGM-0003hL-Jq@usper.debian.org/killed0
-rw-r--r--tags/a7/e1/E1nlXGM-0003hL-Jq@usper.debian.org/unread0
-rw-r--r--tags/a7/e1/Pine.LNX.4.61.0411240711450.895@wr-linux02/debian0
-rw-r--r--tags/a7/e1/atomicdata-dev%2fatomic-data-docs%2fissues%2f130%2f1210553487@github.com/unread0
-rw-r--r--tags/a7/e1/mailman.32.1600782538.1679.kpt9@lists.homebase.dk/hb0
-rw-r--r--tags/a7/e1/mailman.32.1600782538.1679.kpt9@lists.homebase.dk/inbox0
-rw-r--r--tags/a7/e1/mailman.32.1600782538.1679.kpt9@lists.homebase.dk/killed0
-rw-r--r--tags/a7/e1/mailman.32.1600782538.1679.kpt9@lists.homebase.dk/unread0
38 files changed, 0 insertions, 0 deletions