Tom MacWright @macwright.com · Apr 20

all right, i want to stick geospatial data (geojson) in to atproto but floating point numbers aren't supported, so behold / cringe / critique my proposal: atfloathack github.com/tmcw/atfloat...

10 likes 4 replies

?

Replies

Tom MacWright · Apr 20

the readme covers this point, but to clear up any confusion up front, you could have an implicit understanding that coordinates in geojson are floats and so translate them back and forth. but geojson also supports feature properties, and those properties can have floating-point values. hence hack

steph · Apr 21

I used a slight variation on what protobuf / Google’s latE7/lonE7 do: store an integer plus a scale factor on the datastream record, so you can recover the float with whatever resolution you need. Works very well, see Info section sensorthings.dev and pdsls.dev/at://did:plc... for lexicons (v0.1!)

Volker Mische · Apr 22

For many cases this sounds better than what I came up with. It works well when you don't have a fixed schema, but arbitrary field names. It reminded me of tjson.org which is another approach which could work if you are in control of key names.

Boris · Apr 20

I ported this into a forum thread that we just restarted around #atgeo discourse.atprotocol.community/t/atfloathac... @vmx.cx @schuyler.info have been working on this issue, not sure what the suggestion is