geocaml / ocaml-geojson

A library for manipulating, creating and parsing GeoJSON
https://geocaml.github.io/ocaml-geojson
Other
38 stars 10 forks source link

Add `id` field to Feature Objects #21

Closed patricoferris closed 2 years ago

patricoferris commented 2 years ago

From the RFC we have that:

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.

For example:

{
       "type": "Feature",
       "id": "f1",
       "geometry": {...},
       "properties": {...}
}

And currently we would just drop this field entirely:

https://github.com/geocaml/ocaml-geojson/blob/9eaaa54fa433bf732069e3e4623f9fd29c38b754/src/geojson/geojson.ml#L268

This is somewhat relevant to #20 as both will probably end up changing the type of Feature.t so there may be a bit of massaging needed for the PR to fix this, but that's okay.

ghost commented 2 years ago

@patricoferris I would love to give this a shot... Please assign it to me....

ghost commented 2 years ago

Hi @patricoferris is the value of the id going to come from the Json section or a randomly generated number?

patricoferris commented 2 years ago

The id field will be parsed from the JSON if it exists :))

streetCoderr commented 2 years ago

Hi @imajinarts, I just worked on a similar issue. If you are having problems, please don't hesitate to reach out to me. I want to see you make your first PR 😊 You've got this 💪💪

ghost commented 2 years ago

@streetCoderr I'll really appreciate the explanation.... Hopefully it'll tie with what I already have and I'll soon open the PR

Techbae22 commented 2 years ago

Hello @streetCoderr and @imajinarts @patricoferris ,

I could use some help here. Do I need to have a contributing project assigned to me or I can take up any project to contribute to?

Thanks

streetCoderr commented 2 years ago

@streetCoderr I'll really appreciate the explanation.... Hopefully it'll tie with what I already have and I'll soon open the PR

Alright @imajinarts. Well done.

streetCoderr commented 2 years ago

Hello @streetCoderr and @imajinarts @patricoferris ,

I could use some help here. Do I need to have a contributing project assigned to me or I can take up any project to contribute to?

Thanks

Hi @Techbae22 If you see any issue that no one is working on, you can ask our mentor @patricoferris to assign the task to you. He will attend to you when he comes online

ghost commented 2 years ago

@Techbae22 thanks and put mentor @patricoferris has the right to decide meanwhile feel free to throw in light on any issue... It is indeed open source and so collaboration is better

Techbae22 commented 2 years ago

Thanks everyone