mgold / elm-geojson Goto Github PK
View Code? Open in Web Editor NEWGeoJSON parser for Elm
Home Page: http://package.elm-lang.org/packages/mgold/elm-geojson/latest/GeoJson
License: BSD 3-Clause "New" or "Revised" License
GeoJSON parser for Elm
Home Page: http://package.elm-lang.org/packages/mgold/elm-geojson/latest/GeoJson
License: BSD 3-Clause "New" or "Revised" License
Differences between the original spec and the RFC include:
id
may be either a string or a number. (While inconvenient, I'm glad they resolved the ambiguity present in the original spec.)Hi, is it possible to support 0.19 now that it's been released?
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...
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.