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

GeoJSON Sample Data Feedback #21

Open
jsaligoe opened this issue May 21, 2019 · 2 comments
Open

GeoJSON Sample Data Feedback #21

jsaligoe opened this issue May 21, 2019 · 2 comments

Comments

@jsaligoe
Copy link

Sample Data Feedback
Issue applies to: Sample data 'geojson_property_extraproperties.json'

Sample data field names use reserved characters

In the sample data, the feature object “id” uses commonly reserved characters and symbols, e.g., “$”, in field names. The supplied file uses the identifier “$id”. A “$” sign is widely used in software to denote variable substitution, this is asking for fragility.

Similarly, the properties use object names “_type” and “$type” and recycle the identifier “id” [1]. The latter should be OK as you’re within a property array. But using identifiers closely confounded with a common database reserved word, a common variable substitution syntax and an easily missed (when displayed or printed) underscore character is again risking fragility.

To promote the greatest level of interoperability in mainstream web and desktop GIS clients, we recommend:

  • Reserved characters, brackets, and symbols should not be incorporated in field names [2]
    • Avoid spaces and certain characters not commonly supported in field names, e.g. hyphens; parentheses; brackets; and symbols such as $, ., %, and #

--

[1] The GeoJSON Format. Section 3.2 Feature Object: https://tools.ietf.org/html/rfc7946#page-11

  • "If a Feature has a commonly used identifier, that identifier SHOULD be included as a member of the Feature object with the name "id", and the value of this member is either a JSON string or number."
  • “SHOULD” is defined in https://tools.ietf.org/html/rfc2119:
      1. SHOULD This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

[2] ArcGIS Field Naming Guidelines https://desktop.arcgis.com/en/arcmap/latest/manage-data/tables/fundamentals-of-adding-and-deleting-fields.htm#GUID-8E190093-8F8F-4132-AF4F-B0C9220F76B3

@alexanderkotsev
Copy link
Contributor

@jsaligoe thanks for the issues raised. Please note that the 'geojson_property_extraproperties.json' file was initially committed when the repository was established so is a bit outdated. I will remove it out in order to avoid confusion in the future. INSPIRed GeoJSON for testing is available in the Alternative Encodings for INSPIRE data repository for two themes (Environmental Monitoring Facilities, and Addresses).

In particular on the issues raised:

  1. use of special symbols in property names - we experienced the same issue with the use of '.' in other products as well. Would an '_' work as part of the name for the ArcGIS products?
  1. On the inclusion of a feature member that contains the "id". The examples of INSPIRed GeoJSON data available in the Alternative Encodings for INSPIRE data repository already contain an 'id' feature member, so I think there is no issue with that.

@jsaligoe
Copy link
Author

@alexanderkotsev Thanks, we will omit this in our testing. Yes, the '_' underscore is supported in ArcGIS and would promote the greatest level of interoperability among the widest variety of GIS clients. I've added a recommendation for 2017.2 model simplification rules that lists characters to avoid, as well as reserved keywords, etc.

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

2 participants