Boscop

Results 547 comments of Boscop

+1 for this! Btw, I found this related blog post: http://nader.tn/2015/07/polymer-element-recreation/

I'm running into this too! Please fix this :)

Btw, this is how it looks in psql: ```sql geo=# select loc from users; loc ---------------------------------------------------- 0101000020E6100000D82C978DCED12A40B8E9CF7EA4424A40 (1 row) geo=# select ST_AsText(loc) from users; st_astext ---------------------------- POINT(13.409779 52.520645) (1 row)...

It's probably trying to deserialize the hex WKB as 2 f64: https://github.com/ThinkAlexandria/diesel_geometry/blob/master/src/pg/types/geometric.rs#L23-L24 Looking at this https://en.wikipedia.org/wiki/Well-known_text#Well-known_binary and this: http://trac.osgeo.org/postgis/browser/trunk/doc/ZMSgeoms.txt#L159 makes it clear: In my case above, first byte is 1...

This crate already provides a EWKB decoder for geography Point types (with SRID): https://github.com/andelf/rust-postgis/blob/5cf434b9c44783978d59a3359ae07061fce9da76/src/ewkb.rs#L341 We could just re-use that.. (It also uses MIT License) The wkb crate [doesn't seem to](https://github.com/rory/rust-wkb/search?utf8=%E2%9C%93&q=srid&type=)...

Yes, it's trying to interpret the first 8 bytes as the first f64 and the next 8 bytes as the second coordinate: http://www.binaryconvert.com/result_double.html?hexadecimal=0101000020E61000 0x0101000020E61000 -> 7.74681803935773114768989259805E-304 which matches the "`PgPoint`"...

Ah, we could also do it like the postgis crate: https://github.com/andelf/rust-postgis/blob/5cf434b9c44783978d59a3359ae07061fce9da76/src/ewkb.rs#L102 https://github.com/andelf/rust-postgis/blob/5cf434b9c44783978d59a3359ae07061fce9da76/src/postgis.rs#L27

@YetAnotherMinion do you have an idea what's the right way to serialize the EWKB?

@YetAnotherMinion Thanks, I'm looking forward to using the `diesel_geography` crate for some uni projects :) For now, I'd basically only need support for columns of type `geography(point, 4326)`, I can...

@YetAnotherMinion Any update on this? :) I'm looking forward to use & contribute to the `diesel_geography` crate..