Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OSMM Highways Network #60

Open
walkermatt opened this issue Dec 15, 2017 · 2 comments
Open

Support for OSMM Highways Network #60

walkermatt opened this issue Dec 15, 2017 · 2 comments

Comments

@walkermatt
Copy link
Member

walkermatt commented Dec 15, 2017

This issue is to track progress on adding support for OSMM Highways Network.

WIP config notes can be found on the wiki: Ordnance Survey OSMM Highways Network to PostgreSQL/PostGIS.

Note: 016624f or later is currently required to use the --config GML_GFS_TEMPLATE $gfs_file option within the ogr_cmd.

/cc @archaeogeek

@archaeogeek
Copy link
Collaborator

archaeogeek commented Dec 15, 2017

I think we can generate a more complete gfs by including the configuration parameter GML_ATTRIBUTES_TO_OGR_FIELDS YES in the ogrinfo command that we're using to generate it.

cf the results of:

ogrinfo --config GML_ATTRIBUTES_TO_OGR_FIELDS YES -ro -so -al Highways_Rrami_RoadLink_INITIAL_001.gml

with:

ogrinfo -ro -so -al Highways_Rrami_RoadLink_INITIAL_001.gml

The latter adds the following to the gfs, amongst other things:

<PropertyDefn>
      <Name>directionality_title</Name>
      <ElementPath>directionality@title</ElementPath>
      <Type>String</Type>
      <Width>21</Width>
</PropertyDefn>
<PropertyDefn>
      <Name>directionality_href</Name>
      <ElementPath>directionality_href</ElementPath>
      <Type>String</Type>
      <Width>75</Width>
</PropertyDefn>

@walkermatt
Copy link
Member Author

To have ogrinfo create a set of gfs files try:

# Extract gml files
find -type f -iname '*.gz' -exec gunzip --force --keep '{}' \;

# Update gml so ogr can read it
find -type f -iname '*.gml' -exec sed -i -e 's/os:Transaction/os:FeatureCollection/' -e 's/os:insert/os:featureMember/' '{}' \;

# Have ogr create default .gfs files for each gml
find -type f -iname '*.gml' -exec ogrinfo -ro -so '{}' \;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants