hootenanny icon indicating copy to clipboard operation
hootenanny copied to clipboard

Processing Facility (AC000) changed to Facilities (AL010)

Open tdvorakcaci opened this issue 2 years ago • 7 comments

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

tdvorakcaci avatar Feb 28 '22 23:02 tdvorakcaci

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.

MikeTho16 avatar Feb 28 '22 23:02 MikeTho16

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

brianhatchl avatar Mar 01 '22 14:03 brianhatchl

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?

brianhatchl avatar Mar 01 '22 15:03 brianhatchl

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.

mattjdnv avatar Mar 03 '22 12:03 mattjdnv

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.

tdvorakcaci avatar Mar 03 '22 13:03 tdvorakcaci

Fix has been merged.

mattjdnv avatar Mar 03 '22 15:03 mattjdnv

I tested this today, and it is now working.

MikeTho16 avatar Mar 12 '22 20:03 MikeTho16