Closed pjsier closed 4 years ago
Sorry for the late reply !
I guess it might be better to check for both.
The topojson specification doesn't specify any datatype for the id
field. The only example file in the example folder of this repo which is having an id
field (not within the property
fields) has it in a number type, so I guess we should consider this (and thus not default to string).
No problem, thanks for clarifying! I'll put in a PR for this now
I was looking into using this on a project that's also using the
geojson
crate, and it looks like this is using an older version that doesn't include thegeo-types
feature.I'm interested in putting in a PR for this, and from a quick look it doesn't seem too involved. The only conflict I'm seeing is that
geojson::feature::Id
is now an enum that supports both strings and number types. Not sure whether the update should default to a string or check for both