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

Unique id for each feature #48

Merged
merged 2 commits into from
Sep 3, 2014
Merged

Unique id for each feature #48

merged 2 commits into from
Sep 3, 2014

Conversation

mick
Copy link
Contributor

@mick mick commented Sep 3, 2014

  • generate a unique Id for each feature
  • return in callback from insert
  • add to geometry as feature.id
  • add user provided id as GSI added to main index with a different prefix.
  • query by user provided id

ref #44

@willwhite
Copy link
Contributor

yay 👍

mick added a commit that referenced this pull request Sep 3, 2014
Unique id for each feature
@mick mick merged commit cdf8d32 into master Sep 3, 2014
@mick mick deleted the ourid branch September 3, 2014 20:32
@rclark
Copy link
Contributor

rclark commented Sep 5, 2014

Question: What if a user provides a feature with an id specified outside properties? I thought that we were going to convert this input feature:

{
  "id": "user-id",
  "properties": { "stuff": "things" }
}

... into this on the way out:

{
  "id": "mapbox-id",
  "properties": {
    "id": "user-id",
    "stuff": "things"
  }
}

@mick
Copy link
Contributor Author

mick commented Sep 5, 2014

Yeah we should do that. What do you think we should do if both feature.id and feature.properties.id exist?

@mick
Copy link
Contributor Author

mick commented Sep 5, 2014

Actually we already talked about having feature.id mean update. So cant move the id to feature.properties.id which is happening in #45

@willwhite
Copy link
Contributor

Right, we should require that any user-defined id be specified inside
properties. Magically moving the id property around in this way would
not actually help the user very much, because they would have to know where
to look for it again anyway.

On Thursday, September 4, 2014, Mick Thompson notifications@github.com
wrote:

Actually we already talked about having feature.id mean update. So cant
move the id to feature.properties.id which is happening in #45
#45


Reply to this email directly or view it on GitHub
#48 (comment).

202-250-3633 | will@mapbox.com | @willwhitedc

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

Successfully merging this pull request may close these issues.

3 participants