├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── Makefile ├── README.html ├── README.md ├── __init__.py ├── assets ├── addrs_centroids.qml ├── addrs_centroids2.qml ├── buildings.qml ├── crossings.qml ├── exclusion_zones.qml ├── kerbs.qml ├── logos │ ├── logos.png │ └── sidewalkreator_logo.png ├── polygonstyles.qml ├── qgis_projects │ ├── about_for_labeling.md │ ├── color_schema.png │ ├── for_labeling.gpkg │ └── highway_color_setting.qgz ├── road_intersections.qml ├── roads_p1.qml ├── roads_p2_main.qml ├── roads_p3.qml ├── sidewalkstyles.qml └── sure_zones.qml ├── dependencies ├── about.md ├── osm2geojson-0.1.33-py3-none-any.whl └── osm2geojson-LICENSE ├── generic_functions.py ├── help ├── Makefile ├── make.bat └── source │ ├── conf.py │ └── index.rst ├── i18n └── af.ts ├── icon.png ├── metadata.txt ├── notes ├── commands └── findings.md ├── osm_fetch.py ├── osm_sidewalkreator.py ├── osm_sidewalkreator_dialog.py ├── osm_sidewalkreator_dialog_base.ui ├── paper_publication ├── about.md └── extras │ └── data │ ├── backup │ ├── first_importing_1652929108 │ │ ├── auxiliary_files │ │ │ ├── crossing_centers_voronois.geojson │ │ │ ├── inner_crossings.geojson │ │ │ ├── input_polygon.geojson │ │ │ ├── parameters_dump.json │ │ │ ├── protoblocks.geojson │ │ │ ├── raw_buffers.geojson │ │ │ └── voronois.geojson │ │ ├── changeset_comment.txt │ │ ├── modified_sidewalks.geojson │ │ ├── modified_sidewalks_B.geojson │ │ ├── overpass_kerbs.txt │ │ ├── overpass_sidewalks.txt │ │ └── sidewalkreator_output.geojson │ └── jun11_2022 │ │ ├── crossings.geojson │ │ ├── kerbs.geojson │ │ └── sidewalks.geojson │ ├── crossings.geojson │ ├── getting_data.py │ ├── kerbs.geojson │ └── sidewalks.geojson ├── parameters.py ├── pb_tool.cfg ├── plugin_upload.py ├── pylintrc ├── release ├── deprecated │ └── create_filelist.py └── release_zip.py ├── requeriments.txt ├── resources.py ├── resources.qrc ├── scripts ├── compile-strings.sh ├── run-env-linux.sh └── update-strings.sh ├── test ├── __init__.py ├── extra_tests │ ├── polygon01.geojson │ └── sandbox.py ├── qgis_interface.py ├── tenbytenraster.asc ├── tenbytenraster.asc.aux.xml ├── tenbytenraster.keywords ├── tenbytenraster.lic ├── tenbytenraster.prj ├── tenbytenraster.qml ├── test_init.py ├── test_osm_sidewalkreator_dialog.py ├── test_qgis_environment.py ├── test_resources.py ├── test_translations.py └── utilities.py └── trash └── code_trash /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: kauevestena 2 | patreon: kauevestena 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | pip-wheel-metadata/ 24 | share/python-wheels/ 25 | *.egg-info/ 26 | .installed.cfg 27 | *.egg 28 | MANIFEST 29 | 30 | # PyInstaller 31 | # Usually these files are written by a python script from a template 32 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 33 | *.manifest 34 | *.spec 35 | 36 | # Installer logs 37 | pip-log.txt 38 | pip-delete-this-directory.txt 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .nox/ 44 | .coverage 45 | .coverage.* 46 | .cache 47 | nosetests.xml 48 | coverage.xml 49 | *.cover 50 | *.py,cover 51 | .hypothesis/ 52 | .pytest_cache/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | target/ 76 | 77 | # Jupyter Notebook 78 | .ipynb_checkpoints 79 | 80 | # IPython 81 | profile_default/ 82 | ipython_config.py 83 | 84 | # pyenv 85 | .python-version 86 | 87 | # pipenv 88 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 89 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 90 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 91 | # install all needed dependencies. 92 | #Pipfile.lock 93 | 94 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 95 | __pypackages__/ 96 | 97 | # Celery stuff 98 | celerybeat-schedule 99 | celerybeat.pid 100 | 101 | # SageMath parsed files 102 | *.sage.py 103 | 104 | # Environments 105 | .env 106 | .venv 107 | env/ 108 | venv/ 109 | ENV/ 110 | env.bak/ 111 | venv.bak/ 112 | 113 | # Spyder project settings 114 | .spyderproject 115 | .spyproject 116 | 117 | # Rope project settings 118 | .ropeproject 119 | 120 | # mkdocs documentation 121 | /site 122 | 123 | # mypy 124 | .mypy_cache/ 125 | .dmypy.json 126 | dmypy.json 127 | 128 | # Pyre type checker 129 | .pyre/ 130 | 131 | 132 | ############# VSCODE: 133 | # Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode 134 | # Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode 135 | 136 | ### VisualStudioCode ### 137 | .vscode/* 138 | !.vscode/settings.json 139 | !.vscode/tasks.json 140 | !.vscode/launch.json 141 | !.vscode/extensions.json 142 | *.code-workspace 143 | 144 | # Local History for Visual Studio Code 145 | .history/ 146 | 147 | ### VisualStudioCode Patch ### 148 | # Ignore all local history of files 149 | .history 150 | .ionide 151 | 152 | # Support for Project snippet scope 153 | !.vscode/*.code-snippets 154 | 155 | # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode 156 | 157 | # TEMPORARY FILES 158 | temporary/* 159 | 160 | # REPORTS: 161 | reports/* 162 | 163 | tests.py 164 | 165 | # gpkg temps 166 | *.gpkg-shm 167 | *.gpkg-wal 168 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # sidewalkreator 3 | # 4 | # Plugin designated to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets, given a bounding polygon, outputting to JOSM format. It is mostly intended for acessibility Mapping. 5 | # ------------------- 6 | # begin : 2021-09-29 7 | # git sha : $Format:%H$ 8 | # copyright : (C) 2021 by Kaue de Moraes Vestena 9 | # email : kauemv2@gmail.com 10 | # ***************************************************************************/ 11 | # 12 | #/*************************************************************************** 13 | # * * 14 | # * This program is free software; you can redistribute it and/or modify * 15 | # * it under the terms of the GNU General Public License as published by * 16 | # * the Free Software Foundation; either version 2 of the License, or * 17 | # * (at your option) any later version. * 18 | # * * 19 | # ***************************************************************************/ 20 | 21 | ################################################# 22 | # Edit the following to match your sources lists 23 | ################################################# 24 | 25 | 26 | #Add iso code for any locales you want to support here (space separated) 27 | # default is no locales 28 | # LOCALES = af 29 | LOCALES = 30 | 31 | # If locales are enabled, set the name of the lrelease binary on your system. If 32 | # you have trouble compiling the translations, you may have to specify the full path to 33 | # lrelease 34 | #LRELEASE = lrelease 35 | #LRELEASE = lrelease-qt4 36 | 37 | 38 | # translation 39 | SOURCES = \ 40 | __init__.py \ 41 | osm_sidewalkreator.py osm_sidewalkreator_dialog.py 42 | 43 | PLUGINNAME = osm_sidewalkreator 44 | 45 | PY_FILES = \ 46 | __init__.py \ 47 | osm_sidewalkreator.py osm_sidewalkreator_dialog.py 48 | 49 | UI_FILES = osm_sidewalkreator_dialog_base.ui 50 | 51 | EXTRAS = metadata.txt icon.png 52 | 53 | EXTRA_DIRS = 54 | 55 | COMPILED_RESOURCE_FILES = resources.py 56 | 57 | PEP8EXCLUDE=pydev,resources.py,conf.py,third_party,ui 58 | 59 | # QGISDIR points to the location where your plugin should be installed. 60 | # This varies by platform, relative to your HOME directory: 61 | # * Linux: 62 | # .local/share/QGIS/QGIS3/profiles/default/python/plugins/ 63 | # * Mac OS X: 64 | # Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins 65 | # * Windows: 66 | # AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins' 67 | 68 | QGISDIR=/home/kaue/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ 69 | 70 | ################################################# 71 | # Normally you would not need to edit below here 72 | ################################################# 73 | 74 | HELP = help/build/html 75 | 76 | PLUGIN_UPLOAD = $(c)/plugin_upload.py 77 | 78 | RESOURCE_SRC=$(shell grep '^ *@@g;s/.*>//g' | tr '\n' ' ') 79 | 80 | .PHONY: default 81 | default: 82 | @echo While you can use make to build and deploy your plugin, pb_tool 83 | @echo is a much better solution. 84 | @echo A Python script, pb_tool provides platform independent management of 85 | @echo your plugins and runs anywhere. 86 | @echo You can install pb_tool using: pip install pb_tool 87 | @echo See https://g-sherman.github.io/plugin_build_tool/ for info. 88 | 89 | compile: $(COMPILED_RESOURCE_FILES) 90 | 91 | %.py : %.qrc $(RESOURCES_SRC) 92 | pyrcc5 -o $*.py $< 93 | 94 | %.qm : %.ts 95 | $(LRELEASE) $< 96 | 97 | test: compile transcompile 98 | @echo 99 | @echo "----------------------" 100 | @echo "Regression Test Suite" 101 | @echo "----------------------" 102 | 103 | @# Preceding dash means that make will continue in case of errors 104 | @-export PYTHONPATH=`pwd`:$(PYTHONPATH); \ 105 | export QGIS_DEBUG=0; \ 106 | export QGIS_LOG_FILE=/dev/null; \ 107 | nosetests -v --with-id --with-coverage --cover-package=. \ 108 | 3>&1 1>&2 2>&3 3>&- || true 109 | @echo "----------------------" 110 | @echo "If you get a 'no module named qgis.core error, try sourcing" 111 | @echo "the helper script we have provided first then run make test." 112 | @echo "e.g. source run-env-linux.sh ; make test" 113 | @echo "----------------------" 114 | 115 | deploy: compile doc transcompile 116 | @echo 117 | @echo "------------------------------------------" 118 | @echo "Deploying plugin to your .qgis2 directory." 119 | @echo "------------------------------------------" 120 | # The deploy target only works on unix like operating system where 121 | # the Python plugin directory is located at: 122 | # $HOME/$(QGISDIR)/python/plugins 123 | mkdir -p $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 124 | cp -vf $(PY_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 125 | cp -vf $(UI_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 126 | cp -vf $(COMPILED_RESOURCE_FILES) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 127 | cp -vf $(EXTRAS) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 128 | cp -vfr i18n $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 129 | cp -vfr $(HELP) $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME)/help 130 | # Copy extra directories if any 131 | (foreach EXTRA_DIR,(EXTRA_DIRS), cp -R (EXTRA_DIR) (HOME)/(QGISDIR)/python/plugins/(PLUGINNAME)/;) 132 | 133 | 134 | # The dclean target removes compiled python files from plugin directory 135 | # also deletes any .git entry 136 | dclean: 137 | @echo 138 | @echo "-----------------------------------" 139 | @echo "Removing any compiled python files." 140 | @echo "-----------------------------------" 141 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname "*.pyc" -delete 142 | find $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) -iname ".git" -prune -exec rm -Rf {} \; 143 | 144 | 145 | derase: 146 | @echo 147 | @echo "-------------------------" 148 | @echo "Removing deployed plugin." 149 | @echo "-------------------------" 150 | rm -Rf $(HOME)/$(QGISDIR)/python/plugins/$(PLUGINNAME) 151 | 152 | zip: deploy dclean 153 | @echo 154 | @echo "---------------------------" 155 | @echo "Creating plugin zip bundle." 156 | @echo "---------------------------" 157 | # The zip target deploys the plugin and creates a zip file with the deployed 158 | # content. You can then upload the zip file on http://plugins.qgis.org 159 | rm -f $(PLUGINNAME).zip 160 | cd $(HOME)/$(QGISDIR)/python/plugins; zip -9r $(CURDIR)/$(PLUGINNAME).zip $(PLUGINNAME) 161 | 162 | package: compile 163 | # Create a zip package of the plugin named $(PLUGINNAME).zip. 164 | # This requires use of git (your plugin development directory must be a 165 | # git repository). 166 | # To use, pass a valid commit or tag as follows: 167 | # make package VERSION=Version_0.3.2 168 | @echo 169 | @echo "------------------------------------" 170 | @echo "Exporting plugin to zip package. " 171 | @echo "------------------------------------" 172 | rm -f $(PLUGINNAME).zip 173 | git archive --prefix=$(PLUGINNAME)/ -o $(PLUGINNAME).zip $(VERSION) 174 | echo "Created package: $(PLUGINNAME).zip" 175 | 176 | upload: zip 177 | @echo 178 | @echo "-------------------------------------" 179 | @echo "Uploading plugin to QGIS Plugin repo." 180 | @echo "-------------------------------------" 181 | $(PLUGIN_UPLOAD) $(PLUGINNAME).zip 182 | 183 | transup: 184 | @echo 185 | @echo "------------------------------------------------" 186 | @echo "Updating translation files with any new strings." 187 | @echo "------------------------------------------------" 188 | @chmod +x scripts/update-strings.sh 189 | @scripts/update-strings.sh $(LOCALES) 190 | 191 | transcompile: 192 | @echo 193 | @echo "----------------------------------------" 194 | @echo "Compiled translation files to .qm files." 195 | @echo "----------------------------------------" 196 | @chmod +x scripts/compile-strings.sh 197 | @scripts/compile-strings.sh $(LRELEASE) $(LOCALES) 198 | 199 | transclean: 200 | @echo 201 | @echo "------------------------------------" 202 | @echo "Removing compiled translation files." 203 | @echo "------------------------------------" 204 | rm -f i18n/*.qm 205 | 206 | clean: 207 | @echo 208 | @echo "------------------------------------" 209 | @echo "Removing uic and rcc generated files" 210 | @echo "------------------------------------" 211 | rm $(COMPILED_UI_FILES) $(COMPILED_RESOURCE_FILES) 212 | 213 | doc: 214 | @echo 215 | @echo "------------------------------------" 216 | @echo "Building documentation using sphinx." 217 | @echo "------------------------------------" 218 | cd help; make html 219 | 220 | pylint: 221 | @echo 222 | @echo "-----------------" 223 | @echo "Pylint violations" 224 | @echo "-----------------" 225 | @pylint --reports=n --rcfile=pylintrc . || true 226 | @echo 227 | @echo "----------------------" 228 | @echo "If you get a 'no module named qgis.core' error, try sourcing" 229 | @echo "the helper script we have provided first then run make pylint." 230 | @echo "e.g. source run-env-linux.sh ; make pylint" 231 | @echo "----------------------" 232 | 233 | 234 | # Run pep8 style checking 235 | #http://pypi.python.org/pypi/pep8 236 | pep8: 237 | @echo 238 | @echo "-----------" 239 | @echo "PEP8 issues" 240 | @echo "-----------" 241 | @pep8 --repeat --ignore=E203,E121,E122,E123,E124,E125,E126,E127,E128 --exclude $(PEP8EXCLUDE) . || true 242 | @echo "-----------" 243 | @echo "Ignored in PEP8 check:" 244 | @echo $(PEP8EXCLUDE) 245 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Plugin Builder Results

4 | 5 | Congratulations! You just built a plugin for QGIS!

6 | 7 |
8 | Your plugin sidewalkreator was created in:
9 |   /home/kaue/osm_sidewalkreator 10 |

11 | Your QGIS plugin directory is located at:
12 |   /home/kaue/.local/share/QGIS/QGIS3/profiles/default/python/plugins 13 |

14 |

What's Next

15 |
    16 |
  1. If resources.py is not present in your plugin directory, compile the resources file using pyrcc5 (simply use pb_tool or make if you have automake) 17 |
  2. Optionally, test the generated sources using make test (or run tests from your IDE) 18 |
  3. Copy the entire directory containing your new plugin to the QGIS plugin directory (see Notes below) 19 |
  4. Test the plugin by enabling it in the QGIS plugin manager 20 |
  5. Customize it by editing the implementation file osm_sidewalkreator.py 21 |
  6. Create your own custom icon, replacing the default icon.png 22 |
  7. Modify your user interface by opening osm_sidewalkreator_dialog_base.ui in Qt Designer 23 |
24 | Notes: 25 |
    26 |
  • You can use pb_tool to compile, deploy, and manage your plugin. Tweak the pb_tool.cfg file included with your plugin as you add files. Install pb_tool using 27 | pip or easy_install. See http://loc8.cc/pb_tool for more information. 28 |
  • You can also use the Makefile to compile and deploy when you 29 | make changes. This requires GNU make (gmake). The Makefile is ready to use, however you 30 | will have to edit it to add addional Python source files, dialogs, and translations. 31 |
32 |
33 |
34 |

35 | For information on writing PyQGIS code, see http://loc8.cc/pyqgis_resources for a list of resources. 36 |

37 |
38 |

39 | ©2011-2019 GeoApt LLC - geoapt.com 40 |

