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

Processing Facility (AC000) changed to Facilities (AL010) #5271

Open
tdvorakcaci opened this issue Feb 28, 2022 · 7 comments
Open

Processing Facility (AC000) changed to Facilities (AL010) #5271

tdvorakcaci opened this issue Feb 28, 2022 · 7 comments

Comments

@tdvorakcaci
Copy link

Describe the bug
When a processing facility (AC000) is added, JOSM changes these features to a regular facility (AL010) and an error for "way" change appears.

To Reproduce
Steps to reproduce the behavior:
In JOSM 11.1, add a Processing Facility (FCODE=AC000). This will be switched to a Facility (AL010) with a "way" change warning (see screenshot below).
Manually changing it back to AC000 after it is reverted, the feature is still changed to a Facility.

Expected behavior
Processing Facility is a valid feature for extraction.

Screenshots
Error recieved in JOSM when extracting a Processing Facility (AC000)
PF_JOSM_error

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
N/A

@MikeTho16
Copy link

I have been unable to replicate this problem. I suspect that tdvorakcaci has different settings in their JOSM preferences, and that their preferences are the correct ones.

@brianhatchl
Copy link
Contributor

I can reproduce this. Will work with @mattjdnv to get the FCODE preserved round-trip.

@brianhatchl
Copy link
Contributor

brianhatchl commented Mar 1, 2022

Interestingly, if I go to Preferences... Nome Preferences... and uncheck "Drop defaults", the processing facility FCODE is preserved like @MikeTho16 experienced.

I think we want this setting (uncheck "Drop defaults") for your workflow @tdvorakcaci

@mattjdnv Here are the OSM tags sent to be translated and the MGCP tags returned when defaults are dropped:

        <tag k="condition" v="functional"/>
        <tag k="source:accuracy:horizontal:category" v="accurate"/>
        <tag k="facility" v="yes"/>
        <tag k="area" v="yes"/>
        <tag k="FUN" v="6"/>
        <tag k="FCODE" v="AL010"/>
        <tag k="ACC" v="1"/>
        <tag k="OSMTAGS" v="{&quot;area&quot;:&quot;yes&quot;}"/>

vs when defaults are included:

        <tag k="facility" v="yes"/>
        <tag k="gndb_id:2" v="N_A"/>
        <tag k="source:datetime" v="UNK"/>
        <tag k="condition" v="functional"/>
        <tag k="area" v="yes"/>
        <tag k="height" v="-32767.0"/>
        <tag k="source:name" v="unknown"/>
        <tag k="name" v="UNK"/>
        <tag k="source" v="N_A"/>
        <tag k="product" v="unknown"/>
        <tag k="uuid" v="{unk}"/>
        <tag k="aeroway:obstruction" v="UNK"/>
        <tag k="source:copyright" v="UNK"/>
        <tag k="note" v="N_A"/>
        <tag k="source:accuracy:horizontal:category" v="accurate"/>
        <tag k="gndb_id" v="N_A"/>
        <tag k="TXT" v="N_A"/>
        <tag k="VOI" v="UNK"/>
        <tag k="UID" v="UNK"/>
        <tag k="CCN" v="UNK"/>
        <tag k="NFI" v="N_A"/>
        <tag k="FCODE" v="AC000"/>
        <tag k="NAM" v="UNK"/>
        <tag k="SRT" v="0"/>
        <tag k="OSMTAGS" v="{&quot;area&quot;:&quot;yes&quot;}"/>
        <tag k="ACC" v="1"/>
        <tag k="HGT" v="-32767.0"/>
        <tag k="NFN" v="N_A"/>
        <tag k="FUN" v="6"/>
        <tag k="SDP" v="unknown"/>

Maybe the presence of one of the unknown tag keys (like product) is enough for the translation script to realize it's a processing facility vs a generic facility?

@mattjdnv
Copy link
Contributor

mattjdnv commented Mar 3, 2022

I think I have this fixed.
In MGCP, there is AC000 (Processing Facility) and AL010 (Facility).
In TDSvXXX there is only AL010 (Facility)

When importing MGCP, AC000 maps to facility=processing and AL010 maps to facility=yes
I had been using the convention that a Facility with a Product is a Processing Facility (AC000) and changing the tag to be facility=yes to be compatible with TDS.
The problem was, product=unknown was getting removed and the output changed to being a standard Facility (AL010) - as @tdvorakcaci and @brianhatchl found.

I have removed the code that was changing the tag and have added a mapping between facility=processing and AL010 in TDS so that the features convert corectly.

@tdvorakcaci
Copy link
Author

So, the "drop defaults" option will allow for the feature to be added correctly in JOSM. But it was tied to a larger translation issue that Matt identified above with TDS/TRD facility translations.

@mattjdnv
Copy link
Contributor

mattjdnv commented Mar 3, 2022

Fix has been merged.

@MikeTho16
Copy link

I tested this today, and it is now working.

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

No branches or pull requests

4 participants