Code Monkey home page Code Monkey logo

elm-geojson's People

Contributors

kiambogo avatar mgold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

tilmans

elm-geojson's Issues

RFC 7946 compliance

Differences between the original spec and the RFC include:

  • Remove CRS (#1)
  • Feature object id may be either a string or a number. (While inconvenient, I'm glad they resolved the ambiguity present in the original spec.)
  • Antimeridian Cutting. Haven't had a chance to read the RFC to see the impact of this.
  • Positions are no longer supposed to have more than three coordinates.

Support 0.19

Hi, is it possible to support 0.19 now that it's been released?

CRS was removed from the spec

Hi, looks good but I haven't actually used it yet.

One issue, in my mailing list post I linked to an older version of the spec, and while working on it I noticed that it was deprecated in favor of the official one: https://tools.ietf.org/html/rfc7946

In the official spec, CRS has been removed, and all GeoJSON objects are expected to use the WGS84 CRS: https://tools.ietf.org/html/rfc7946#section-4

So I think the maybe CRS and associated tests need to be removed.

I'd fork and pull-request, but my Elm skills are really weak at this point...

Proposal: Change Position to triple with default z of 0

We currently define positions as

type alias Position = ( Float, Float, List Float )

I would like to define them as

type alias Position = ( Float, Float, Float )

RFC 7946 section B.1. (second bullet) states

In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level (see Section 4).

which states

An OPTIONAL third-position element SHALL be the height in meters above or below the WGS 84 reference ellipsoid. In the absence of elevation values, applications sensitive to height or depth SHOULD interpret positions as being at local ground or sea level.

Therefore, decoding would use 0 as the third position if it was not present in the JSON. Encoding would remove any zeroes, since

Furthermore B.1. states

Implementations SHOULD NOT extend position arrays beyond 3 elements

which we currently do.

Although all of these are SHOULD recommendations not MUST requirements, it's good to follow them. The downside is that it requires a major version bump, and anyone using out-of-compliance geoJSON will be broken.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.