41 | 42 | 43 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OSM SIDEWALKREATOR 2 | 3 | [A Qgis plugin, officialy available at the official Plugin Repository!](https://plugins.qgis.org/plugins/osm_sidewalkreator/) 4 | 5 | 6 | Image 7 | 8 | 9 | ## Scientific Publication is now Available!! 10 | 11 | [Since 12/12/2023, in the European Journal of Geography:](https://eurogeojournal.eu/index.php/egj/article/view/553) 12 | 13 | > de Moraes Vestena, Kauê, Silvana Philippi Camboim, and Daniel Rodrigues dos Santos. 2023. “OSM Sidewalkreator: A QGIS Plugin for an Automated Drawing of Sidewalk Networks for OpenStreetMap”. European Journal of Geography 14 (4):66-84. https://doi.org/10.48088/ejg.k.ves.14.4.066.084. 14 | 15 | The experiments for the publication were carried out in a separate repository: https://github.com/kauevestena/sidewalk_analysis 16 | 17 | ## Article on OSM Wiki: 18 | 19 | Please check it at: https://wiki.openstreetmap.org/wiki/OSM_SidewalKreator 20 | 21 | The wiki will speak about the workflow in a deep level of detail (still in progress). 22 | 23 | ## Presented at State of the Map 2022! 24 | Abstract at the proceedings: https://zenodo.org/record/7004523 25 | 26 | [Presentation slides](https://rebrand.ly/kauevestena_sotm22) 27 | 28 | [Recording](https://www.youtube.com/watch?v=B--1ge42UHY) 29 | 30 | ## sidewalkreator 31 | Plugin designated to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets. 32 | 33 | 34 | [there's a tutorial with the basics on youtube:](https://www.youtube.com/watch?v=jq-K3Ixx0IM) 35 | 36 | [and a mute video about the first importing at JOSM](https://www.youtube.com/watch?v=Apqdb73lNvY) 37 | 38 | The summary of what the plugin does is what follows: 39 | 40 | - Download and prepare the data (highways and optionally buildings) for a polygon of interest; 41 | - Provide some tools for highway selection and sidewalk parametrization; 42 | - Effectively draw the sidewalks 43 | - Draw the crossings (as sidewalks are required to be integrated to other highways in order to do routing) and kerb-crossing points (where the access ramp information may be filled) 44 | - Split sidewalk geometries into segments (including the option to not split at all), since in Brazil, and some other places, is very common that in front of each house there's a completely different sidewalk in comparison to the adjacent neighbors 😥. 45 | - Export the generated sidewalks, crossings and kerb points to a JOSM ready format, where all the importing into OSM shall be done. 46 | 47 | It is mostly intended for Acessibility Mapping. 48 | 49 | Though the data was generated thinking on the usage for OSM, one may use it for pedestrian network analysis out-of-the-box, or even for other purposes inside or outside QGIS. 50 | 51 | ## Known Issues: 52 | 53 | The only dependency (osm2geojson) have shapely as dependency, but sadly it doesn't come bundled with QGIS, 54 | so you can install it manually with: 55 | 56 | -m pip install shapely 57 | 58 | ### For Flatpak QGIS: 59 | 60 | 1) Open the flatpak shell for the qgis package: 61 | 62 | 63 | flatpak run --command=sh org.qgis.qgis 64 | 65 | 3) Within the shell, type: 66 | 67 | 68 | curl https://bootstrap.pypa.io/pip/pip.pyz -o pip.pyz 69 | 70 | 5) Install shapely: 71 | 72 | 73 | python3 pip.pyz install shapely 74 | 75 | In a future release, from [this branch]([https://eurogeojournal.eu/index.php/egj/article/view/553](https://github.com/kauevestena/osm_sidewalkreator/tree/remove_dependencies)) this dependency shall be removed. 76 | 77 | -------------------------------------------------------------------------------- /__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | sidewalkreator 5 | A QGIS plugin 6 | Plugin conceived to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets, given a bounding polygon, outputting to JOSM format. It is mostly intended for acessibility Mapping. 7 | Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ 8 | ------------------- 9 | begin : 2021-09-29 10 | copyright : (C) 2021 by Kaue de Moraes Vestena 11 | email : kauemv2@gmail.com 12 | git sha : $Format:%H$ 13 | ***************************************************************************/ 14 | 15 | /*************************************************************************** 16 | * * 17 | * This program is free software; you can redistribute it and/or modify * 18 | * it under the terms of the GNU General Public License as published by * 19 | * the Free Software Foundation; either version 2 of the License, or * 20 | * (at your option) any later version. * 21 | * * 22 | ***************************************************************************/ 23 | This script initializes the plugin, making it known to QGIS. 24 | """ 25 | 26 | 27 | # noinspection PyPep8Naming 28 | def classFactory(iface): # pylint: disable=invalid-name 29 | """Load sidewalkreator class from file sidewalkreator. 30 | 31 | :param iface: A QGIS interface instance. 32 | :type iface: QgsInterface 33 | """ 34 | # 35 | from .osm_sidewalkreator import sidewalkreator 36 | return sidewalkreator(iface) 37 | -------------------------------------------------------------------------------- /assets/addrs_centroids.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 0 68 | 0 69 | 0 70 | 71 | -------------------------------------------------------------------------------- /assets/addrs_centroids2.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 0 49 | 0 50 | 0 51 | 52 | -------------------------------------------------------------------------------- /assets/buildings.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 2 43 | 44 | -------------------------------------------------------------------------------- /assets/crossings.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 0 84 | 0 85 | 1 86 | 87 | -------------------------------------------------------------------------------- /assets/exclusion_zones.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 0 52 | 0 53 | 2 54 | 55 | -------------------------------------------------------------------------------- /assets/kerbs.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 60 | 61 | 62 | 63 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 0 117 | 0 118 | 0 119 | 120 | -------------------------------------------------------------------------------- /assets/logos/logos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/assets/logos/logos.png -------------------------------------------------------------------------------- /assets/logos/sidewalkreator_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/assets/logos/sidewalkreator_logo.png -------------------------------------------------------------------------------- /assets/polygonstyles.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 2 43 | 44 | -------------------------------------------------------------------------------- /assets/qgis_projects/about_for_labeling.md: -------------------------------------------------------------------------------- 1 | This is for the style of the objects with the "higway" key, used as base to drawn the geometries. 2 | 3 | Basic used colorschemas were this two (both from the amazing Colorbrewer 2.0): 4 | 5 | https://colorbrewer2.org/#type=sequential&scheme=YlGnBu&n=9 (For car roads) 6 | https://colorbrewer2.org/#type=sequential&scheme=YlOrRd&n=9 (For footways) 7 | 8 | https://colorbrewer2.org/#type=sequential&scheme=RdPu&n=9 (just the pink for cycleways) 9 | 10 | depiction of current color schema (someday it will be prettier and better organized): 11 | 12 | ![color_schema](color_schema.png) 13 | 14 | Ruleset: 15 | 16 | - Car roads: YlGnBu scale, links with 80% transparency 17 | - Footways: YlOrRd scale, but centered on red for footwats 18 | - Living streets as purple, the "mix of car roads and footways" 19 | - highway=road: brown, since it could be anything 20 | - Service roads: light orange from YlOrRd 21 | - Cycleways: Pink 22 | - Construction/planned: dashed grays 23 | - Irrelevant ones: gray 24 | - Other values: a strange "olive", since we don't know anything in advance 25 | - Wrong values: white, since surely they must had other values -------------------------------------------------------------------------------- /assets/qgis_projects/color_schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/assets/qgis_projects/color_schema.png -------------------------------------------------------------------------------- /assets/qgis_projects/for_labeling.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/assets/qgis_projects/for_labeling.gpkg -------------------------------------------------------------------------------- /assets/qgis_projects/highway_color_setting.qgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/assets/qgis_projects/highway_color_setting.qgz -------------------------------------------------------------------------------- /assets/road_intersections.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 35 | 36 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 0 49 | 0 50 | 0 51 | 52 | -------------------------------------------------------------------------------- /assets/roads_p3.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 43 | 44 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 0 57 | 0 58 | 1 59 | 60 | -------------------------------------------------------------------------------- /assets/sidewalkstyles.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 0 84 | 0 85 | 1 86 | 87 | -------------------------------------------------------------------------------- /assets/sure_zones.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | 14 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 0 41 | 0 42 | 2 43 | 44 | -------------------------------------------------------------------------------- /dependencies/about.md: -------------------------------------------------------------------------------- 1 | packaged from *osm2geojson* repo (https://github.com/aspectumapp/osm2geojson) using instructions from: 2 | 3 | 4 | https://realpython.com/pypi-publish-python-package/ 5 | 6 | generally: 7 | 8 | python setup.py sdist bdist_wheel 9 | 10 | I have used "python3" instead, at the main directory 11 | 12 | I have hardcoded dependencies from osm2geojson, that are: 13 | 14 | https://github.com/ideditor/id-area-keys/tree/446d771e6794fcc6091215f5849088b018289f74 (ISC Licence) 15 | 16 | https://github.com/tyrasd/osm-polygon-features/tree/65e0a1e290675877e8cdd007efcefc35a7dfe0dc (CC0-1.0-License) 17 | 18 | you can also try to install it before the plugin installation using: 19 | 20 | -m pip install osm2geojson 21 | 22 | # thank you all osm2geojson authors: https://github.com/aspectumapp/osm2geojson/graphs/contributors 23 | -------------------------------------------------------------------------------- /dependencies/osm2geojson-0.1.33-py3-none-any.whl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/dependencies/osm2geojson-0.1.33-py3-none-any.whl -------------------------------------------------------------------------------- /dependencies/osm2geojson-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2019 Parfeniuk Mykola 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /help/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/template_class.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/template_class.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/template_class" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/template_class" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /help/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source 10 | if NOT "%PAPER%" == "" ( 11 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 12 | ) 13 | 14 | if "%1" == "" goto help 15 | 16 | if "%1" == "help" ( 17 | :help 18 | echo.Please use `make ^` where ^ is one of 19 | echo. html to make standalone HTML files 20 | echo. dirhtml to make HTML files named index.html in directories 21 | echo. singlehtml to make a single large HTML file 22 | echo. pickle to make pickle files 23 | echo. json to make JSON files 24 | echo. htmlhelp to make HTML files and a HTML help project 25 | echo. qthelp to make HTML files and a qthelp project 26 | echo. devhelp to make HTML files and a Devhelp project 27 | echo. epub to make an epub 28 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 29 | echo. text to make text files 30 | echo. man to make manual pages 31 | echo. changes to make an overview over all changed/added/deprecated items 32 | echo. linkcheck to check all external links for integrity 33 | echo. doctest to run all doctests embedded in the documentation if enabled 34 | goto end 35 | ) 36 | 37 | if "%1" == "clean" ( 38 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 39 | del /q /s %BUILDDIR%\* 40 | goto end 41 | ) 42 | 43 | if "%1" == "html" ( 44 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 45 | echo. 46 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 47 | goto end 48 | ) 49 | 50 | if "%1" == "dirhtml" ( 51 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 52 | echo. 53 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 54 | goto end 55 | ) 56 | 57 | if "%1" == "singlehtml" ( 58 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 59 | echo. 60 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 61 | goto end 62 | ) 63 | 64 | if "%1" == "pickle" ( 65 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 66 | echo. 67 | echo.Build finished; now you can process the pickle files. 68 | goto end 69 | ) 70 | 71 | if "%1" == "json" ( 72 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 73 | echo. 74 | echo.Build finished; now you can process the JSON files. 75 | goto end 76 | ) 77 | 78 | if "%1" == "htmlhelp" ( 79 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 80 | echo. 81 | echo.Build finished; now you can run HTML Help Workshop with the ^ 82 | .hhp project file in %BUILDDIR%/htmlhelp. 83 | goto end 84 | ) 85 | 86 | if "%1" == "qthelp" ( 87 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 88 | echo. 89 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 90 | .qhcp project file in %BUILDDIR%/qthelp, like this: 91 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\template_class.qhcp 92 | echo.To view the help file: 93 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\template_class.ghc 94 | goto end 95 | ) 96 | 97 | if "%1" == "devhelp" ( 98 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 99 | echo. 100 | echo.Build finished. 101 | goto end 102 | ) 103 | 104 | if "%1" == "epub" ( 105 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 106 | echo. 107 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 108 | goto end 109 | ) 110 | 111 | if "%1" == "latex" ( 112 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 113 | echo. 114 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 115 | goto end 116 | ) 117 | 118 | if "%1" == "text" ( 119 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 120 | echo. 121 | echo.Build finished. The text files are in %BUILDDIR%/text. 122 | goto end 123 | ) 124 | 125 | if "%1" == "man" ( 126 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 127 | echo. 128 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 129 | goto end 130 | ) 131 | 132 | if "%1" == "changes" ( 133 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 134 | echo. 135 | echo.The overview file is in %BUILDDIR%/changes. 136 | goto end 137 | ) 138 | 139 | if "%1" == "linkcheck" ( 140 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 141 | echo. 142 | echo.Link check complete; look for any errors in the above output ^ 143 | or in %BUILDDIR%/linkcheck/output.txt. 144 | goto end 145 | ) 146 | 147 | if "%1" == "doctest" ( 148 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 149 | echo. 150 | echo.Testing of doctests in the sources finished, look at the ^ 151 | results in %BUILDDIR%/doctest/output.txt. 152 | goto end 153 | ) 154 | 155 | :end 156 | -------------------------------------------------------------------------------- /help/source/conf.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # sidewalkreator documentation build configuration file, created by 4 | # sphinx-quickstart on Sun Feb 12 17:11:03 2012. 5 | # 6 | # This file is execfile()d with the current directory set to its containing dir. 7 | # 8 | # Note that not all possible configuration values are present in this 9 | # autogenerated file. 10 | # 11 | # All configuration values have a default; values that are commented out 12 | # serve to show the default. 13 | 14 | import sys, os 15 | 16 | # If extensions (or modules to document with autodoc) are in another directory, 17 | # add these directories to sys.path here. If the directory is relative to the 18 | # documentation root, use os.path.abspath to make it absolute, like shown here. 19 | #sys.path.insert(0, os.path.abspath('.')) 20 | 21 | # -- General configuration ----------------------------------------------------- 22 | 23 | # If your documentation needs a minimal Sphinx version, state it here. 24 | #needs_sphinx = '1.0' 25 | 26 | # Add any Sphinx extension module names here, as strings. They can be extensions 27 | # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. 28 | extensions = ['sphinx.ext.todo', 'sphinx.ext.imgmath', 'sphinx.ext.viewcode'] 29 | 30 | # Add any paths that contain templates here, relative to this directory. 31 | templates_path = ['_templates'] 32 | 33 | # The suffix of source filenames. 34 | source_suffix = '.rst' 35 | 36 | # The encoding of source files. 37 | #source_encoding = 'utf-8-sig' 38 | 39 | # The master toctree document. 40 | master_doc = 'index' 41 | 42 | # General information about the project. 43 | project = u'sidewalkreator' 44 | copyright = u'2013, Kaue de Moraes Vestena' 45 | 46 | # The version info for the project you're documenting, acts as replacement for 47 | # |version| and |release|, also used in various other places throughout the 48 | # built documents. 49 | # 50 | # The short X.Y version. 51 | version = '0.1' 52 | # The full version, including alpha/beta/rc tags. 53 | release = '0.1' 54 | 55 | # The language for content autogenerated by Sphinx. Refer to documentation 56 | # for a list of supported languages. 57 | #language = None 58 | 59 | # There are two options for replacing |today|: either, you set today to some 60 | # non-false value, then it is used: 61 | #today = '' 62 | # Else, today_fmt is used as the format for a strftime call. 63 | #today_fmt = '%B %d, %Y' 64 | 65 | # List of patterns, relative to source directory, that match files and 66 | # directories to ignore when looking for source files. 67 | exclude_patterns = [] 68 | 69 | # The reST default role (used for this markup: `text`) to use for all documents. 70 | #default_role = None 71 | 72 | # If true, '()' will be appended to :func: etc. cross-reference text. 73 | #add_function_parentheses = True 74 | 75 | # If true, the current module name will be prepended to all description 76 | # unit titles (such as .. function::). 77 | #add_TemplateModuleNames = True 78 | 79 | # If true, sectionauthor and moduleauthor directives will be shown in the 80 | # output. They are ignored by default. 81 | #show_authors = False 82 | 83 | # The name of the Pygments (syntax highlighting) style to use. 84 | pygments_style = 'sphinx' 85 | 86 | # A list of ignored prefixes for module index sorting. 87 | #modindex_common_prefix = [] 88 | 89 | 90 | # -- Options for HTML output --------------------------------------------------- 91 | 92 | # The theme to use for HTML and HTML Help pages. See the documentation for 93 | # a list of builtin themes. 94 | html_theme = 'default' 95 | 96 | # Theme options are theme-specific and customize the look and feel of a theme 97 | # further. For a list of options available for each theme, see the 98 | # documentation. 99 | #html_theme_options = {} 100 | 101 | # Add any paths that contain custom themes here, relative to this directory. 102 | #html_theme_path = [] 103 | 104 | # The name for this set of Sphinx documents. If None, it defaults to 105 | # " v documentation". 106 | #html_title = None 107 | 108 | # A shorter title for the navigation bar. Default is the same as html_title. 109 | #html_short_title = None 110 | 111 | # The name of an image file (relative to this directory) to place at the top 112 | # of the sidebar. 113 | #html_logo = None 114 | 115 | # The name of an image file (within the static path) to use as favicon of the 116 | # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 117 | # pixels large. 118 | #html_favicon = None 119 | 120 | # Add any paths that contain custom static files (such as style sheets) here, 121 | # relative to this directory. They are copied after the builtin static files, 122 | # so a file named "default.css" will overwrite the builtin "default.css". 123 | html_static_path = ['_static'] 124 | 125 | # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, 126 | # using the given strftime format. 127 | #html_last_updated_fmt = '%b %d, %Y' 128 | 129 | # If true, SmartyPants will be used to convert quotes and dashes to 130 | # typographically correct entities. 131 | #html_use_smartypants = True 132 | 133 | # Custom sidebar templates, maps document names to template names. 134 | #html_sidebars = {} 135 | 136 | # Additional templates that should be rendered to pages, maps page names to 137 | # template names. 138 | #html_additional_pages = {} 139 | 140 | # If false, no module index is generated. 141 | #html_domain_indices = True 142 | 143 | # If false, no index is generated. 144 | #html_use_index = True 145 | 146 | # If true, the index is split into individual pages for each letter. 147 | #html_split_index = False 148 | 149 | # If true, links to the reST sources are added to the pages. 150 | #html_show_sourcelink = True 151 | 152 | # If true, "Created using Sphinx" is shown in the HTML footer. Default is True. 153 | #html_show_sphinx = True 154 | 155 | # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. 156 | #html_show_copyright = True 157 | 158 | # If true, an OpenSearch description file will be output, and all pages will 159 | # contain a tag referring to it. The value of this option must be the 160 | # base URL from which the finished HTML is served. 161 | #html_use_opensearch = '' 162 | 163 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 164 | #html_file_suffix = None 165 | 166 | # Output file base name for HTML help builder. 167 | htmlhelp_basename = 'TemplateClassdoc' 168 | 169 | 170 | # -- Options for LaTeX output -------------------------------------------------- 171 | 172 | # The paper size ('letter' or 'a4'). 173 | #latex_paper_size = 'letter' 174 | 175 | # The font size ('10pt', '11pt' or '12pt'). 176 | #latex_font_size = '10pt' 177 | 178 | # Grouping the document tree into LaTeX files. List of tuples 179 | # (source start file, target name, title, author, documentclass [howto/manual]). 180 | latex_documents = [ 181 | ('index', 'sidewalkreator.tex', u'sidewalkreator Documentation', 182 | u'Kaue de Moraes Vestena', 'manual'), 183 | ] 184 | 185 | # The name of an image file (relative to this directory) to place at the top of 186 | # the title page. 187 | #latex_logo = None 188 | 189 | # For "manual" documents, if this is true, then toplevel headings are parts, 190 | # not chapters. 191 | #latex_use_parts = False 192 | 193 | # If true, show page references after internal links. 194 | #latex_show_pagerefs = False 195 | 196 | # If true, show URL addresses after external links. 197 | #latex_show_urls = False 198 | 199 | # Additional stuff for the LaTeX preamble. 200 | #latex_preamble = '' 201 | 202 | # Documents to append as an appendix to all manuals. 203 | #latex_appendices = [] 204 | 205 | # If false, no module index is generated. 206 | #latex_domain_indices = True 207 | 208 | 209 | # -- Options for manual page output -------------------------------------------- 210 | 211 | # One entry per manual page. List of tuples 212 | # (source start file, name, description, authors, manual section). 213 | man_pages = [ 214 | ('index', 'TemplateClass', u'sidewalkreator Documentation', 215 | [u'Kaue de Moraes Vestena'], 1) 216 | ] 217 | -------------------------------------------------------------------------------- /help/source/index.rst: -------------------------------------------------------------------------------- 1 | .. sidewalkreator documentation master file, created by 2 | sphinx-quickstart on Sun Feb 12 17:11:03 2012. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to sidewalkreator's documentation! 7 | ============================================ 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | Indices and tables 15 | ================== 16 | 17 | * :ref:`genindex` 18 | * :ref:`modindex` 19 | * :ref:`search` 20 | 21 | -------------------------------------------------------------------------------- /i18n/af.ts: -------------------------------------------------------------------------------- 1 | // 2 | // 3 | // 4 | // @default 5 | // 6 | // 7 | // Good morning 8 | // Goeie more 9 | // 10 | // 11 | // 12 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/icon.png -------------------------------------------------------------------------------- /metadata.txt: -------------------------------------------------------------------------------- 1 | # This file contains metadata for your plugin. 2 | 3 | # This file should be included when you package your plugin.# Mandatory items: 4 | 5 | [general] 6 | name=OSM SidewalKreator 7 | qgisMinimumVersion=3.30 8 | description=Plugin designated to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets, given a bounding polygon, outputting to a .geojson to be imported on JOSM. It is mostly intended for accessibility Mapping. 9 | version=1.2.1 10 | author=Kaue de Moraes Vestena 11 | email=kauemv2@gmail.com 12 | 13 | about=Plugin designated to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets, given a bounding polygon, outputting a .geojson that should be imported on JOSM to update OSM data. It is mostly intended for accessibility Mapping. 14 | 15 | tracker=https://github.com/kauevestena/osm_sidewalkreator/issues 16 | repository=https://github.com/kauevestena/osm_sidewalkreator 17 | # End of mandatory metadata 18 | 19 | # Recommended items: 20 | 21 | hasProcessingProvider=no 22 | # Uncomment the following line and add your changelog: 23 | changelog=Sure zones added, Consistent Styles for the temporary Layers added, Fixes on functional parts and bugs. Made compatible with API changes introduced in 3.30, tested on 3.34 24 | 25 | # Tags are comma separated with spaces allowed 26 | tags=openstreetmap, osm, vector 27 | 28 | homepage=https://github.com/kauevestena/osm_sidewalkreator 29 | category=Plugins 30 | icon=icon.png 31 | # experimental flag 32 | experimental=False 33 | 34 | # deprecated flag (applies to the whole plugin, not just a single version) 35 | deprecated=False 36 | 37 | # Since QGIS 3.8, a comma separated list of plugins to be installed 38 | # (or upgraded) can be specified. 39 | # Check the documentation for more information. 40 | # plugin_dependencies= 41 | 42 | Category of the plugin: Raster, Vector, Database or Web 43 | # category= 44 | 45 | # If the plugin can run on QGIS Server. 46 | server=False 47 | 48 | -------------------------------------------------------------------------------- /notes/commands: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kauevestena/osm_sidewalkreator/59b5c5126b5d3df19c8b2d61ed7272a79749d1a1/notes/commands -------------------------------------------------------------------------------- /notes/findings.md: -------------------------------------------------------------------------------- 1 | - to change the icon you must recompile: 2 | pb_tool clean 3 | pb_tool compile -------------------------------------------------------------------------------- /osm_fetch.py: -------------------------------------------------------------------------------- 1 | ''' 2 | osm_fetch.py created for import and convert the desired OSM data 3 | ''' 4 | 5 | 6 | import requests, os, time, json 7 | # import codecs 8 | # import geopandas as gpd 9 | # from geopandas import read_file 10 | import osm2geojson 11 | from itertools import cycle 12 | from qgis.core import QgsApplication 13 | 14 | # doing some stuff again to avoid circular imports: 15 | # homepath = os.path.expanduser('~') 16 | 17 | profilepath = QgsApplication.qgisSettingsDirPath() 18 | base_pluginpath_p2 = 'python/plugins/osm_sidewalkreator' 19 | basepath = os.path.join(profilepath,base_pluginpath_p2) 20 | 21 | ''' 22 | ## MAJOR TODO: evaluate the use of "import gdal" to use gdal ogr api and osm driver to convert the .osm files, leaving zero external dependencies... 23 | ''' 24 | 25 | def delete_filelist_that_exists(filepathlist): 26 | for filepath in filepathlist: 27 | if os.path.exists(filepath): 28 | os.remove(filepath) 29 | 30 | def join_to_a_outfolder(filename,foldername='temporary'): 31 | outfolder = os.path.join(basepath,foldername) 32 | 33 | return os.path.join(outfolder,filename) 34 | 35 | 36 | 37 | def osm_query_string_by_bbox(min_lat,min_lgt,max_lat,max_lgt,interest_key="highway",node=False,way=True,relation=False,print_querystring=False,interest_value = None,dump_path=None): 38 | 39 | node_part = way_part = relation_part = '' 40 | 41 | query_bbox = f'{min_lat},{min_lgt},{max_lat},{max_lgt}' 42 | 43 | interest_value_part = '' 44 | 45 | if interest_value: 46 | interest_value_part = f'="{interest_value}"' 47 | 48 | if node: 49 | node_part = f'node["{interest_key}"{interest_value_part}]({query_bbox});' 50 | if way: 51 | way_part = f'way["{interest_key}"{interest_value_part}]({query_bbox});' 52 | if relation: 53 | relation_part = f'relation["{interest_key}"{interest_value_part}]({query_bbox});' 54 | 55 | overpass_query = f""" 56 | ( 57 | {node_part} 58 | {way_part} 59 | {relation_part} 60 | ); 61 | /*added by auto repair*/ 62 | (._;>;); 63 | /*end of auto repair*/ 64 | out; 65 | """ 66 | 67 | if print_querystring: 68 | print(overpass_query) 69 | 70 | if dump_path: 71 | with open(dump_path,'w+') as querydumper: 72 | querydumper.write(overpass_query) 73 | 74 | return overpass_query 75 | 76 | def filter_gjsonfeats_bygeomtype(geojson,geomtype='LineString',lvl1='features',include_feats_without_tags=False): 77 | ''' 78 | Flexible function that can receives either a path to geojson file or geojson as a dictionary 79 | ''' 80 | 81 | if type(geojson) == str: 82 | with open(geojson) as reader: 83 | data = reader.read() 84 | 85 | # print(data) 86 | as_dict = json.loads(data) 87 | else: 88 | as_dict = geojson 89 | 90 | feat_list = as_dict[lvl1] 91 | 92 | new_list = [] 93 | 94 | # in order to deal with relations 95 | allowed_types = [geomtype] 96 | 97 | if geomtype == 'Polygon': 98 | allowed_types.append('MultiPolygon') 99 | 100 | for entry in feat_list: 101 | # if entry['geometry']['type'] == geomtype: 102 | if any(entry['geometry']['type']==val for val in allowed_types): 103 | # fixing tags not appearing as fields 104 | # checking if tags in 'properties' 105 | if 'tags' in entry['properties']: 106 | tags_dict = entry['properties']['tags'] 107 | 108 | for key in tags_dict: 109 | entry['properties'][key] = entry['properties']['tags'][key] 110 | 111 | del entry['properties']['tags'] 112 | 113 | new_list.append(entry) 114 | else: 115 | # so by default, features without tags will not be included 116 | if include_feats_without_tags: 117 | new_list.append(entry) 118 | 119 | 120 | as_dict[lvl1] = new_list 121 | 122 | return as_dict 123 | 124 | def get_osm_data(querystring,tempfilesname,geomtype='LineString',print_response=False,timeout=30,return_as_string=False): 125 | ''' 126 | get the osmdata and stores in files or in a geojson string, also generates temporary files 127 | ''' 128 | 129 | overpass_url_list = ["http://overpass-api.de/api/interpreter","https://lz4.overpass-api.de/api/interpreter","https://z.overpass-api.de/api/interpreter",'https://overpass.openstreetmap.ru/api/interpreter','https://overpass.openstreetmap.fr/api/interpreter','https://overpass.kumi.systems/api/interpreter'] 130 | 131 | # to iterate circularly, thx: https://stackoverflow.com/a/23416519/4436950 132 | circular_iterator = cycle(overpass_url_list) 133 | 134 | overpass_url = next(circular_iterator) 135 | 136 | 137 | while True: 138 | # TODO: ensure sucess 139 | # (the try statement is an improvement already) 140 | try: 141 | response = requests.get(overpass_url,params={'data':querystring},timeout=timeout) 142 | 143 | if response.status_code == 200: 144 | break 145 | except: 146 | print('request not sucessful, retrying in 5 seconds...') 147 | time.sleep(5) 148 | overpass_url = next(circular_iterator) 149 | print('retrying with server',overpass_url) 150 | 151 | 152 | 153 | 154 | # TODO check the response, beyond terminal printing 155 | if print_response: 156 | print(response) 157 | 158 | if return_as_string: 159 | xml_filecontent = response.text 160 | 161 | else: 162 | # the outpaths for temporary files 163 | xmlfilepath = join_to_a_outfolder(tempfilesname+'_osm.xml') 164 | 165 | geojsonfilepath = join_to_a_outfolder(tempfilesname+'_osm.geojson') 166 | 167 | print('xml will be written to: ',xmlfilepath) 168 | 169 | 170 | 171 | # the xml file writing part: 172 | with open(xmlfilepath,'w+') as handle: 173 | handle.write(response.text) 174 | 175 | print('geojson will be written to: ',geojsonfilepath) 176 | 177 | # # # # # the command-line call 178 | # # # # # old method: using osmtogeojson app 179 | # # # # runstring = f'osmtogeojson "{xmlfilepath}" > "{geojsonfilepath}"' 180 | # # # # out = subprocess.run(runstring,shell=True) 181 | 182 | # # new method : osm2geojson library 183 | # codecs. 184 | with open(xmlfilepath, 'r', encoding='utf-8') as data: 185 | xml_filecontent = data.read() 186 | 187 | # converting OSM XML to Geojson: 188 | geojson_datadict = osm2geojson.xml2geojson(xml_filecontent, filter_used_refs=False, log_level='INFO') 189 | 190 | if not return_as_string: 191 | with open(geojsonfilepath.replace('.geojson','_unfiltered.geojson'),'w+') as geojson_handle: 192 | json.dump(geojson_datadict,geojson_handle) 193 | 194 | filtered_geojson_dict = filter_gjsonfeats_bygeomtype(geojson_datadict,geomtype) 195 | 196 | 197 | 198 | 199 | print('conversion sucessfull!!') 200 | 201 | if return_as_string: 202 | return json.dumps(filtered_geojson_dict) 203 | 204 | else: 205 | # dumping geojson file: 206 | with open(geojsonfilepath,'w+') as geojson_handle: 207 | json.dump(filtered_geojson_dict,geojson_handle) 208 | 209 | return geojsonfilepath 210 | 211 | 212 | 213 | -------------------------------------------------------------------------------- /osm_sidewalkreator_dialog.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | """ 3 | /*************************************************************************** 4 | sidewalkreatorDialog 5 | A QGIS plugin 6 | Plugin designated to create the Geometries of Sidewalks (separated from streets) based on OpenStreetMap Streets, given a bounding polygon, outputting to JOSM format. It is mostly intended for acessibility Mapping. 7 | 8 | Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ 9 | ------------------- 10 | begin : 2021-09-29 11 | git sha : $Format:%H$ 12 | copyright : (C) 2021 by Kaue de Moraes Vestena 13 | email : kauemv2@gmail.com 14 | ***************************************************************************/ 15 | 16 | /*************************************************************************** 17 | * * 18 | * This program is free software; you can redistribute it and/or modify * 19 | * it under the terms of the GNU General Public License as published by * 20 | * the Free Software Foundation; either version 2 of the License, or * 21 | * (at your option) any later version. * 22 | * * 23 | ***************************************************************************/ 24 | """ 25 | 26 | import os 27 | 28 | from qgis.PyQt import uic 29 | from qgis.PyQt import QtWidgets 30 | 31 | # This loads your .ui file so that PyQt can populate your plugin with the elements from Qt Designer 32 | FORM_CLASS, _ = uic.loadUiType(os.path.join( 33 | os.path.dirname(__file__), 'osm_sidewalkreator_dialog_base.ui')) 34 | 35 | 36 | class sidewalkreatorDialog(QtWidgets.QDialog, FORM_CLASS): 37 | def __init__(self, parent=None): 38 | """Constructor.""" 39 | super(sidewalkreatorDialog, self).__init__(parent) 40 | # Set up the user interface from Designer through FORM_CLASS. 41 | # After self.setupUi() you can access any designer object by doing 42 | # self., and you can use autoconnect slots - see 43 | # http://qt-project.org/doc/qt-4.8/designer-using-a-ui-file.html 44 | # #widgets-and-dialogs-with-auto-connect 45 | self.setupUi(self) 46 | -------------------------------------------------------------------------------- /paper_publication/about.md: -------------------------------------------------------------------------------- 1 | This folder contains stuff don't packaged with release. 2 | 3 | ## Scientific Publication is now Available!! 4 | 5 | [Since 12/12/2023, in the European Journal of Geography:](https://eurogeojournal.eu/index.php/egj/article/view/553) 6 | 7 | > de Moraes Vestena, Kauê, Silvana Philippi Camboim, and Daniel Rodrigues dos Santos. 2023. “OSM Sidewalkreator: A QGIS Plugin for an Automated Drawing of Sidewalk Networks for OpenStreetMap”. European Journal of Geography 14 (4):66-84. https://doi.org/10.48088/ejg.k.ves.14.4.066.084. 8 | 9 | The experiments for the publication were carried out in a separate repository: https://github.com/kauevestena/sidewalk_analysis 10 | -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/auxiliary_files/input_polygon.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "name": "input_polygon", 4 | "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, 5 | "features": [ 6 | { "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.264854331564663, -25.460640452163361 ], [ -49.259202198688811, -25.45836407828201 ], [ -49.257818266840495, -25.46092499889853 ], [ -49.263483333658847, -25.463408315860001 ], [ -49.264854331564663, -25.460640452163361 ] ] ] } } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/auxiliary_files/parameters_dump.json: -------------------------------------------------------------------------------- 1 | {"ignore_buildings": false, "timeout (s)": 30, "iters_for_DE_streets": 0, "check_overlapping": true, "distance to add (both sides) to street width (m)": 4.0, "curve radius (m)": 5.0, "draw kerbs at (%)": 5.0, "inward distance (m)": 4.0, "crossings in parallel to transversal segments ": true, "crossings drawn perpendicularly": false, "use voronoi polygons": true, "minimum_POIS": 4, "split by facades": true, "dont split at all": false, "min_distance_to_buildings (m)": 1.0, "min street width (m)": 6.0} -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/auxiliary_files/protoblocks.geojson: -------------------------------------------------------------------------------- 1 | { 2 | "type": "FeatureCollection", 3 | "name": "protoblocks", 4 | "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, 5 | "features": [ 6 | { "type": "Feature", "properties": { "incident": "11" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.258944100000015, -25.4597885 ], [ -49.258482900000011, -25.4607677 ], [ -49.259484, -25.4611525 ], [ -49.259979, -25.4601991 ], [ -49.258944100000015, -25.4597885 ] ] ] } }, 7 | { "type": "Feature", "properties": { "incident": "12" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.259422400000012, -25.4588093 ], [ -49.258944100000015, -25.4597885 ], [ -49.259979, -25.4601991 ], [ -49.260475, -25.4592286 ], [ -49.259422400000012, -25.4588093 ] ] ] } }, 8 | { "type": "Feature", "properties": { "incident": "14" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.261378900000011, -25.4595903 ], [ -49.260475, -25.4592286 ], [ -49.259979, -25.4601991 ], [ -49.260894200000017, -25.4605522 ], [ -49.261378900000011, -25.4595903 ] ] ] } }, 9 | { "type": "Feature", "properties": { "incident": "16" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.262352500000013, -25.4600033 ], [ -49.261378900000011, -25.4595903 ], [ -49.260894200000017, -25.4605522 ], [ -49.261877300000016, -25.4609829 ], [ -49.262352500000013, -25.4600033 ] ] ] } }, 10 | { "type": "Feature", "properties": { "incident": "18" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.263099800000013, -25.4602856 ], [ -49.262352500000013, -25.4600033 ], [ -49.261877300000016, -25.4609829 ], [ -49.262605200000017, -25.4612621 ], [ -49.263099800000013, -25.4602856 ] ] ] } }, 11 | { "type": "Feature", "properties": { "incident": "20" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.264349600000017, -25.4607977 ], [ -49.263099800000013, -25.4602856 ], [ -49.262605200000017, -25.4612621 ], [ -49.263881800000014, -25.4617786 ], [ -49.264349600000017, -25.4607977 ] ] ] } }, 12 | { "type": "Feature", "properties": { "incident": "15" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.260894200000017, -25.4605522 ], [ -49.260445800000014, -25.4615515 ], [ -49.261416200000014, -25.4619433 ], [ -49.261877300000016, -25.4609829 ], [ -49.260894200000017, -25.4605522 ] ] ] } }, 13 | { "type": "Feature", "properties": { "incident": "13" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.260445800000014, -25.4615515 ], [ -49.260894200000017, -25.4605522 ], [ -49.259979, -25.4601991 ], [ -49.259484, -25.4611525 ], [ -49.259894200000012, -25.4613227 ], [ -49.260445800000014, -25.4615515 ] ] ] } }, 14 | { "type": "Feature", "properties": { "incident": "17" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.261416200000014, -25.4619433 ], [ -49.262129700000017, -25.4622241 ], [ -49.262605200000017, -25.4612621 ], [ -49.261877300000016, -25.4609829 ], [ -49.261416200000014, -25.4619433 ] ] ] } }, 15 | { "type": "Feature", "properties": { "incident": "19" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.262129700000017, -25.4622241 ], [ -49.263419300000017, -25.4627388 ], [ -49.263881800000014, -25.4617786 ], [ -49.262605200000017, -25.4612621 ], [ -49.262129700000017, -25.4622241 ] ] ] } } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/changeset_comment.txt: -------------------------------------------------------------------------------- 1 | Sidewalks and Crossings created by the QGIS Plugin 'OSM SidewalKreator', the user was advised to check the resulting data before the upload #SidewalKreator #LabGeoLivreUFPR #mapealivreUFPR -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/overpass_kerbs.txt: -------------------------------------------------------------------------------- 1 | 2 | ( 3 | node["footway"="crossing"](-25.46340831586,-49.26485433156466,-25.45836407828201,-49.257818266840495); 4 | 5 | 6 | ); 7 | /*added by auto repair*/ 8 | (._;>;); 9 | /*end of auto repair*/ 10 | out; 11 | -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/first_importing_1652929108/overpass_sidewalks.txt: -------------------------------------------------------------------------------- 1 | 2 | ( 3 | 4 | way["footway"="sidewalk"](-25.46340831586,-49.26485433156466,-25.45836407828201,-49.257818266840495); 5 | 6 | ); 7 | /*added by auto repair*/ 8 | (._;>;); 9 | /*end of auto repair*/ 10 | out; 11 | -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/jun11_2022/crossings.geojson: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"type": "way", "id": 229503448, "nodes": [2380920427, 2380920425, 2380920426], "bicycle": "yes", "footway": "crossing", "highway": "footway"}, "geometry": {"type": "LineString", "coordinates": [[-49.2585794, -25.4586305], [-49.2584729, -25.4585883], [-49.2583919, -25.4585562]]}}, {"type": "Feature", "properties": {"type": "way", "id": 664311309, "nodes": [6217777013, 6217777014], "footway": "crossing", "highway": "footway"}, "geometry": {"type": "LineString", "coordinates": [[-49.2581749, -25.4592011], [-49.2582813, -25.4592432]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060217, "nodes": [9765548763, 9765548762, 9765548761, 9765548760, 9765548759], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "186526916673300", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2619071, -25.4610937], [-49.2618813, -25.4610854], [-49.261835, -25.4610704], [-49.2617891, -25.4610556], [-49.2617695, -25.4610493]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060218, "nodes": [9765548768, 9765548767, 9765548766, 9765548765, 9765548764], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "301343841537563", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2614042, -25.46181], [-49.2614233, -25.4618177], [-49.2614678, -25.4618357], [-49.2615151, -25.4618495], [-49.2615408, -25.4618566]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060219, "nodes": [9765548773, 9765548772, 9765548771, 9765548770, 9765548769], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "930446967751756", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2623734, -25.4601175], [-49.2623534, -25.4601112], [-49.2623084, -25.4600942], [-49.2622634, -25.4600772], [-49.2622441, -25.4600699]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060220, "nodes": [9765548778, 9765548777, 9765548776, 9765548775, 9765548774], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "221148796146761", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2618751, -25.4608368], [-49.2618949, -25.4608439], [-49.2619374, -25.4608613], [-49.2619884, -25.4608808], [-49.2620029, -25.4608872]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060221, "nodes": [9765548783, 9765548782, 9765548781, 9765548780, 9765548779], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "944008643087319", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.259594, -25.461089], [-49.2595756, -25.46108], [-49.2595327, -25.4610591], [-49.2594899, -25.4610382], [-49.2594626, -25.4610249]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060222, "nodes": [9765548788, 9765548787, 9765548786, 9765548785, 9765548784], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "2688258224804845", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2598601, -25.4602799], [-49.2598792, -25.4602875], [-49.2599239, -25.4603052], [-49.2599686, -25.460323], [-49.2599877, -25.4603306]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060223, "nodes": [9765548793, 9765548792, 9765548791, 9765548790, 9765548789], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "492360215217114", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2600893, -25.4601338], [-49.26007, -25.4601255], [-49.260025, -25.460109], [-49.2599855, -25.4600908], [-49.2599532, -25.4600749]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060224, "nodes": [9765548798, 9765548797, 9765548796, 9765548795, 9765548794], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "219214403046531", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2603381, -25.4593078], [-49.2603693, -25.4593185], [-49.2604179, -25.4593384], [-49.2604652, -25.4593552], [-49.2604843, -25.4593604]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060225, "nodes": [9765548803, 9765548802, 9765548801, 9765548800, 9765548799], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "530904618088633", "smoothness": "intermediate", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.260771, -25.4605635], [-49.2607778, -25.4605485], [-49.2607935, -25.4605134], [-49.2608093, -25.4604782], [-49.260816, -25.4604632]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060226, "nodes": [9765548808, 9765548807, 9765548806, 9765548805, 9765548804], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1347566945643616", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2601322, -25.4601994], [-49.2601247, -25.4602141], [-49.2601071, -25.4602485], [-49.2600895, -25.4602829], [-49.260082, -25.4602977]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060227, "nodes": [9765548813, 9765548812, 9765548811, 9765548810, 9765548809], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "2905164016417950", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2598376, -25.4602017], [-49.2598454, -25.460188], [-49.2598616, -25.4601539], [-49.2598804, -25.4601166], [-49.2598874, -25.4600973]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060228, "nodes": [9765548818, 9765548817, 9765548816, 9765548815, 9765548814], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "296077432106342", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2590508, -25.4598904], [-49.2590602, -25.4598719], [-49.2590783, -25.4598422], [-49.2590914, -25.4598152], [-49.2591101, -25.4597905]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060229, "nodes": [9765548823, 9765548822, 9765548821, 9765548820, 9765548819], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1178115929294038", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2638056, -25.4616884], [-49.2637985, -25.4617034], [-49.2637819, -25.4617382], [-49.2637653, -25.461773], [-49.2637582, -25.4617879]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060230, "nodes": [9765548828, 9765548827, 9765548826, 9765548825, 9765548824], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "897870060769419", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2627482, -25.4612607], [-49.2627407, -25.4612754], [-49.2627233, -25.4613099], [-49.2627058, -25.4613443], [-49.2626983, -25.4613591]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060231, "nodes": [9765548833, 9765548832, 9765548831, 9765548830, 9765548829], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "466826084613189", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2624894, -25.4612681], [-49.2624982, -25.4612489], [-49.262509, -25.4612252], [-49.262525, -25.4611902], [-49.2625396, -25.4611583]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060232, "nodes": [9765548838, 9765548837, 9765548836, 9765548835, 9765548834], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "949049912512058", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2620403, -25.4609668], [-49.2620224, -25.4609974], [-49.2620089, -25.4610333], [-49.2619988, -25.4610577], [-49.2619909, -25.4610768]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060233, "nodes": [9798547891, 9765548842, 9765548841, 9765548840, 9765548839], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1900008290165186", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.261795, -25.4608861], [-49.2617867, -25.460901], [-49.2617698, -25.4609358], [-49.261753, -25.4609705], [-49.2617458, -25.4609854]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060234, "nodes": [9765548848, 9765548847, 9765548846, 9765548845, 9765548844], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "486366759173676", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.260972, -25.460649], [-49.2609767, -25.4606385], [-49.2609952, -25.4605964], [-49.2610053, -25.4605733], [-49.2610194, -25.4605469]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060235, "nodes": [9765548853, 9765548852, 9765548851, 9765548850, 9765548357], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3704554859769847", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2622291, -25.4621553], [-49.2622127, -25.4621488], [-49.2621745, -25.4621335], [-49.2621362, -25.4621182], [-49.2621252, -25.4621138]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060236, "nodes": [9765548858, 9765548857, 9765548856, 9765548855, 9765548854], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "934032620752358", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2625067, -25.4613432], [-49.2625174, -25.4613482], [-49.2625544, -25.4613655], [-49.2625914, -25.4613828], [-49.2626072, -25.4613902]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060237, "nodes": [9765548291, 9765548862, 9765548861, 9765548860, 9765548859], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "224035205819380", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2627093, -25.4611829], [-49.2626874, -25.4611724], [-49.2626568, -25.4611578], [-49.2626266, -25.4611434], [-49.2626071, -25.4611341]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060238, "nodes": [9765548867, 9765548866, 9765548865, 9765548864, 9765548863], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "694288737931581", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2630014, -25.4603557], [-49.2630109, -25.460367], [-49.2630505, -25.4603834], [-49.2630703, -25.4603929], [-49.2631043, -25.4604046]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060239, "nodes": [9765548872, 9765548871, 9765548870, 9765548869, 9765548868], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3929048280536906", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2604326, -25.4614369], [-49.2604489, -25.4614437], [-49.2604871, -25.4614595], [-49.2605251, -25.4614753], [-49.2605414, -25.4614821]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060240, "nodes": [9765548727, 9765548876, 9765548875, 9765548874, 9765548873], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3574534792652141", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2609398, -25.4606547], [-49.2609218, -25.4606474], [-49.2608616, -25.4606249], [-49.2608309, -25.4606132], [-49.2608018, -25.4606021]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060241, "nodes": [9765548882, 9765548881, 9765548880, 9765548879, 9765548878], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "833626637258191", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2609934, -25.4604854], [-49.2609773, -25.4604784], [-49.2609397, -25.4604619], [-49.2609021, -25.4604454], [-49.260886, -25.4604384]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060242, "nodes": [9765548887, 9765548886, 9765548885, 9765548884, 9765548883], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "315313819969205", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2612705, -25.4596752], [-49.2612869, -25.4596817], [-49.2613251, -25.459697], [-49.2613633, -25.4597123], [-49.2613797, -25.4597189]]}}]} -------------------------------------------------------------------------------- /paper_publication/extras/data/backup/jun11_2022/kerbs.geojson: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"type": "node", "id": 9765548760, "barrier": "kerb", "kerb": "raised", "mapillary": "1029743144096727", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2617891, -25.4610556]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548762, "barrier": "kerb", "kerb": "raised", "mapillary": "137712691733031", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2618813, -25.4610854]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548765, "barrier": "kerb", "kerb": "raised", "mapillary": "253606566518039", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2615151, -25.4618495]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548767, "barrier": "kerb", "kerb": "rolled", "mapillary": "500862964485764", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2614233, -25.4618177]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548770, "barrier": "kerb", "kerb": "raised", "mapillary": "1142565206217673", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2622634, -25.4600772]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548772, "barrier": "kerb", "kerb": "raised", "mapillary": "4109242405806982", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2623534, -25.4601112]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548775, "barrier": "kerb", "kerb": "rolled", "mapillary": "535275924303458", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2619884, -25.4608808]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548777, "barrier": "kerb", "kerb": "raised", "mapillary": "391246705364597", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2618949, -25.4608439]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548780, "barrier": "kerb", "kerb": "raised", "mapillary": "919719528880374", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2594899, -25.4610382]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548782, "barrier": "kerb", "kerb": "raised", "mapillary": "1173305993121260", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2595756, -25.46108]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548785, "barrier": "kerb", "kerb": "raised", "mapillary": "2688258224804845", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2599686, -25.460323]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548787, "barrier": "kerb", "kerb": "lowered", "mapillary": "152004570230417", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2598792, -25.4602875]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548790, "barrier": "kerb", "kerb": "raised", "mapillary": "233123588572175", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2599855, -25.4600908]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548792, "barrier": "kerb", "kerb": "raised", "mapillary": "1887075411456145", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.26007, -25.4601255]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548795, "barrier": "kerb", "kerb": "raised", "mapillary": "1173628809777644", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2604652, -25.4593552]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548797, "barrier": "kerb", "kerb": "raised", "mapillary": "219214403046531", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2603693, -25.4593185]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548800, "barrier": "kerb", "kerb": "raised", "mapillary": "328002045354451", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2608093, -25.4604782]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548802, "barrier": "kerb", "kerb": "raised", "mapillary": "328002045354451", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2607778, -25.4605485]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548805, "barrier": "kerb", "description": "Just a lowered kerb, not an actual ramp", "kerb": "lowered", "tactile_paving": "no", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2600895, -25.4602829]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548807, "barrier": "kerb", "kerb": "raised", "mapillary": "217745890162350", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2601247, -25.4602141]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548810, "barrier": "kerb", "kerb": "raised", "mapillary": "528861054819748", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2598804, -25.4601166]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548812, "barrier": "kerb", "kerb": "lowered", "mapillary": "1119411961876693", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2598454, -25.460188]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548815, "barrier": "kerb", "kerb": "raised", "mapillary": "502988820743025", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2590914, -25.4598152]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548817, "barrier": "kerb", "kerb": "raised", "mapillary": "455391785558750", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2590602, -25.4598719]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548820, "barrier": "kerb", "kerb": "raised", "mapillary": "1178115929294038", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2637653, -25.461773]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548822, "barrier": "kerb", "kerb": "raised", "mapillary": "935925120312137", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2637985, -25.4617034]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548825, "barrier": "kerb", "kerb": "raised", "mapillary": "897870060769419", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2627058, -25.4613443]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548827, "barrier": "kerb", "kerb": "raised", "mapillary": "2629918357305210", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2627407, -25.4612754]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548830, "barrier": "kerb", "kerb": "raised", "mapillary": "466413721317951", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.262525, -25.4611902]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548832, "barrier": "kerb", "kerb": "raised", "mapillary": "228081889088954", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2624982, -25.4612489]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548835, "barrier": "kerb", "kerb": "raised", "mapillary": "226821652144261", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2619988, -25.4610577]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548837, "barrier": "kerb", "kerb": "raised", "mapillary": "2820557454865609", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2620224, -25.4609974]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548840, "barrier": "kerb", "kerb": "raised", "mapillary": "1900008290165186", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.261753, -25.4609705]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548842, "barrier": "kerb", "kerb": "rolled", "mapillary": "1900008290165186", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2617867, -25.460901]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548845, "barrier": "kerb", "kerb": "raised", "mapillary": "309888260638044", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2610053, -25.4605733]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548847, "barrier": "kerb", "kerb": "lowered", "mapillary": "309888260638044", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2609767, -25.4606385]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548850, "barrier": "kerb", "kerb": "raised", "mapillary": "582732399372473", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2621362, -25.4621182]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548852, "barrier": "kerb", "kerb": "raised", "mapillary": "136603005179802", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2622127, -25.4621488]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548855, "barrier": "kerb", "kerb": "raised", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2625914, -25.4613828]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548857, "barrier": "kerb", "kerb": "raised", "mapillary": "483582189637023", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2625174, -25.4613482]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548860, "barrier": "kerb", "kerb": "raised", "mapillary": "504195483957003", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2626266, -25.4611434]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548862, "barrier": "kerb", "kerb": "raised", "mapillary": "754993878545423", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2626874, -25.4611724]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548864, "barrier": "kerb", "kerb": "lowered", "mapillary": "919035115609734", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2630703, -25.4603929]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548866, "barrier": "kerb", "kerb": "raised", "mapillary": "494388555237738", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2630109, -25.460367]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548869, "barrier": "kerb", "kerb": "raised", "mapillary": "3929048280536906", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2605251, -25.4614753]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548871, "barrier": "kerb", "kerb": "rolled", "mapillary": "338026851085454", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2604489, -25.4614437]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548874, "barrier": "kerb", "kerb": "raised", "mapillary": "788151661825200", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2608309, -25.4606132]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548876, "barrier": "kerb", "kerb": "lowered", "mapillary": "812860732997816", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2609218, -25.4606474]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548879, "barrier": "kerb", "kerb": "raised", "mapillary": "471725254085496", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2609021, -25.4604454]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548881, "barrier": "kerb", "kerb": "raised", "mapillary": "844458092820328", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2609773, -25.4604784]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548884, "barrier": "kerb", "kerb": "raised", "mapillary": "319868679654184", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2613633, -25.4597123]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548886, "barrier": "kerb", "kerb": "raised", "mapillary": "502094780941300", "survey:date": "2019-09-12", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2612869, -25.4596817]}}]} -------------------------------------------------------------------------------- /paper_publication/extras/data/crossings.geojson: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"type": "way", "id": 229503448, "nodes": [2380920427, 2380920425, 2380920426], "bicycle": "yes", "footway": "crossing", "highway": "footway"}, "geometry": {"type": "LineString", "coordinates": [[-49.2585794, -25.4586305], [-49.2584729, -25.4585883], [-49.2583919, -25.4585562]]}}, {"type": "Feature", "properties": {"type": "way", "id": 664311309, "nodes": [6217777013, 6217777014], "footway": "crossing", "highway": "footway"}, "geometry": {"type": "LineString", "coordinates": [[-49.2581749, -25.4592011], [-49.2582813, -25.4592432]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060217, "nodes": [9765548763, 9765548762, 9765548761, 9765548760, 9765548759], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "186526916673300", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2619071, -25.4610937], [-49.2618813, -25.4610854], [-49.261835, -25.4610704], [-49.2617891, -25.4610556], [-49.2617695, -25.4610493]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060218, "nodes": [9765548768, 9765548767, 9765548766, 9765548765, 9765548764], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "301343841537563", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2614042, -25.46181], [-49.2614237, -25.4618167], [-49.2614693, -25.4618322], [-49.2615157, -25.461848], [-49.2615408, -25.4618566]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060219, "nodes": [9765548773, 9765548772, 9765548771, 9765548770, 9765548769], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "930446967751756", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2623734, -25.4601175], [-49.2623534, -25.4601112], [-49.2623084, -25.4600942], [-49.2622634, -25.4600772], [-49.2622441, -25.4600699]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060220, "nodes": [9765548778, 9765548777, 9765548776, 9765548775, 9765548774], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "221148796146761", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2618751, -25.4608368], [-49.2618949, -25.4608439], [-49.2619374, -25.4608613], [-49.2619884, -25.4608808], [-49.2620029, -25.4608872]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060221, "nodes": [9765548783, 9765548782, 9765548781, 9765548780, 9765548779], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "944008643087319", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.259594, -25.461089], [-49.2595756, -25.46108], [-49.2595327, -25.4610591], [-49.2594899, -25.4610382], [-49.2594626, -25.4610249]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060222, "nodes": [9765548788, 9765548787, 9765548786, 9765548785, 9765548784], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "2688258224804845", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2598601, -25.4602799], [-49.2598792, -25.4602875], [-49.2599239, -25.4603052], [-49.2599686, -25.460323], [-49.2599877, -25.4603306]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060223, "nodes": [9765548793, 9765548792, 9765548791, 9765548790, 9765548789], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "492360215217114", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2600893, -25.4601338], [-49.26007, -25.4601255], [-49.260025, -25.460109], [-49.2599855, -25.4600908], [-49.2599532, -25.4600749]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060224, "nodes": [9765548798, 9765548797, 9765548796, 9765548795, 9765548794], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "219214403046531", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2603381, -25.4593078], [-49.2603693, -25.4593185], [-49.2604179, -25.4593384], [-49.2604652, -25.4593552], [-49.2604843, -25.4593604]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060225, "nodes": [9765548803, 9765548802, 9765548801, 9765548800, 9765548799], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "530904618088633", "smoothness": "intermediate", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.260771, -25.4605635], [-49.2607778, -25.4605485], [-49.2607935, -25.4605134], [-49.2608093, -25.4604782], [-49.260816, -25.4604632]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060226, "nodes": [9765548808, 9765548807, 9765548806, 9765548805, 9765548804], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1347566945643616", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2601322, -25.4601994], [-49.2601247, -25.4602141], [-49.2601071, -25.4602485], [-49.2600895, -25.4602829], [-49.260082, -25.4602977]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060227, "nodes": [9765548813, 9765548812, 9765548811, 9765548810, 9765548809], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "2905164016417950", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2598376, -25.4602017], [-49.2598454, -25.460188], [-49.2598616, -25.4601539], [-49.2598804, -25.4601166], [-49.2598874, -25.4600973]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060228, "nodes": [9765548818, 9765548817, 9765548816, 9765548815, 9765548814], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "296077432106342", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2590508, -25.4598904], [-49.2590602, -25.4598719], [-49.2590783, -25.4598422], [-49.2590914, -25.4598152], [-49.2591101, -25.4597905]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060229, "nodes": [9765548823, 9765548822, 9765548821, 9765548820, 9765548819], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1178115929294038", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2638056, -25.4616884], [-49.2637985, -25.4617034], [-49.2637819, -25.4617382], [-49.2637653, -25.461773], [-49.2637582, -25.4617879]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060230, "nodes": [9765548828, 9765548827, 9765548826, 9765548825, 9765548824], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "897870060769419", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2627482, -25.4612607], [-49.2627407, -25.4612754], [-49.2627233, -25.4613099], [-49.2627058, -25.4613443], [-49.2626983, -25.4613591]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060231, "nodes": [9765548833, 9765548832, 9765548831, 9765548830, 9765548829], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "466826084613189", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2624894, -25.4612681], [-49.2624982, -25.4612489], [-49.262509, -25.4612252], [-49.262525, -25.4611902], [-49.2625396, -25.4611583]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060232, "nodes": [9765548838, 9765548837, 9765548836, 9765548835, 9765548834], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "949049912512058", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2620403, -25.4609668], [-49.2620224, -25.4609974], [-49.2620089, -25.4610333], [-49.2619988, -25.4610577], [-49.2619909, -25.4610768]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060233, "nodes": [9798547891, 9765548842, 9765548841, 9765548840, 9765548839], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "1900008290165186", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.261795, -25.4608861], [-49.2617867, -25.460901], [-49.2617698, -25.4609358], [-49.261753, -25.4609705], [-49.2617458, -25.4609854]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060234, "nodes": [9765548848, 9765548847, 9765548846, 9765548845, 9765548844], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "486366759173676", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.260972, -25.460649], [-49.2609767, -25.4606385], [-49.2609952, -25.4605964], [-49.2610053, -25.4605733], [-49.2610194, -25.4605469]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060235, "nodes": [9765548853, 9765548852, 9765548851, 9765548850, 9765548357], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3704554859769847", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2622291, -25.4621553], [-49.2622127, -25.4621488], [-49.2621745, -25.4621335], [-49.2621362, -25.4621182], [-49.2621252, -25.4621138]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060236, "nodes": [9765548858, 9765548857, 9765548856, 9765548855, 9765548854], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "934032620752358", "smoothness": "excellent", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2625067, -25.4613432], [-49.2625174, -25.4613482], [-49.2625544, -25.4613655], [-49.2625914, -25.4613828], [-49.2626072, -25.4613902]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060237, "nodes": [9765548291, 9765548862, 9765548861, 9765548860, 9765548859], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "224035205819380", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2627093, -25.4611829], [-49.2626874, -25.4611724], [-49.2626568, -25.4611578], [-49.2626266, -25.4611434], [-49.2626071, -25.4611341]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060238, "nodes": [9765548867, 9765548866, 9765548865, 9765548864, 9765548863], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "694288737931581", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2630014, -25.4603557], [-49.263014, -25.4603617], [-49.2630525, -25.46038], [-49.2630723, -25.4603894], [-49.2631043, -25.4604046]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060239, "nodes": [9765548872, 9765548871, 9765548870, 9765548869, 9765548868], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3929048280536906", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2604326, -25.4614369], [-49.2604489, -25.4614437], [-49.2604871, -25.4614595], [-49.2605251, -25.4614753], [-49.2605414, -25.4614821]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060240, "nodes": [9765548727, 9765548876, 9765548875, 9765548874, 9765548873], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "3574534792652141", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2609398, -25.4606547], [-49.2609218, -25.4606474], [-49.2608616, -25.4606249], [-49.2608309, -25.4606132], [-49.2608018, -25.4606021]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060241, "nodes": [9765548882, 9765548881, 9765548880, 9765548879, 9765548878], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "833626637258191", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2609934, -25.4604854], [-49.2609773, -25.4604784], [-49.2609397, -25.4604619], [-49.2609021, -25.4604454], [-49.260886, -25.4604384]]}}, {"type": "Feature", "properties": {"type": "way", "id": 1063060242, "nodes": [9765548887, 9765548886, 9765548885, 9765548884, 9765548883], "crossing": "unmarked", "footway": "crossing", "highway": "footway", "mapillary": "315313819969205", "smoothness": "good", "surface": "asphalt", "survey:date": "2019-09-12"}, "geometry": {"type": "LineString", "coordinates": [[-49.2612705, -25.4596752], [-49.2612869, -25.4596817], [-49.2613251, -25.459697], [-49.2613633, -25.4597123], [-49.2613797, -25.4597189]]}}]} -------------------------------------------------------------------------------- /paper_publication/extras/data/getting_data.py: -------------------------------------------------------------------------------- 1 | from importlib.resources import path 2 | #adding plugin 3 | 4 | import sys, os 5 | from pathlib import Path 6 | 7 | # thx https://stackoverflow.com/a/595315/4436950 8 | path_add = Path(__file__).parents[3] 9 | print(path_add) 10 | 11 | sys.path.append(str(path_add)) 12 | # print(sys.path) 13 | 14 | dirpath = Path(__file__).parents[0] 15 | print(dirpath) 16 | 17 | 18 | ############ 19 | 20 | from osm_fetch import * 21 | 22 | bounding_box = (-25.46340831586,-49.26485433156466,-25.45836407828201,-49.257818266840495) 23 | 24 | queries_dict = { 25 | 'kerbs' : {'query':osm_query_string_by_bbox(*bounding_box,interest_key='kerb',node=True,way=False),'geomtype':'Point'}, 26 | 'sidewalks': {'query':osm_query_string_by_bbox(*bounding_box,interest_key='footway',interest_value='sidewalk'),'geomtype':'LineString'}, 27 | 'crossings': {'query':osm_query_string_by_bbox(*bounding_box,interest_key='footway',interest_value='crossing'),'geomtype':'LineString'} 28 | } 29 | 30 | for key in queries_dict: 31 | outpath = dirpath / f'{key}.geojson' 32 | 33 | get_osm_data(queries_dict[key]['query'],'',geomtype=queries_dict[key]['geomtype'],geojson_outpath=outpath) 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /paper_publication/extras/data/kerbs.geojson: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"type": "node", "id": 9765548760, "barrier": "kerb", "kerb": "raised", "mapillary": "1029743144096727", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2617891, -25.4610556]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548762, "barrier": "kerb", "kerb": "raised", "mapillary": "137712691733031", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2618813, -25.4610854]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548765, "barrier": "kerb", "kerb": "raised", "mapillary": "253606566518039", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2615157, -25.461848]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548767, "barrier": "kerb", "kerb": "rolled", "mapillary": "500862964485764", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2614237, -25.4618167]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548770, "barrier": "kerb", "kerb": "raised", "mapillary": "1142565206217673", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2622634, -25.4600772]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548772, "barrier": "kerb", "kerb": "raised", "mapillary": "4109242405806982", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2623534, -25.4601112]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548775, "barrier": "kerb", "kerb": "rolled", "mapillary": "535275924303458", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2619884, -25.4608808]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548777, "barrier": "kerb", "kerb": "raised", "mapillary": "391246705364597", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2618949, -25.4608439]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548780, "barrier": "kerb", "kerb": "raised", "mapillary": "919719528880374", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2594899, -25.4610382]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548782, "barrier": "kerb", "kerb": "raised", "mapillary": "1173305993121260", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2595756, -25.46108]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548785, "barrier": "kerb", "kerb": "raised", "mapillary": "2688258224804845", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2599686, -25.460323]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548787, "barrier": "kerb", "kerb": "lowered", "mapillary": "152004570230417", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2598792, -25.4602875]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548790, "barrier": "kerb", "kerb": "raised", "mapillary": "233123588572175", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2599855, -25.4600908]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548792, "barrier": "kerb", "kerb": "raised", "mapillary": "1887075411456145", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.26007, -25.4601255]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548795, "barrier": "kerb", "kerb": "raised", "mapillary": "1173628809777644", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2604652, -25.4593552]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548797, "barrier": "kerb", "kerb": "raised", "mapillary": "219214403046531", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2603693, -25.4593185]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548800, "barrier": "kerb", "kerb": "raised", "mapillary": "328002045354451", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2608093, -25.4604782]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548802, "barrier": "kerb", "kerb": "raised", "mapillary": "328002045354451", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2607778, -25.4605485]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548805, "barrier": "kerb", "description": "Just a lowered kerb, not an actual ramp", "kerb": "lowered", "tactile_paving": "no", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2600895, -25.4602829]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548807, "barrier": "kerb", "kerb": "raised", "mapillary": "217745890162350", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2601247, -25.4602141]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548810, "barrier": "kerb", "kerb": "raised", "mapillary": "528861054819748", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2598804, -25.4601166]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548812, "barrier": "kerb", "kerb": "lowered", "mapillary": "1119411961876693", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2598454, -25.460188]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548815, "barrier": "kerb", "kerb": "raised", "mapillary": "502988820743025", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2590914, -25.4598152]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548817, "barrier": "kerb", "kerb": "raised", "mapillary": "455391785558750", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2590602, -25.4598719]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548820, "barrier": "kerb", "kerb": "raised", "mapillary": "1178115929294038", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2637653, -25.461773]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548822, "barrier": "kerb", "kerb": "raised", "mapillary": "935925120312137", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2637985, -25.4617034]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548825, "barrier": "kerb", "kerb": "raised", "mapillary": "897870060769419", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2627058, -25.4613443]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548827, "barrier": "kerb", "kerb": "raised", "mapillary": "2629918357305210", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2627407, -25.4612754]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548830, "barrier": "kerb", "kerb": "raised", "mapillary": "466413721317951", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.262525, -25.4611902]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548832, "barrier": "kerb", "kerb": "raised", "mapillary": "228081889088954", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2624982, -25.4612489]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548835, "barrier": "kerb", "kerb": "raised", "mapillary": "226821652144261", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2619988, -25.4610577]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548837, "barrier": "kerb", "kerb": "raised", "mapillary": "2820557454865609", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2620224, -25.4609974]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548840, "barrier": "kerb", "kerb": "raised", "mapillary": "1900008290165186", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.261753, -25.4609705]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548842, "barrier": "kerb", "kerb": "rolled", "mapillary": "1900008290165186", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2617867, -25.460901]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548845, "barrier": "kerb", "kerb": "raised", "mapillary": "309888260638044", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2610053, -25.4605733]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548847, "barrier": "kerb", "kerb": "lowered", "mapillary": "309888260638044", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2609767, -25.4606385]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548850, "barrier": "kerb", "kerb": "raised", "mapillary": "582732399372473", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2621362, -25.4621182]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548852, "barrier": "kerb", "kerb": "raised", "mapillary": "136603005179802", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2622127, -25.4621488]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548855, "barrier": "kerb", "kerb": "raised", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2625914, -25.4613828]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548857, "barrier": "kerb", "kerb": "raised", "mapillary": "483582189637023", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2625174, -25.4613482]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548860, "barrier": "kerb", "kerb": "raised", "mapillary": "504195483957003", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2626266, -25.4611434]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548862, "barrier": "kerb", "kerb": "raised", "mapillary": "754993878545423", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2626874, -25.4611724]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548864, "barrier": "kerb", "kerb": "lowered", "mapillary": "919035115609734", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2630723, -25.4603894]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548866, "barrier": "kerb", "kerb": "raised", "mapillary": "494388555237738", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.263014, -25.4603617]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548869, "barrier": "kerb", "kerb": "raised", "mapillary": "3929048280536906", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2605251, -25.4614753]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548871, "barrier": "kerb", "kerb": "rolled", "mapillary": "338026851085454", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2604489, -25.4614437]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548874, "barrier": "kerb", "kerb": "raised", "mapillary": "788151661825200", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2608309, -25.4606132]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548876, "barrier": "kerb", "kerb": "lowered", "mapillary": "812860732997816", "survey:date": "2019-09-12", "tactile_paving": "yes", "wheelchair": "yes"}, "geometry": {"type": "Point", "coordinates": [-49.2609218, -25.4606474]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548879, "barrier": "kerb", "kerb": "raised", "mapillary": "471725254085496", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2609021, -25.4604454]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548881, "barrier": "kerb", "kerb": "raised", "mapillary": "844458092820328", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2609773, -25.4604784]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548884, "barrier": "kerb", "kerb": "raised", "mapillary": "319868679654184", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2613633, -25.4597123]}}, {"type": "Feature", "properties": {"type": "node", "id": 9765548886, "barrier": "kerb", "kerb": "raised", "mapillary": "502094780941300", "survey:date": "2019-09-12", "tactile_paving": "no", "wheelchair": "no"}, "geometry": {"type": "Point", "coordinates": [-49.2612869, -25.4596817]}}]} -------------------------------------------------------------------------------- /parameters.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | """ 4 | File intended to store "hyperparameters" 5 | 6 | 7 | ALL DISTANCES MUST BE IN METERS, no feets nor yards 8 | """ 9 | 10 | 11 | CRS_LATLON_4326 = "EPSG:4326" 12 | 13 | # to look for adresses: 14 | addr_tag = 'addr:housenumber' 15 | 16 | highway_tag = 'highway' 17 | 18 | sidewalk_tag_value = 'footway' 19 | 20 | widths_fieldname = 'width' 21 | 22 | # control 23 | use_buildings = True 24 | draw_buildings = True 25 | # to control whether must download relations in buildings 26 | include_relations = True 27 | 28 | 29 | # buffer that defines the curvature radius is defined in GUI, max and min are in the .ui file 30 | default_curve_radius = 3 31 | 32 | # minimal distance that a sidewalk must be from a building 33 | min_d_to_building = 1 # 1 m defined in gui, along with max an min allowed values at .ui file 34 | 35 | osm_higway_layer_finalname = 'osm_clipped_highways' 36 | buildings_layername = 'osm_buildings' 37 | roads_layername = "osm_road_data" 38 | 39 | # big buffer distance 40 | big_buffer_d = 10000 41 | 42 | # min buffer size for the worst case (building intersecting road) 43 | minimal_buffer = 3 # 2m 44 | 45 | # distance to add to distance to interpolate inner_points, should be a small distance, 0.5 or 1 m, generally 46 | d_to_add_interp_d = 2 47 | 48 | # percent of middle-crossing segment to draw Kerbs 49 | perc_draw_kerbs = 30 50 | 51 | # percent of tolerance to drive a point innerly in segment 52 | perc_tol_crossings = 25 53 | 54 | # percent of length to interpolate if passes half the length 55 | perc_to_interpolate = 0.4 56 | 57 | # distance to add to each side, as we are creating sidewalk axis, not kerbs 58 | d_to_add_to_each_side = 1 # 1m 59 | 60 | 61 | # for values that must be ignored one must use "0" as value 62 | default_widths = { 63 | # loosely based on https://www.gov.br/dnit/pt-br/rodovias/operacoes-rodoviarias/faixa-de-dominio/regulamentacao-atual/normas-para-o-projeto-das-estradas-de-rodagem (Brazilian DNIT specifications) 64 | 65 | 66 | # most common: 67 | 'motorway' : 22.0, 68 | 'trunk' : 18.0, 69 | 'primary' : 12.0, 70 | 'residential': 6.0, 71 | 'secondary' : 10.0, 72 | 'tertiary' : 8.0, 73 | 'unclassified': 4.0, 74 | 75 | # unclear/uncanny/rare cases: 76 | 'road' : 6.0, 77 | 'living_street': 0.0, 78 | 79 | # links: 80 | "trunk_link" : 0, 81 | 'motorway_link' : 0, 82 | 'secondary_link' : 0, 83 | "tertiary_link" : 0, 84 | "primary_link" : 0, 85 | 86 | 87 | # values that must be ignored: 88 | 'sidewalk' : 0, 89 | 'crossing' : 0, 90 | 'path' : 0, 91 | 'service' : 0, 92 | 'pedestrian' : 0, 93 | 'escape' : 0, 94 | 'raceway' : 0, 95 | 'cycleway' : 0, 96 | 'proposed' :0, 97 | 'construction' : 0, 98 | 'platform' : 0, 99 | 'services' : 0, 100 | 'footway' : 0, 101 | 'track' : 0, 102 | 103 | 'corridor' : 0 , 104 | 'steps' : 0, 105 | 'street_lamp' : 0, 106 | 107 | 108 | # '' : , 109 | } 110 | 111 | # for case(s) of an unexpected value: 112 | fallback_default_width = 6.0 113 | 114 | # ASSETS: 115 | # names of the assets filenames: 116 | sidewalks_stylefilename = 'sidewalkstyles.qml' 117 | inputpolygons_stylefilename = 'polygonstyles.qml' 118 | crossings_stylefilename = 'crossings.qml' 119 | kerbs_stylefilename = 'kerbs.qml' 120 | splitting_pois_stylefilename = 'addrs_centroids2.qml' 121 | buildings_stylefilename = 'buildings.qml' 122 | road_intersections_stylefilename = 'road_intersections.qml' 123 | 124 | exclusion_stylefilename = 'exclusion_zones.qml' 125 | sure_stylefilename = 'sure_zones.qml' 126 | 127 | roads_p1_stylefilename = 'roads_p1.qml' 128 | roads_p2_stylefilename = 'roads_p2_main.qml' 129 | roads_p3_stylefilename = 'roads_p3.qml' 130 | 131 | 132 | 133 | 134 | osm_basemap_str = "crs=EPSG:3857&format&type=xyz&url=http://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0" 135 | 136 | bing_baseimg_str = 'crs=EPSG:3857&format&type=xyz&url=http://ak.t0.tiles.virtualearth.net/tiles/a%7Bq%7D.jpeg?n%3Dz%26g%3D5880&zmax=19&zmin=0' 137 | 138 | 139 | crossing_centers_layername = 'crossing_points' 140 | 141 | crossings_layer_name = 'CROSSINGS' 142 | 143 | kerbs_layer_name = 'KERBS' 144 | 145 | # little buffer for dissolved protoblocks "within" condition eligibility in all cases (as long as I know) 146 | protoblocks_buffer = 0.5 # 50 cm 147 | 148 | # value to exclude "tiny segments" 149 | tiny_segments_tol = 0.1 150 | 151 | # (draw_crossings context) increment in meters if the length of the crossing is bigger than the max len 152 | increment_inward = 0.5 153 | # max iterations in the 154 | max_crossings_iterations = 20 155 | 156 | # max distance for distance search in knn 157 | knn_max_dist = 50 158 | 159 | # cutoff percent to say that a protoblock contains an already drawn sidewalk: 160 | cutoff_percent_protoblock = 40 161 | 162 | # for duplicate points (m): 163 | duplicate_points_tol = .1 164 | 165 | # snap tolerance for disjointed (m): 166 | snap_disjointed_tol = .5 167 | 168 | # minimum length that a sidewalk stretch should have (m): 169 | min_stretch_size = 7 170 | 171 | # absolute max crossing len (m): 172 | abs_max_crossing_len = 100 # 100 m could be a very large crossing -------------------------------------------------------------------------------- /pb_tool.cfg: -------------------------------------------------------------------------------- 1 | #/*************************************************************************** 2 | # sidewalkreator 3 | # 4 | # Configuration file for plugin builder tool (pb_tool) 5 | # Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/ 6 | # ------------------- 7 | # begin : 2021-09-29 8 | # copyright : (C) 2021 by Kaue de Moraes Vestena 9 | # email : kauemv2@gmail.com 10 | # ***************************************************************************/ 11 | # 12 | #/*************************************************************************** 13 | # * * 14 | # * This program is free software; you can redistribute it and/or modify * 15 | # * it under the terms of the GNU General Public License as published by * 16 | # * the Free Software Foundation; either version 2 of the License, or * 17 | # * (at your option) any later version. * 18 | # * * 19 | # ***************************************************************************/ 20 | # 21 | # 22 | # You can install pb_tool using: 23 | # pip install http://geoapt.net/files/pb_tool.zip 24 | # 25 | # Consider doing your development (and install of pb_tool) in a virtualenv. 26 | # 27 | # For details on setting up and using pb_tool, see: 28 | # http://g-sherman.github.io/plugin_build_tool/ 29 | # 30 | # Issues and pull requests here: 31 | # https://github.com/g-sherman/plugin_build_tool: 32 | # 33 | # Sane defaults for your plugin generated by the Plugin Builder are 34 | # already set below. 35 | # 36 | # As you add Python source files and UI files to your plugin, add 37 | # them to the appropriate [files] section below. 38 | 39 | [plugin] 40 | # Name of the plugin. This is the name of the directory that will 41 | # be created in .qgis2/python/plugins 42 | name: osm_sidewalkreator 43 | 44 | # Full path to where you want your plugin directory copied. If empty, 45 | # the QGIS default path will be used. Don't include the plugin name in 46 | # the path. 47 | plugin_path: 48 | 49 | [files] 50 | # Python files that should be deployed with the plugin 51 | python_files: __init__.py osm_sidewalkreator.py osm_sidewalkreator_dialog.py 52 | 53 | # The main dialog file that is loaded (not compiled) 54 | main_dialog: osm_sidewalkreator_dialog_base.ui 55 | 56 | # Other ui files for dialogs you create (these will be compiled) 57 | compiled_ui_files: 58 | 59 | # Resource file(s) that will be compiled 60 | resource_files: resources.qrc 61 | 62 | # Other files required for the plugin 63 | extras: metadata.txt icon.png 64 | 65 | # Other directories to be deployed with the plugin. 66 | # These must be subdirectories under the plugin directory 67 | extra_dirs: 68 | 69 | # ISO code(s) for any locales (translations), separated by spaces. 70 | # Corresponding .ts files must exist in the i18n directory 71 | locales: 72 | 73 | [help] 74 | # the built help directory that should be deployed with the plugin 75 | dir: help/build/html 76 | # the name of the directory to target in the deployed plugin 77 | target: help 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /plugin_upload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # coding=utf-8 3 | """This script uploads a plugin package to the plugin repository. 4 | Authors: A. Pasotti, V. Picavet 5 | git sha : $TemplateVCSFormat 6 | """ 7 | 8 | import sys 9 | import getpass 10 | import xmlrpc.client 11 | from optparse import OptionParser 12 | 13 | standard_library.install_aliases() 14 | 15 | # Configuration 16 | PROTOCOL = 'https' 17 | SERVER = 'plugins.qgis.org' 18 | PORT = '443' 19 | ENDPOINT = '/plugins/RPC2/' 20 | VERBOSE = False 21 | 22 | 23 | def main(parameters, arguments): 24 | """Main entry point. 25 | 26 | :param parameters: Command line parameters. 27 | :param arguments: Command line arguments. 28 | """ 29 | address = "{protocol}://{username}:{password}@{server}:{port}{endpoint}".format( 30 | protocol=PROTOCOL, 31 | username=parameters.username, 32 | password=parameters.password, 33 | server=parameters.server, 34 | port=parameters.port, 35 | endpoint=ENDPOINT) 36 | print("Connecting to: %s" % hide_password(address)) 37 | 38 | server = xmlrpc.client.ServerProxy(address, verbose=VERBOSE) 39 | 40 | try: 41 | with open(arguments[0], 'rb') as handle: 42 | plugin_id, version_id = server.plugin.upload( 43 | xmlrpc.client.Binary(handle.read())) 44 | print("Plugin ID: %s" % plugin_id) 45 | print("Version ID: %s" % version_id) 46 | except xmlrpc.client.ProtocolError as err: 47 | print("A protocol error occurred") 48 | print("URL: %s" % hide_password(err.url, 0)) 49 | print("HTTP/HTTPS headers: %s" % err.headers) 50 | print("Error code: %d" % err.errcode) 51 | print("Error message: %s" % err.errmsg) 52 | except xmlrpc.client.Fault as err: 53 | print("A fault occurred") 54 | print("Fault code: %d" % err.faultCode) 55 | print("Fault string: %s" % err.faultString) 56 | 57 | 58 | def hide_password(url, start=6): 59 | """Returns the http url with password part replaced with '*'. 60 | 61 | :param url: URL to upload the plugin to. 62 | :type url: str 63 | 64 | :param start: Position of start of password. 65 | :type start: int 66 | """ 67 | start_position = url.find(':', start) + 1 68 | end_position = url.find('@') 69 | return "%s%s%s" % ( 70 | url[:start_position], 71 | '*' * (end_position - start_position), 72 | url[end_position:]) 73 | 74 | 75 | if __name__ == "__main__": 76 | parser = OptionParser(usage="%prog [options] plugin.zip") 77 | parser.add_option( 78 | "-w", "--password", dest="password", 79 | help="Password for plugin site", metavar="******") 80 | parser.add_option( 81 | "-u", "--username", dest="username", 82 | help="Username of plugin site", metavar="user") 83 | parser.add_option( 84 | "-p", "--port", dest="port", 85 | help="Server port to connect to", metavar="80") 86 | parser.add_option( 87 | "-s", "--server", dest="server", 88 | help="Specify server name", metavar="plugins.qgis.org") 89 | options, args = parser.parse_args() 90 | if len(args) != 1: 91 | print("Please specify zip file.\n") 92 | parser.print_help() 93 | sys.exit(1) 94 | if not options.server: 95 | options.server = SERVER 96 | if not options.port: 97 | options.port = PORT 98 | if not options.username: 99 | # interactive mode 100 | username = getpass.getuser() 101 | print("Please enter user name [%s] :" % username, end=' ') 102 | 103 | res = input() 104 | if res != "": 105 | options.username = res 106 | else: 107 | options.username = username 108 | if not options.password: 109 | # interactive mode 110 | options.password = getpass.getpass() 111 | main(options, args) 112 | -------------------------------------------------------------------------------- /pylintrc: -------------------------------------------------------------------------------- 1 | [MASTER] 2 | 3 | # Specify a configuration file. 4 | #rcfile= 5 | 6 | # Python code to execute, usually for sys.path manipulation such as 7 | # pygtk.require(). 8 | #init-hook= 9 | 10 | # Profiled execution. 11 | profile=no 12 | 13 | # Add files or directories to the blacklist. They should be base names, not 14 | # paths. 15 | ignore=CVS 16 | 17 | # Pickle collected data for later comparisons. 18 | persistent=yes 19 | 20 | # List of plugins (as comma separated values of python modules names) to load, 21 | # usually to register additional checkers. 22 | load-plugins= 23 | 24 | 25 | [MESSAGES CONTROL] 26 | 27 | # Enable the message, report, category or checker with the given id(s). You can 28 | # either give multiple identifier separated by comma (,) or put this option 29 | # multiple time. See also the "--disable" option for examples. 30 | #enable= 31 | 32 | # Disable the message, report, category or checker with the given id(s). You 33 | # can either give multiple identifiers separated by comma (,) or put this 34 | # option multiple times (only on the command line, not in the configuration 35 | # file where it should appear only once).You can also use "--disable=all" to 36 | # disable everything first and then reenable specific checks. For example, if 37 | # you want to run only the similarities checker, you can use "--disable=all 38 | # --enable=similarities". If you want to run only the classes checker, but have 39 | # no Warning level messages displayed, use"--disable=all --enable=classes 40 | # --disable=W" 41 | # see http://stackoverflow.com/questions/21487025/pylint-locally-defined-disables-still-give-warnings-how-to-suppress-them 42 | disable=locally-disabled,C0103 43 | 44 | 45 | [REPORTS] 46 | 47 | # Set the output format. Available formats are text, parseable, colorized, msvs 48 | # (visual studio) and html. You can also give a reporter class, eg 49 | # mypackage.mymodule.MyReporterClass. 50 | output-format=text 51 | 52 | # Put messages in a separate file for each module / package specified on the 53 | # command line instead of printing them on stdout. Reports (if any) will be 54 | # written in a file name "pylint_global.[txt|html]". 55 | files-output=no 56 | 57 | # Tells whether to display a full report or only the messages 58 | reports=yes 59 | 60 | # Python expression which should return a note less than 10 (10 is the highest 61 | # note). You have access to the variables errors warning, statement which 62 | # respectively contain the number of errors / warnings messages and the total 63 | # number of statements analyzed. This is used by the global evaluation report 64 | # (RP0004). 65 | evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) 66 | 67 | # Add a comment according to your evaluation note. This is used by the global 68 | # evaluation report (RP0004). 69 | comment=no 70 | 71 | # Template used to display messages. This is a python new-style format string 72 | # used to format the message information. See doc for all details 73 | #msg-template= 74 | 75 | 76 | [BASIC] 77 | 78 | # Required attributes for module, separated by a comma 79 | required-attributes= 80 | 81 | # List of builtins function names that should not be used, separated by a comma 82 | bad-functions=map,filter,apply,input 83 | 84 | # Regular expression which should only match correct module names 85 | module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ 86 | 87 | # Regular expression which should only match correct module level names 88 | const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ 89 | 90 | # Regular expression which should only match correct class names 91 | class-rgx=[A-Z_][a-zA-Z0-9]+$ 92 | 93 | # Regular expression which should only match correct function names 94 | function-rgx=[a-z_][a-z0-9_]{2,30}$ 95 | 96 | # Regular expression which should only match correct method names 97 | method-rgx=[a-z_][a-z0-9_]{2,30}$ 98 | 99 | # Regular expression which should only match correct instance attribute names 100 | attr-rgx=[a-z_][a-z0-9_]{2,30}$ 101 | 102 | # Regular expression which should only match correct argument names 103 | argument-rgx=[a-z_][a-z0-9_]{2,30}$ 104 | 105 | # Regular expression which should only match correct variable names 106 | variable-rgx=[a-z_][a-z0-9_]{2,30}$ 107 | 108 | # Regular expression which should only match correct attribute names in class 109 | # bodies 110 | class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ 111 | 112 | # Regular expression which should only match correct list comprehension / 113 | # generator expression variable names 114 | inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ 115 | 116 | # Good variable names which should always be accepted, separated by a comma 117 | good-names=i,j,k,ex,Run,_ 118 | 119 | # Bad variable names which should always be refused, separated by a comma 120 | bad-names=foo,bar,baz,toto,tutu,tata 121 | 122 | # Regular expression which should only match function or class names that do 123 | # not require a docstring. 124 | no-docstring-rgx=__.*__ 125 | 126 | # Minimum line length for functions/classes that require docstrings, shorter 127 | # ones are exempt. 128 | docstring-min-length=-1 129 | 130 | 131 | [MISCELLANEOUS] 132 | 133 | # List of note tags to take in consideration, separated by a comma. 134 | notes=FIXME,XXX,TODO 135 | 136 | 137 | [TYPECHECK] 138 | 139 | # Tells whether missing members accessed in mixin class should be ignored. A 140 | # mixin class is detected if its name ends with "mixin" (case insensitive). 141 | ignore-mixin-members=yes 142 | 143 | # List of classes names for which member attributes should not be checked 144 | # (useful for classes with attributes dynamically set). 145 | ignored-classes=SQLObject 146 | 147 | # When zope mode is activated, add a predefined set of Zope acquired attributes 148 | # to generated-members. 149 | zope=no 150 | 151 | # List of members which are set dynamically and missed by pylint inference 152 | # system, and so shouldn't trigger E0201 when accessed. Python regular 153 | # expressions are accepted. 154 | generated-members=REQUEST,acl_users,aq_parent 155 | 156 | 157 | [VARIABLES] 158 | 159 | # Tells whether we should check for unused import in __init__ files. 160 | init-import=no 161 | 162 | # A regular expression matching the beginning of the name of dummy variables 163 | # (i.e. not used). 164 | dummy-variables-rgx=_$|dummy 165 | 166 | # List of additional names supposed to be defined in builtins. Remember that 167 | # you should avoid to define new builtins when possible. 168 | additional-builtins= 169 | 170 | 171 | [FORMAT] 172 | 173 | # Maximum number of characters on a single line. 174 | max-line-length=80 175 | 176 | # Regexp for a line that is allowed to be longer than the limit. 177 | ignore-long-lines=^\s*(# )??$ 178 | 179 | # Allow the body of an if to be on the same line as the test if there is no 180 | # else. 181 | single-line-if-stmt=no 182 | 183 | # List of optional constructs for which whitespace checking is disabled 184 | no-space-check=trailing-comma,dict-separator 185 | 186 | # Maximum number of lines in a module 187 | max-module-lines=1000 188 | 189 | # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 190 | # tab). 191 | indent-string=' ' 192 | 193 | 194 | [SIMILARITIES] 195 | 196 | # Minimum lines number of a similarity. 197 | min-similarity-lines=4 198 | 199 | # Ignore comments when computing similarities. 200 | ignore-comments=yes 201 | 202 | # Ignore docstrings when computing similarities. 203 | ignore-docstrings=yes 204 | 205 | # Ignore imports when computing similarities. 206 | ignore-imports=no 207 | 208 | 209 | [IMPORTS] 210 | 211 | # Deprecated modules which should not be used, separated by a comma 212 | deprecated-modules=regsub,TERMIOS,Bastion,rexec 213 | 214 | # Create a graph of every (i.e. internal and external) dependencies in the 215 | # given file (report RP0402 must not be disabled) 216 | import-graph= 217 | 218 | # Create a graph of external dependencies in the given file (report RP0402 must 219 | # not be disabled) 220 | ext-import-graph= 221 | 222 | # Create a graph of internal dependencies in the given file (report RP0402 must 223 | # not be disabled) 224 | int-import-graph= 225 | 226 | 227 | [DESIGN] 228 | 229 | # Maximum number of arguments for function / method 230 | max-args=5 231 | 232 | # Argument names that match this expression will be ignored. Default to name 233 | # with leading underscore 234 | ignored-argument-names=_.* 235 | 236 | # Maximum number of locals for function / method body 237 | max-locals=15 238 | 239 | # Maximum number of return / yield for function / method body 240 | max-returns=6 241 | 242 | # Maximum number of branch for function / method body 243 | max-branches=12 244 | 245 | # Maximum number of statements in function / method body 246 | max-statements=50 247 | 248 | # Maximum number of parents for a class (see R0901). 249 | max-parents=7 250 | 251 | # Maximum number of attributes for a class (see R0902). 252 | max-attributes=7 253 | 254 | # Minimum number of public methods for a class (see R0903). 255 | min-public-methods=2 256 | 257 | # Maximum number of public methods for a class (see R0904). 258 | max-public-methods=20 259 | 260 | 261 | [CLASSES] 262 | 263 | # List of interface methods to ignore, separated by a comma. This is used for 264 | # instance to not check methods defines in Zope's Interface base class. 265 | ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by 266 | 267 | # List of method names used to declare (i.e. assign) instance attributes. 268 | defining-attr-methods=__init__,__new__,setUp 269 | 270 | # List of valid names for the first argument in a class method. 271 | valid-classmethod-first-arg=cls 272 | 273 | # List of valid names for the first argument in a metaclass class method. 274 | valid-metaclass-classmethod-first-arg=mcs 275 | 276 | 277 | [EXCEPTIONS] 278 | 279 | # Exceptions that will emit a warning when being caught. Defaults to 280 | # "Exception" 281 | overgeneral-exceptions=Exception 282 | -------------------------------------------------------------------------------- /release/deprecated/create_filelist.py: -------------------------------------------------------------------------------- 1 | ''' 2 | script only intended to generate a filetree to decide which file should go to the zip package to update package in the qgis plugins 3 | ''' 4 | 5 | import os 6 | 7 | this_file_path = os.path.realpath(__file__) 8 | # thx: https://stackoverflow.com/a/595332/4436950 9 | 10 | rootpath = os.path.dirname(os.path.dirname(this_file_path)) 11 | # thx: https://stackoverflow.com/a/10149358/4436950 12 | 13 | filelist = [] 14 | 15 | excludedirlist = ['.git','__pycache__','notes','i18n','release','temporary','*.pyc'] 16 | 17 | for dirpath,subdirnames,files in os.walk(rootpath,): 18 | # thx: thispointer.com 19 | 20 | filelist += [os.path.join(dirpath,file) for file in files if not any(excluder in dirpath for excluder in excludedirlist)] 21 | 22 | 23 | outpath = os.path.join(rootpath,'release/filelist.py') 24 | 25 | with open(outpath,'w+') as pathwriter: 26 | pathwriter.write('"""\nyou just need to comment the lines with files you wanna exclude from release\n"""\n\nfilelist = [\n') 27 | 28 | for item in filelist: 29 | pathwriter.write(f'"{item}",\n') 30 | 31 | pathwriter.write(']') 32 | 33 | 34 | -------------------------------------------------------------------------------- /release/release_zip.py: -------------------------------------------------------------------------------- 1 | import os, shutil 2 | # from zipfile import ZipFile 3 | # thx: https://thispointer.com/python-how-to-create-a-zip-archive-from-multiple-files-or-directory/ 4 | 5 | from pathlib import Path 6 | 7 | """ 8 | 9 | RELEASE SYSTEM FOR THE PLUGIN 10 | 11 | you just need to include in the list "exclude_patternslist" the patterns that should not be included in the release 12 | 13 | it will export the zip file to a folder named "sidewalkreator_release" to the homefolder 14 | 15 | """ 16 | 17 | 18 | 19 | exclude_patternslist = ['.git','.github','__pycache__','notes','i18n','release','*.pyc','temporary','plugin_upload.py','trash','paper_publication','extra_tests'] 20 | 21 | 22 | # print(filelist) 23 | 24 | this_file_path = os.path.realpath(__file__) 25 | plugin_path = os.path.dirname(os.path.dirname(this_file_path)) 26 | 27 | 28 | 29 | destfolderpath = str(Path.home()/'sidewalkreator_release'/'osm_sidewalkreator'/'osm_sidewalkreator') 30 | 31 | release_folderpath = str(Path(destfolderpath).parent) 32 | 33 | outpath = os.path.join(os.path.expanduser("~"),'sidewalkreator_release','osm_sidewalkreator.zip') 34 | 35 | 36 | 37 | 38 | 39 | if os.path.exists(release_folderpath): 40 | shutil.rmtree(release_folderpath) 41 | 42 | #thx: https://stackoverflow.com/a/42488524/4436950 43 | shutil.copytree(plugin_path,destfolderpath,ignore=shutil.ignore_patterns(*exclude_patternslist)) 44 | 45 | if os.path.exists(outpath): 46 | os.remove(outpath) 47 | 48 | 49 | 50 | shutil.make_archive(outpath.replace('.zip',''),'zip',release_folderpath) 51 | 52 | print(outpath) 53 | print(release_folderpath) 54 | print(destfolderpath) 55 | 56 | 57 | -------------------------------------------------------------------------------- /requeriments.txt: -------------------------------------------------------------------------------- 1 | osm2geojson 2 | -------------------------------------------------------------------------------- /resources.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Resource object code 4 | # 5 | # Created by: The Resource Compiler for PyQt5 (Qt v5.12.8) 6 | # 7 | # WARNING! All changes made in this file will be lost! 8 | 9 | from PyQt5 import QtCore 10 | 11 | qt_resource_data = b"\ 12 | \x00\x00\x05\x07\ 13 | \x89\ 14 | \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ 15 | \x00\x00\x18\x00\x00\x00\x18\x08\x06\x00\x00\x00\xe0\x77\x3d\xf8\ 16 | \x00\x00\x04\xce\x49\x44\x41\x54\x78\x5e\x95\x55\x59\x48\x5d\x57\ 17 | \x14\x3d\xce\x63\x1d\xea\x6c\x9c\xe2\x6c\xe2\x3c\xcf\x46\x34\x8a\ 18 | \xa2\x3f\x16\xd1\x1a\x12\x0d\x04\xad\xe2\x6c\x2f\x0e\x38\x51\xe3\ 19 | \x10\xac\x2f\x4f\x4c\xe2\xf3\x89\x5e\xd4\x38\x84\x97\x18\xad\xc3\ 20 | \x87\x48\x6e\xa0\xa5\x1f\xfd\x29\x6d\xe9\x47\xa1\xfd\x28\x85\xd0\ 21 | \x26\x81\xf4\xa3\x4d\x4b\x53\xdc\xdd\x7b\xdb\x2b\xfa\x6c\xd3\x74\ 22 | \xc3\x62\x3f\xee\xbd\x67\xad\x73\xd6\xde\x67\x3f\x21\x84\x78\xc7\ 23 | \xcc\xcc\xcc\xa0\xd7\x9b\x7e\x6d\x6f\x6f\x6f\x70\x72\x72\x32\xb8\ 24 | \xb9\xb9\x19\xbc\xbc\xbc\x0c\x01\x01\x01\xab\x21\x21\x21\xf2\xb9\ 25 | \x73\xe7\xe4\xf3\xe7\xcf\xcb\x51\x51\x51\x72\x4c\x4c\x0c\x67\x7a\ 26 | \x16\x1a\x1a\x2a\x07\x05\x05\xc9\x7e\x7e\x7e\xb2\xb7\xb7\xb7\x8c\ 27 | \xeb\x64\x5c\x2f\xdb\xd9\xd9\xc9\x56\x56\x56\x7a\xf1\x77\x6c\x5b\ 28 | \x58\x58\x00\x80\x00\x47\x47\x47\xb8\x71\xc3\x96\x7f\xab\xb8\x75\ 29 | \xcb\x0d\x90\x10\x62\x63\x63\x61\x66\xc6\xfb\xc4\xbb\xdb\xb7\xdd\ 30 | \x01\x45\xe0\xec\xd9\xb3\x30\x31\xe1\x70\xe2\xdd\xf0\xb0\xd9\x1f\ 31 | \xcc\x6e\x62\x62\xb2\x6d\x69\x69\xc9\x0f\x9d\x9d\x9d\xc1\xdd\xdd\ 32 | \x1d\x7c\x7c\x7c\x78\x11\x2d\xc6\x9d\x33\x79\x62\x62\x22\xa4\xa6\ 33 | \xa6\x42\x5a\x5a\x1a\xa4\xa4\xa4\x40\x7c\x7c\x3c\x44\x47\x47\x43\ 34 | \x44\x44\x04\xe0\x29\x00\x4f\x01\x78\x6a\x70\x71\x71\x01\x07\x07\ 35 | \x07\xb0\xb6\xb6\x7e\xc9\x02\x68\xcf\x09\x01\x0f\x0f\x0f\x16\x08\ 36 | \x0c\x0c\x84\xb0\xb0\x30\xde\x3d\x91\x11\x79\x66\x66\x26\x64\x67\ 37 | \x67\x43\x7a\x7a\x3a\x24\x25\x25\xb1\x30\x5a\x05\x68\x23\xf8\xfb\ 38 | \xfb\x03\xda\x04\xae\xae\xae\xec\x84\x8d\x8d\xcd\xa1\x80\xb9\xb9\ 39 | \x39\x0b\x0c\x0f\x5b\x1e\x09\xf8\xfa\xfa\xb2\x40\x78\x78\x38\x0b\ 40 | \x24\x24\x24\xb0\x00\x91\x5f\xb8\x70\x01\x32\x32\x32\x20\x39\x39\ 41 | \x99\x05\xe8\x84\x6f\x24\x80\x85\x39\x65\x11\x9d\x20\x32\x32\x12\ 42 | \xe2\xe2\xe2\x98\x90\x76\x4e\xe4\x24\x46\x96\x61\xc1\xd9\xa2\xe0\ 43 | \xe0\x60\x16\x20\x8b\x48\x80\x2c\x3a\x12\x40\x72\x2e\xb2\xad\xad\ 44 | \x2d\x60\x07\x00\x76\x02\xef\x84\x16\x5d\xbb\x76\x0d\x9a\x9a\x9a\ 45 | \xa0\xb9\xb9\x19\xea\xeb\xeb\xa1\xb2\xb2\x12\xaa\xab\xab\xf9\x79\ 46 | \x43\x43\x03\x34\x36\x36\x72\xae\xad\xad\x85\xab\x57\xaf\x42\x55\ 47 | \x55\x15\x94\x95\x95\x41\x71\x71\x31\xe4\xe6\xe6\x1e\xe4\xe7\xe7\ 48 | \x3b\x0a\x54\x94\xa8\x30\xd4\x3d\x94\x55\x90\x40\x4f\x4f\x0f\xf4\ 49 | \xf6\xf6\x42\x5f\x5f\x1f\xe7\x9a\x9a\x1a\x16\x6a\x6f\x6f\x87\xee\ 50 | \xee\x6e\xe8\xef\xef\xe7\x77\x9d\x9d\x9d\xd0\xda\xda\x0a\x75\x75\ 51 | \x75\x70\xe5\xca\x15\x28\x2f\x2f\x87\x92\x92\x12\x28\x2c\x2c\x7c\ 52 | \x5b\xa0\x25\x12\xed\x9a\x8a\x4c\x59\x05\xd9\x33\x34\x34\x84\xb5\ 53 | \x19\x3e\x02\xed\x9c\x76\x2d\x49\x12\x0c\x0c\x0c\xc0\xe8\xe8\x28\ 54 | \x3f\x27\xf1\x8e\x8e\x0e\x16\xa7\x4d\x54\x54\x54\x40\x69\x69\xe9\ 55 | \xa1\x80\xa7\xa7\xa7\x84\x60\x01\xca\x2a\xa8\x78\xe3\xe3\xe3\xd8\ 56 | \xdf\x13\xa0\xd1\x68\x38\x1f\x17\xa0\xdd\x8f\x8c\x8c\xc0\xf5\xeb\ 57 | \xd7\x5f\x2f\x80\x7e\x4b\x67\xce\x9c\x61\x01\xca\x2a\xa8\xc7\xa7\ 58 | \xa6\xa6\xe0\xce\x9d\x3b\x30\x3d\x3d\xcd\x19\x7d\x7e\x8c\x24\x4a\ 59 | \x5b\x5b\x9b\x82\x16\x29\x68\x8f\x82\xe4\x0a\x5a\xa4\xb4\xb4\xb4\ 60 | \x28\x68\x91\x72\xf9\xf2\x65\x05\x2d\x52\xd0\x22\x05\x1b\xe2\x2d\ 61 | \x81\xd5\x97\xe8\x92\x68\x34\x8e\x7c\x59\x54\x50\xef\xcf\xce\xce\ 62 | \x82\x2c\xcb\x8c\xf9\xf9\x79\xbc\xc9\x33\x16\xdc\x19\xff\x27\xb0\ 63 | \x1d\x25\x6a\x49\x63\xd0\x45\x5a\x5a\x5a\x82\xd5\xd5\x55\x58\x5b\ 64 | \x5b\x83\x95\x95\x15\x16\x18\x7f\x4f\xfc\xd0\xf9\xae\xb8\xbf\xaf\ 65 | \x15\x1e\xc6\x5c\xff\x18\x78\x49\x24\xea\x18\x63\xd0\x48\xb8\x77\ 66 | \xef\x1e\x3c\x7c\xf8\x10\x36\x37\x37\x61\x7d\x7d\x9d\x05\x66\xdf\ 67 | \x17\x7d\xf7\x3f\x10\xa0\x4c\x8a\xdf\x15\xad\x90\x3f\x5b\x15\xbe\ 68 | \x68\xaf\xa9\x31\xef\x51\x60\xb7\x48\xd4\x31\x53\x53\xae\xdc\x39\ 69 | \x2a\x68\x2c\x3c\x78\xf0\x00\x76\x76\x76\x60\x6f\x6f\x0f\xb6\xb7\ 70 | \xb7\x59\x60\x70\x50\x98\x22\xf1\xa7\x8f\xb4\xe2\xd7\xc7\x93\xe2\ 71 | \xe0\xd9\x77\xe2\x25\x0a\x7c\x84\xb0\x37\xe6\xe6\xc0\x9b\x28\xd1\ 72 | \x3c\xa1\x22\x53\x56\x91\x93\x93\xc3\xbb\xde\xdd\xdd\x85\xfd\xfd\ 73 | \x7d\x16\x52\x6b\xa0\x68\x44\xb0\x72\x53\xbc\x78\xf2\x95\xf8\xf6\ 74 | \xd8\x04\xfd\x12\xe1\x6f\xcc\x2f\xb0\x5b\x24\x9a\x37\xf4\x11\x65\ 75 | \x15\x34\x73\x0c\x06\x03\xdb\xb3\xb5\xb5\x05\x1b\x1b\x1b\x27\x8a\ 76 | \x4c\x64\x88\xdf\x8e\x09\x10\x7e\x7c\xf5\xb3\x47\xde\x71\x7e\x81\ 77 | \x03\x4b\xa2\xa1\x45\x1f\x50\x56\x91\x97\x97\x07\xcb\xcb\xcb\x5c\ 78 | \x07\x12\xa2\x6c\xdc\x45\xb8\x26\x95\x48\x8f\x8b\x1c\xfc\x69\x7e\ 79 | \xf0\xe4\x93\x4b\xba\xa3\x8f\xb0\x1d\x25\x9a\x96\xf4\x67\x42\x59\ 80 | \x05\xce\x11\x98\x9b\x9b\x83\x85\x85\x05\x58\x5c\x5c\xe4\x6c\x2c\ 81 | \x40\x81\xa4\x7e\x88\x2f\x54\x81\xe7\xdf\x47\xc3\xfc\x8c\x0e\x3e\ 82 | \xd7\xeb\xef\xc2\xe0\xa0\xa9\xc0\x29\x29\xd1\xa4\x34\xc6\xc5\x8b\ 83 | \x17\xf9\x72\xe9\x74\x3a\x22\x56\xf3\x29\x01\x0a\x24\xb6\x7f\xf5\ 84 | \xdc\xe7\x9b\x5f\x5e\x78\xc2\xdd\xd9\x69\x50\xf0\xfb\xa7\x04\x9d\ 85 | \xae\x58\x60\x3b\x4a\xd4\x92\xc6\x28\x28\x28\xe0\x11\xa1\xd5\x6a\ 86 | \x61\x72\x72\x92\xf3\xbf\x09\x50\x00\x94\x9b\x7d\xbc\x3c\xf2\x68\ 87 | \x0b\x89\x7f\x3a\xc4\x87\xfc\x02\xaf\xb3\x44\x33\x7e\x6e\xce\x8f\ 88 | \x67\xbd\x0a\x9c\x23\x3c\xc8\x68\xa0\x8d\x8d\x8d\x71\x7e\x9d\x80\ 89 | \x1a\xcf\xf4\xfa\x4b\xb8\xfb\x35\xb6\x87\x22\x2b\x2b\x4b\xa2\x7f\ 90 | \x2a\xf2\x8f\xb2\x8a\xa2\xa2\x22\x1e\xc5\x34\x35\x09\x34\xdc\x70\ 91 | \xee\xff\xa7\xc0\xa9\x40\x22\x07\x6c\xc9\x80\xa7\x4f\xad\x6e\x52\ 92 | \x56\x81\x27\x08\xc6\xe1\x16\xdf\xd5\xd5\x15\xa0\xc2\x78\xed\x9b\ 93 | \xc4\x5f\xab\x0f\x7e\x30\xca\xa0\x13\x20\x00\x00\x00\x00\x49\x45\ 94 | \x4e\x44\xae\x42\x60\x82\ 95 | " 96 | 97 | qt_resource_name = b"\ 98 | \x00\x07\ 99 | \x07\x3b\xe0\xb3\ 100 | \x00\x70\ 101 | \x00\x6c\x00\x75\x00\x67\x00\x69\x00\x6e\x00\x73\ 102 | \x00\x12\ 103 | \x00\x7a\xf1\x42\ 104 | \x00\x6f\ 105 | \x00\x73\x00\x6d\x00\x5f\x00\x73\x00\x69\x00\x64\x00\x65\x00\x77\x00\x61\x00\x6c\x00\x6b\x00\x72\x00\x65\x00\x61\x00\x74\x00\x6f\ 106 | \x00\x72\ 107 | \x00\x08\ 108 | \x0a\x61\x5a\xa7\ 109 | \x00\x69\ 110 | \x00\x63\x00\x6f\x00\x6e\x00\x2e\x00\x70\x00\x6e\x00\x67\ 111 | " 112 | 113 | qt_resource_struct_v1 = b"\ 114 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ 115 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ 116 | \x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ 117 | \x00\x00\x00\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ 118 | " 119 | 120 | qt_resource_struct_v2 = b"\ 121 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ 122 | \x00\x00\x00\x00\x00\x00\x00\x00\ 123 | \x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ 124 | \x00\x00\x00\x00\x00\x00\x00\x00\ 125 | \x00\x00\x00\x14\x00\x02\x00\x00\x00\x01\x00\x00\x00\x03\ 126 | \x00\x00\x00\x00\x00\x00\x00\x00\ 127 | \x00\x00\x00\x3e\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ 128 | \x00\x00\x01\x7c\x3b\x9b\x7f\xd6\ 129 | " 130 | 131 | qt_version = [int(v) for v in QtCore.qVersion().split('.')] 132 | if qt_version < [5, 8, 0]: 133 | rcc_version = 1 134 | qt_resource_struct = qt_resource_struct_v1 135 | else: 136 | rcc_version = 2 137 | qt_resource_struct = qt_resource_struct_v2 138 | 139 | def qInitResources(): 140 | QtCore.qRegisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) 141 | 142 | def qCleanupResources(): 143 | QtCore.qUnregisterResourceData(rcc_version, qt_resource_struct, qt_resource_name, qt_resource_data) 144 | 145 | qInitResources() 146 | -------------------------------------------------------------------------------- /resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | icon.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /scripts/compile-strings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LRELEASE=$1 3 | LOCALES=$2 4 | 5 | 6 | for LOCALE in ${LOCALES} 7 | do 8 | echo "Processing: ${LOCALE}.ts" 9 | # Note we don't use pylupdate with qt .pro file approach as it is flakey 10 | # about what is made available. 11 | $LRELEASE i18n/${LOCALE}.ts 12 | done 13 | -------------------------------------------------------------------------------- /scripts/run-env-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | QGIS_PREFIX_PATH=/usr/local/qgis-2.0 4 | if [ -n "$1" ]; then 5 | QGIS_PREFIX_PATH=$1 6 | fi 7 | 8 | echo ${QGIS_PREFIX_PATH} 9 | 10 | 11 | export QGIS_PREFIX_PATH=${QGIS_PREFIX_PATH} 12 | export QGIS_PATH=${QGIS_PREFIX_PATH} 13 | export LD_LIBRARY_PATH=${QGIS_PREFIX_PATH}/lib 14 | export PYTHONPATH=${QGIS_PREFIX_PATH}/share/qgis/python:${QGIS_PREFIX_PATH}/share/qgis/python/plugins:${PYTHONPATH} 15 | 16 | echo "QGIS PATH: $QGIS_PREFIX_PATH" 17 | export QGIS_DEBUG=0 18 | export QGIS_LOG_FILE=/tmp/inasafe/realtime/logs/qgis.log 19 | 20 | export PATH=${QGIS_PREFIX_PATH}/bin:$PATH 21 | 22 | echo "This script is intended to be sourced to set up your shell to" 23 | echo "use a QGIS 2.0 built in $QGIS_PREFIX_PATH" 24 | echo 25 | echo "To use it do:" 26 | echo "source $BASH_SOURCE /your/optional/install/path" 27 | echo 28 | echo "Then use the make file supplied here e.g. make guitest" 29 | -------------------------------------------------------------------------------- /scripts/update-strings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | LOCALES=$* 3 | 4 | # Get newest .py files so we don't update strings unnecessarily 5 | 6 | CHANGED_FILES=0 7 | PYTHON_FILES=`find . -regex ".*\(ui\|py\)$" -type f` 8 | for PYTHON_FILE in $PYTHON_FILES 9 | do 10 | CHANGED=$(stat -c %Y $PYTHON_FILE) 11 | if [ ${CHANGED} -gt ${CHANGED_FILES} ] 12 | then 13 | CHANGED_FILES=${CHANGED} 14 | fi 15 | done 16 | 17 | # Qt translation stuff 18 | # for .ts file 19 | UPDATE=false 20 | for LOCALE in ${LOCALES} 21 | do 22 | TRANSLATION_FILE="i18n/$LOCALE.ts" 23 | if [ ! -f ${TRANSLATION_FILE} ] 24 | then 25 | # Force translation string collection as we have a new language file 26 | touch ${TRANSLATION_FILE} 27 | UPDATE=true 28 | break 29 | fi 30 | 31 | MODIFICATION_TIME=$(stat -c %Y ${TRANSLATION_FILE}) 32 | if [ ${CHANGED_FILES} -gt ${MODIFICATION_TIME} ] 33 | then 34 | # Force translation string collection as a .py file has been updated 35 | UPDATE=true 36 | break 37 | fi 38 | done 39 | 40 | if [ ${UPDATE} == true ] 41 | # retrieve all python files 42 | then 43 | echo ${PYTHON_FILES} 44 | # update .ts 45 | echo "Please provide translations by editing the translation files below:" 46 | for LOCALE in ${LOCALES} 47 | do 48 | echo "i18n/"${LOCALE}".ts" 49 | # Note we don't use pylupdate with qt .pro file approach as it is flakey 50 | # about what is made available. 51 | pylupdate4 -noobsolete ${PYTHON_FILES} -ts i18n/${LOCALE}.ts 52 | done 53 | else 54 | echo "No need to edit any translation files (.ts) because no python files" 55 | echo "has been updated since the last update translation. " 56 | fi 57 | -------------------------------------------------------------------------------- /test/__init__.py: -------------------------------------------------------------------------------- 1 | # import qgis libs so that ve set the correct sip api version 2 | import qgis # pylint: disable=W0611 # NOQA -------------------------------------------------------------------------------- /test/extra_tests/polygon01.geojson: -------------------------------------------------------------------------------- 1 | {"type": "FeatureCollection","name": "polygon01","crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },"features": [{ "type": "Feature", "properties": {"name":"test"}, "geometry": { "type": "Polygon", "coordinates": [ [ [ -49.229681718646503, -25.453577024976543 ], [ -49.231132508944455, -25.456591787794288 ], [ -49.227911960268841, -25.457569270619153 ], [ -49.227129974008953, -25.457733899305445 ], [ -49.226378855627736, -25.45620079466434 ], [ -49.226913898858186, -25.455377651232872 ], [ -49.226985923908444, -25.454461904165367 ], [ -49.229681718646503, -25.453577024976543 ] ] ] } }]} 2 | -------------------------------------------------------------------------------- /test/extra_tests/sandbox.py: -------------------------------------------------------------------------------- 1 | import folium 2 | -------------------------------------------------------------------------------- /test/qgis_interface.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """QGIS plugin implementation. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | .. note:: This source code was copied from the 'postgis viewer' application 10 | with original authors: 11 | Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk 12 | Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org 13 | Copyright (c) 2014 Tim Sutton, tim@linfiniti.com 14 | 15 | """ 16 | 17 | __author__ = 'tim@linfiniti.com' 18 | __revision__ = '$Format:%H$' 19 | __date__ = '10/01/2011' 20 | __copyright__ = ( 21 | 'Copyright (c) 2010 by Ivan Mincik, ivan.mincik@gista.sk and ' 22 | 'Copyright (c) 2011 German Carrillo, geotux_tuxman@linuxmail.org' 23 | 'Copyright (c) 2014 Tim Sutton, tim@linfiniti.com' 24 | ) 25 | 26 | import logging 27 | from qgis.PyQt.QtCore import QObject, pyqtSlot, pyqtSignal 28 | from qgis.core import QgsMapLayerRegistry 29 | from qgis.gui import QgsMapCanvasLayer 30 | LOGGER = logging.getLogger('QGIS') 31 | 32 | 33 | #noinspection PyMethodMayBeStatic,PyPep8Naming 34 | class QgisInterface(QObject): 35 | """Class to expose QGIS objects and functions to plugins. 36 | 37 | This class is here for enabling us to run unit tests only, 38 | so most methods are simply stubs. 39 | """ 40 | currentLayerChanged = pyqtSignal(QgsMapCanvasLayer) 41 | 42 | def __init__(self, canvas): 43 | """Constructor 44 | :param canvas: 45 | """ 46 | QObject.__init__(self) 47 | self.canvas = canvas 48 | # Set up slots so we can mimic the behaviour of QGIS when layers 49 | # are added. 50 | LOGGER.debug('Initialising canvas...') 51 | # noinspection PyArgumentList 52 | QgsMapLayerRegistry.instance().layersAdded.connect(self.addLayers) 53 | # noinspection PyArgumentList 54 | QgsMapLayerRegistry.instance().layerWasAdded.connect(self.addLayer) 55 | # noinspection PyArgumentList 56 | QgsMapLayerRegistry.instance().removeAll.connect(self.removeAllLayers) 57 | 58 | # For processing module 59 | self.destCrs = None 60 | 61 | @pyqtSlot('QStringList') 62 | def addLayers(self, layers): 63 | """Handle layers being added to the registry so they show up in canvas. 64 | 65 | :param layers: list list of map layers that were added 66 | 67 | .. note:: The QgsInterface api does not include this method, 68 | it is added here as a helper to facilitate testing. 69 | """ 70 | #LOGGER.debug('addLayers called on qgis_interface') 71 | #LOGGER.debug('Number of layers being added: %s' % len(layers)) 72 | #LOGGER.debug('Layer Count Before: %s' % len(self.canvas.layers())) 73 | current_layers = self.canvas.layers() 74 | final_layers = [] 75 | for layer in current_layers: 76 | final_layers.append(QgsMapCanvasLayer(layer)) 77 | for layer in layers: 78 | final_layers.append(QgsMapCanvasLayer(layer)) 79 | 80 | self.canvas.setLayerSet(final_layers) 81 | #LOGGER.debug('Layer Count After: %s' % len(self.canvas.layers())) 82 | 83 | @pyqtSlot('QgsMapLayer') 84 | def addLayer(self, layer): 85 | """Handle a layer being added to the registry so it shows up in canvas. 86 | 87 | :param layer: list list of map layers that were added 88 | 89 | .. note: The QgsInterface api does not include this method, it is added 90 | here as a helper to facilitate testing. 91 | 92 | .. note: The addLayer method was deprecated in QGIS 1.8 so you should 93 | not need this method much. 94 | """ 95 | pass 96 | 97 | @pyqtSlot() 98 | def removeAllLayers(self): 99 | """Remove layers from the canvas before they get deleted.""" 100 | self.canvas.setLayerSet([]) 101 | 102 | def newProject(self): 103 | """Create new project.""" 104 | # noinspection PyArgumentList 105 | QgsMapLayerRegistry.instance().removeAllMapLayers() 106 | 107 | # ---------------- API Mock for QgsInterface follows ------------------- 108 | 109 | def zoomFull(self): 110 | """Zoom to the map full extent.""" 111 | pass 112 | 113 | def zoomToPrevious(self): 114 | """Zoom to previous view extent.""" 115 | pass 116 | 117 | def zoomToNext(self): 118 | """Zoom to next view extent.""" 119 | pass 120 | 121 | def zoomToActiveLayer(self): 122 | """Zoom to extent of active layer.""" 123 | pass 124 | 125 | def addVectorLayer(self, path, base_name, provider_key): 126 | """Add a vector layer. 127 | 128 | :param path: Path to layer. 129 | :type path: str 130 | 131 | :param base_name: Base name for layer. 132 | :type base_name: str 133 | 134 | :param provider_key: Provider key e.g. 'ogr' 135 | :type provider_key: str 136 | """ 137 | pass 138 | 139 | def addRasterLayer(self, path, base_name): 140 | """Add a raster layer given a raster layer file name 141 | 142 | :param path: Path to layer. 143 | :type path: str 144 | 145 | :param base_name: Base name for layer. 146 | :type base_name: str 147 | """ 148 | pass 149 | 150 | def activeLayer(self): 151 | """Get pointer to the active layer (layer selected in the legend).""" 152 | # noinspection PyArgumentList 153 | layers = QgsMapLayerRegistry.instance().mapLayers() 154 | for item in layers: 155 | return layers[item] 156 | 157 | def addToolBarIcon(self, action): 158 | """Add an icon to the plugins toolbar. 159 | 160 | :param action: Action to add to the toolbar. 161 | :type action: QAction 162 | """ 163 | pass 164 | 165 | def removeToolBarIcon(self, action): 166 | """Remove an action (icon) from the plugin toolbar. 167 | 168 | :param action: Action to add to the toolbar. 169 | :type action: QAction 170 | """ 171 | pass 172 | 173 | def addToolBar(self, name): 174 | """Add toolbar with specified name. 175 | 176 | :param name: Name for the toolbar. 177 | :type name: str 178 | """ 179 | pass 180 | 181 | def mapCanvas(self): 182 | """Return a pointer to the map canvas.""" 183 | return self.canvas 184 | 185 | def mainWindow(self): 186 | """Return a pointer to the main window. 187 | 188 | In case of QGIS it returns an instance of QgisApp. 189 | """ 190 | pass 191 | 192 | def addDockWidget(self, area, dock_widget): 193 | """Add a dock widget to the main window. 194 | 195 | :param area: Where in the ui the dock should be placed. 196 | :type area: 197 | 198 | :param dock_widget: A dock widget to add to the UI. 199 | :type dock_widget: QDockWidget 200 | """ 201 | pass 202 | 203 | def legendInterface(self): 204 | """Get the legend.""" 205 | return self.canvas 206 | -------------------------------------------------------------------------------- /test/tenbytenraster.asc: -------------------------------------------------------------------------------- 1 | NCOLS 10 2 | NROWS 10 3 | XLLCENTER 1535380.000000 4 | YLLCENTER 5083260.000000 5 | DX 10 6 | DY 10 7 | NODATA_VALUE -9999 8 | 0 1 2 3 4 5 6 7 8 9 9 | 0 1 2 3 4 5 6 7 8 9 10 | 0 1 2 3 4 5 6 7 8 9 11 | 0 1 2 3 4 5 6 7 8 9 12 | 0 1 2 3 4 5 6 7 8 9 13 | 0 1 2 3 4 5 6 7 8 9 14 | 0 1 2 3 4 5 6 7 8 9 15 | 0 1 2 3 4 5 6 7 8 9 16 | 0 1 2 3 4 5 6 7 8 9 17 | 0 1 2 3 4 5 6 7 8 9 18 | CRS 19 | NOTES 20 | -------------------------------------------------------------------------------- /test/tenbytenraster.asc.aux.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Point 4 | 5 | 6 | 7 | 9 8 | 4.5 9 | 0 10 | 2.872281323269 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/tenbytenraster.keywords: -------------------------------------------------------------------------------- 1 | title: Tenbytenraster 2 | -------------------------------------------------------------------------------- /test/tenbytenraster.lic: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tim Sutton, Linfiniti Consulting CC 5 | 6 | 7 | 8 | tenbytenraster.asc 9 | 2700044251 10 | Yes 11 | Tim Sutton 12 | Tim Sutton (QGIS Source Tree) 13 | Tim Sutton 14 | This data is publicly available from QGIS Source Tree. The original 15 | file was created and contributed to QGIS by Tim Sutton. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /test/tenbytenraster.prj: -------------------------------------------------------------------------------- 1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] -------------------------------------------------------------------------------- /test/tenbytenraster.qml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 0 26 | 27 | -------------------------------------------------------------------------------- /test/test_init.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Tests QGIS plugin init.""" 3 | 4 | __author__ = 'Tim Sutton ' 5 | __revision__ = '$Format:%H$' 6 | __date__ = '17/10/2010' 7 | __license__ = "GPL" 8 | __copyright__ = 'Copyright 2012, Australia Indonesia Facility for ' 9 | __copyright__ += 'Disaster Reduction' 10 | 11 | import os 12 | import unittest 13 | import logging 14 | import configparser 15 | 16 | LOGGER = logging.getLogger('QGIS') 17 | 18 | 19 | class TestInit(unittest.TestCase): 20 | """Test that the plugin init is usable for QGIS. 21 | 22 | Based heavily on the validator class by Alessandro 23 | Passoti available here: 24 | 25 | http://github.com/qgis/qgis-django/blob/master/qgis-app/ 26 | plugins/validator.py 27 | 28 | """ 29 | 30 | def test_read_init(self): 31 | """Test that the plugin __init__ will validate on plugins.qgis.org.""" 32 | 33 | # You should update this list according to the latest in 34 | # https://github.com/qgis/qgis-django/blob/master/qgis-app/ 35 | # plugins/validator.py 36 | 37 | required_metadata = [ 38 | 'name', 39 | 'description', 40 | 'version', 41 | 'qgisMinimumVersion', 42 | 'email', 43 | 'author'] 44 | 45 | file_path = os.path.abspath(os.path.join( 46 | os.path.dirname(__file__), os.pardir, 47 | 'metadata.txt')) 48 | LOGGER.info(file_path) 49 | metadata = [] 50 | parser = configparser.ConfigParser() 51 | parser.optionxform = str 52 | parser.read(file_path) 53 | message = 'Cannot find a section named "general" in %s' % file_path 54 | assert parser.has_section('general'), message 55 | metadata.extend(parser.items('general')) 56 | 57 | for expectation in required_metadata: 58 | message = ('Cannot find metadata "%s" in metadata source (%s).' % ( 59 | expectation, file_path)) 60 | 61 | self.assertIn(expectation, dict(metadata), message) 62 | 63 | if __name__ == '__main__': 64 | unittest.main() 65 | -------------------------------------------------------------------------------- /test/test_osm_sidewalkreator_dialog.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Dialog test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | 11 | __author__ = 'kauemv2@gmail.com' 12 | __date__ = '2021-09-29' 13 | __copyright__ = 'Copyright 2021, Kaue de Moraes Vestena' 14 | 15 | import unittest 16 | 17 | from qgis.PyQt.QtGui import QDialogButtonBox, QDialog 18 | 19 | from osm_sidewalkreator_dialog import sidewalkreatorDialog 20 | 21 | from utilities import get_qgis_app 22 | QGIS_APP = get_qgis_app() 23 | 24 | 25 | class sidewalkreatorDialogTest(unittest.TestCase): 26 | """Test dialog works.""" 27 | 28 | def setUp(self): 29 | """Runs before each test.""" 30 | self.dialog = sidewalkreatorDialog(None) 31 | 32 | def tearDown(self): 33 | """Runs after each test.""" 34 | self.dialog = None 35 | 36 | # QDialogButtonBox button_box 37 | 38 | def test_dialog_ok(self): 39 | """Test we can click OK.""" 40 | 41 | button = self.dialog.button_box.button(QDialogButtonBox.Ok) 42 | button.click() 43 | result = self.dialog.result() 44 | self.assertEqual(result, QDialog.Accepted) 45 | 46 | def test_dialog_cancel(self): 47 | """Test we can click cancel.""" 48 | button = self.dialog.button_box.button(QDialogButtonBox.Cancel) 49 | button.click() 50 | result = self.dialog.result() 51 | self.assertEqual(result, QDialog.Rejected) 52 | 53 | if __name__ == "__main__": 54 | suite = unittest.makeSuite(sidewalkreatorDialogTest) 55 | runner = unittest.TextTestRunner(verbosity=2) 56 | runner.run(suite) 57 | 58 | -------------------------------------------------------------------------------- /test/test_qgis_environment.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Tests for QGIS functionality. 3 | 4 | 5 | .. note:: This program is free software; you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation; either version 2 of the License, or 8 | (at your option) any later version. 9 | 10 | """ 11 | __author__ = 'tim@linfiniti.com' 12 | __date__ = '20/01/2011' 13 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 14 | 'Disaster Reduction') 15 | 16 | import os 17 | import unittest 18 | from qgis.core import ( 19 | QgsProviderRegistry, 20 | QgsCoordinateReferenceSystem, 21 | QgsRasterLayer) 22 | 23 | from .utilities import get_qgis_app 24 | QGIS_APP = get_qgis_app() 25 | 26 | 27 | class QGISTest(unittest.TestCase): 28 | """Test the QGIS Environment""" 29 | 30 | def test_qgis_environment(self): 31 | """QGIS environment has the expected providers""" 32 | 33 | r = QgsProviderRegistry.instance() 34 | self.assertIn('gdal', r.providerList()) 35 | self.assertIn('ogr', r.providerList()) 36 | self.assertIn('postgres', r.providerList()) 37 | 38 | def test_projection(self): 39 | """Test that QGIS properly parses a wkt string. 40 | """ 41 | crs = QgsCoordinateReferenceSystem() 42 | wkt = ( 43 | 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",' 44 | 'SPHEROID["WGS_1984",6378137.0,298.257223563]],' 45 | 'PRIMEM["Greenwich",0.0],UNIT["Degree",' 46 | '0.0174532925199433]]') 47 | crs.createFromWkt(wkt) 48 | auth_id = crs.authid() 49 | expected_auth_id = 'EPSG:4326' 50 | self.assertEqual(auth_id, expected_auth_id) 51 | 52 | # now test for a loaded layer 53 | path = os.path.join(os.path.dirname(__file__), 'tenbytenraster.asc') 54 | title = 'TestRaster' 55 | layer = QgsRasterLayer(path, title) 56 | auth_id = layer.crs().authid() 57 | self.assertEqual(auth_id, expected_auth_id) 58 | 59 | if __name__ == '__main__': 60 | unittest.main() 61 | -------------------------------------------------------------------------------- /test/test_resources.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Resources test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | 11 | __author__ = 'kauemv2@gmail.com' 12 | __date__ = '2021-09-29' 13 | __copyright__ = 'Copyright 2021, Kaue de Moraes Vestena' 14 | 15 | import unittest 16 | 17 | from qgis.PyQt.QtGui import QIcon 18 | 19 | 20 | 21 | class sidewalkreatorDialogTest(unittest.TestCase): 22 | """Test rerources work.""" 23 | 24 | def setUp(self): 25 | """Runs before each test.""" 26 | pass 27 | 28 | def tearDown(self): 29 | """Runs after each test.""" 30 | pass 31 | 32 | def test_icon_png(self): 33 | """Test we can click OK.""" 34 | path = ':/plugins/sidewalkreator/icon.png' 35 | icon = QIcon(path) 36 | self.assertFalse(icon.isNull()) 37 | 38 | if __name__ == "__main__": 39 | suite = unittest.makeSuite(sidewalkreatorResourcesTest) 40 | runner = unittest.TextTestRunner(verbosity=2) 41 | runner.run(suite) 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /test/test_translations.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Safe Translations Test. 3 | 4 | .. note:: This program is free software; you can redistribute it and/or modify 5 | it under the terms of the GNU General Public License as published by 6 | the Free Software Foundation; either version 2 of the License, or 7 | (at your option) any later version. 8 | 9 | """ 10 | from .utilities import get_qgis_app 11 | 12 | __author__ = 'ismailsunni@yahoo.co.id' 13 | __date__ = '12/10/2011' 14 | __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 15 | 'Disaster Reduction') 16 | import unittest 17 | import os 18 | 19 | from qgis.PyQt.QtCore import QCoreApplication, QTranslator 20 | 21 | QGIS_APP = get_qgis_app() 22 | 23 | 24 | class SafeTranslationsTest(unittest.TestCase): 25 | """Test translations work.""" 26 | 27 | def setUp(self): 28 | """Runs before each test.""" 29 | if 'LANG' in iter(os.environ.keys()): 30 | os.environ.__delitem__('LANG') 31 | 32 | def tearDown(self): 33 | """Runs after each test.""" 34 | if 'LANG' in iter(os.environ.keys()): 35 | os.environ.__delitem__('LANG') 36 | 37 | def test_qgis_translations(self): 38 | """Test that translations work.""" 39 | parent_path = os.path.join(__file__, os.path.pardir, os.path.pardir) 40 | dir_path = os.path.abspath(parent_path) 41 | file_path = os.path.join( 42 | dir_path, 'i18n', 'af.qm') 43 | translator = QTranslator() 44 | translator.load(file_path) 45 | QCoreApplication.installTranslator(translator) 46 | 47 | expected_message = 'Goeie more' 48 | real_message = QCoreApplication.translate("@default", 'Good morning') 49 | self.assertEqual(real_message, expected_message) 50 | 51 | 52 | if __name__ == "__main__": 53 | suite = unittest.makeSuite(SafeTranslationsTest) 54 | runner = unittest.TextTestRunner(verbosity=2) 55 | runner.run(suite) 56 | -------------------------------------------------------------------------------- /test/utilities.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | """Common functionality used by regression tests.""" 3 | 4 | import sys 5 | import logging 6 | 7 | 8 | LOGGER = logging.getLogger('QGIS') 9 | QGIS_APP = None # Static variable used to hold hand to running QGIS app 10 | CANVAS = None 11 | PARENT = None 12 | IFACE = None 13 | 14 | 15 | def get_qgis_app(): 16 | """ Start one QGIS application to test against. 17 | 18 | :returns: Handle to QGIS app, canvas, iface and parent. If there are any 19 | errors the tuple members will be returned as None. 20 | :rtype: (QgsApplication, CANVAS, IFACE, PARENT) 21 | 22 | If QGIS is already running the handle to that app will be returned. 23 | """ 24 | 25 | try: 26 | from qgis.PyQt import QtGui, QtCore 27 | from qgis.core import QgsApplication 28 | from qgis.gui import QgsMapCanvas 29 | from .qgis_interface import QgisInterface 30 | except ImportError: 31 | return None, None, None, None 32 | 33 | global QGIS_APP # pylint: disable=W0603 34 | 35 | if QGIS_APP is None: 36 | gui_flag = True # All test will run qgis in gui mode 37 | #noinspection PyPep8Naming 38 | QGIS_APP = QgsApplication(sys.argv, gui_flag) 39 | # Make sure QGIS_PREFIX_PATH is set in your env if needed! 40 | QGIS_APP.initQgis() 41 | s = QGIS_APP.showSettings() 42 | LOGGER.debug(s) 43 | 44 | global PARENT # pylint: disable=W0603 45 | if PARENT is None: 46 | #noinspection PyPep8Naming 47 | PARENT = QtGui.QWidget() 48 | 49 | global CANVAS # pylint: disable=W0603 50 | if CANVAS is None: 51 | #noinspection PyPep8Naming 52 | CANVAS = QgsMapCanvas(PARENT) 53 | CANVAS.resize(QtCore.QSize(400, 400)) 54 | 55 | global IFACE # pylint: disable=W0603 56 | if IFACE is None: 57 | # QgisInterface is a stub implementation of the QGIS plugin interface 58 | #noinspection PyPep8Naming 59 | IFACE = QgisInterface(CANVAS) 60 | 61 | return QGIS_APP, CANVAS, IFACE, PARENT 62 | -------------------------------------------------------------------------------- /trash/code_trash: -------------------------------------------------------------------------------- 1 | 2 | bbox_text = self.input_polygon.boundingBox().asPolygon() 3 | 4 | # writing the bounding box in the session report: 5 | bbox_pts = bbox_text.split(',') 6 | 7 | self.dlg.for_tests.setText(bbox_pts[0]) 8 | 9 | 10 | 11 | lats = [(pt_txt.split(' ')[1]) for pt_txt in bbox_pts] 12 | lgts = [(pt_txt.split(' ')[0]) for pt_txt in bbox_pts] 13 | 14 | # minLat = min(lats) 15 | # maxLat = max(lats) 16 | 17 | # minLgt = min(lgts) 18 | # maxLgt = max(lgts) 19 | 20 | 21 | session_report.write(bbox_text+'\n') 22 | session_report.write(' '.join(lats)+'\n') 23 | session_report.write(' '.join(lgts)+'\n') 24 | # session_report.write(minLat+'\n') 25 | # session_report.write(maxLat+'\n') 26 | # session_report.write(minLgt+'\n') 27 | # session_report.write(maxLgt+'\n') 28 | 29 | 30 | with open(self.session_debugpath,'a+') as session_report: 31 | session_report.write(str(minLgt)+'\n') 32 | session_report.write(str(minLat)+'\n') 33 | session_report.write(str(maxLgt)+'\n') 34 | session_report.write(str(maxLat)+'\n') 35 | 36 | 37 | # # # segs_layer = segments_to_add_points_tolinelayer(self.whole_sidewalks,self.crossings_A_E_pointlist) 38 | 39 | 40 | # # # segs_layer.setCrs(self.custom_localTM_crs) 41 | 42 | # # # # self.add_layer_canvas(segs_layer) 43 | 44 | 45 | # # # # thats not the final splitted sidewalks, but a part of the process... 46 | # # # splitted_sidewalks = split_lines(self.whole_sidewalks,segs_layer) 47 | # # # splitted_sidewalks.setCrs(self.custom_localTM_crs) 48 | # # # # self.add_layer_canvas(splitted_sidewalks) 49 | 50 | 51 | # # # rejoined_multipart = rejoin_splitted_lines(splitted_sidewalks,self.protoblocks) 52 | # # # rejoined_multipart.setCrs(self.custom_localTM_crs) 53 | # # # # self.add_layer_canvas(rejoined_multipart) 54 | 55 | # # # rejoined_sidewalks = merge_touching_lines(rejoined_multipart) 56 | # # # rejoined_sidewalks.setCrs(self.custom_localTM_crs) 57 | 58 | # # # # now swapping features: 59 | # # # swap_features_layer_another(self.whole_sidewalks,rejoined_sidewalks) 60 | 61 | 62 | # self.add_layer_canvas(rejoined_sidewalks) --------------------------------------------------------------------------------