lutraconsulting / ostranslator-ii

A graphical QGIS plugin for loading Ordnance Survey MasterMap into PostGIS.
16 stars 8 forks source link

Support for OS Highways Network #39

Closed double-u-a closed 5 years ago

double-u-a commented 7 years ago

Just wanted to confirm if the plugin supports the latest version of Urban Paths, because I loaded the paths layer from disc and set the plugin as follows:

image

This raises an error as soon as it starts to enter post-processing (after 100% in the progress bar).

I'm assuming OS Mastermap ITN Urban Paths (v8) is not the format that OS provide the paths data in?

2017-07-19T13:57:51 1   Traceback (most recent call last):
              File "/home/user/.qgis2/python/plugins/OSTranslatorII/os_translator_ii_dialog.py", line 471, in postProcess
                applyDefaultStyle=self.applyDefaultOsStyleCheckBox.checkState() == QtCore.Qt.Checked
              File "/home/user/.qgis2/python/plugins/OSTranslatorII/post_processor_thread.py", line 62, in __init__
                osmm_style_name=osmm_style_name)
              File "/home/user/.qgis2/python/plugins/OSTranslatorII/styler.py", line 39, in __init__
                self.populate_locations()
              File "/home/user/.qgis2/python/plugins/OSTranslatorII/styler.py", line 81, in populate_locations
                raise Exception("Unsupported OSMM schema {}".format(self.osmm_schema))
            Exception: Unsupported OSMM schema 8
JosephRedfern commented 7 years ago

I'm experiencing the same issue -- it looks like some code may be missing from styler.py. Line 27 of styler says self.osmm_schema = osmm_schema #7-9, but later on in the file (in the populate_locations method), only schema types 7 and 9 are dealt with.

JosephRedfern commented 7 years ago

@double-u-a This patch seems to fix the problem: https://github.com/JosephRedfern/ostranslator-ii/commit/12ca1c30f1e3e9ebc9c5571eec72a8f34081bad9

It may not be "the right thing to do", but if you urgently need to import Urban Paths then until we get official word, it should help.

double-u-a commented 7 years ago

@JosephRedfern That's great! The old error isn't showing up after I followed your patch.

Now I have another error but it looks unrelated, more to do with the SQL setup on our side anyway.

I also just finished just trying ogr2ogr on it and although there are a few warnings etc that also looks usable in PostGIS.

ErikRudeNielsen commented 6 years ago

I have created a gfs and a pioneering dataset for OSMM HRRAMI that I can upload in my branch of the project. It doesn't include Paths though.

saberraz commented 6 years ago

Hi @ErikRudeNielsen do you want to do a Pull Request to merge your changes to the main plugin?

saberraz commented 6 years ago

Example data can be found here: https://www.ordnancesurvey.co.uk/business-and-government/products/os-mastermap-highways-network.html

saberraz commented 6 years ago

These are the products which should be handled by OST II:

samuto commented 5 years ago

same issues here, I modified the code to make it run, but the table will be totally empty. the supported fields aren't the ones in the gml.gz files.

saberraz commented 5 years ago

This should be resolved with this PR: https://github.com/lutraconsulting/ostranslator-ii/pull/45