Skip to content
This repository has been archived by the owner on Jul 4, 2022. It is now read-only.

start implementing the new GeoInterface #12

Merged
merged 10 commits into from
Apr 30, 2022
Merged

start implementing the new GeoInterface #12

merged 10 commits into from
Apr 30, 2022

Conversation

visr
Copy link
Owner

@visr visr commented Apr 30, 2022

This is an old branch, but it's good to have this available on master, as a starting point for the work in

JuliaGeo/GeoJSON.jl#36
and
#11

visr added 10 commits October 27, 2019 17:12
to avoid having to define the geointerface over the generic JSON3.Object 
type
The geometry JSON objects generally only contain "type" and 
"coordinates". The type is already known since it is the name of the 
struct. Therefore we can just put the "coordinates" inside, which is a 
JSON3.Array. Doing some benchmarks on the previous geometry structs, 
which all needed to access the coordinates field, I found that simply 
accessing this field was quite slow. Implementing it this way avoids 
that cost. The downside is that "foreign members" that may be contained 
in the geometry object will be lost, however this is not required by the 
spec.
Just like JSON3.Array. This means a lot more methods will accept them.
From the geointerface get* functions. This ensures that the result of 
these functions also comply to the geointerface.
@visr visr merged commit 6e9b87b into master Apr 30, 2022
@visr visr deleted the rfc branch April 30, 2022 19:09
@visr visr restored the rfc branch April 30, 2022 19:10
@visr visr deleted the rfc branch April 30, 2022 19:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant