Closed Ironholds closed 7 years ago
looks good.
wrt supporting converting other WKT types to bbox's: polygon and multipolygon for sure. usually that's all the web APIs we interact with support. but in theory could calculate bbox for any object, even a point even though that's a bit silly. i imagine others would want any WKT supported. i guess if easy enough to do, but if hard, then just polygon and multipolygon
another issue is polygon/multipolygon inside a featurecollection or geometrycollection - but at least for our purposes, we won't be dealing with that
Well, GeometryCollection is a type the contract requests this supports, right?
looks like we included GeometryCollection
as one one of the types to lint (see bullet 3)
for wkt_bounding
: i think should include Point, Multipoint, LineString, MultiLineString, Polygon, MultiPolygon, and GeometryCollection
Sounds good!
Wait, actually - isn't GeometryCollection potentially impossible? Insofar as a GC object can refer to multiple actual polygons. What to do in that case would be...unclear.
What to do in that case would be...unclear
what to do in what case? what do you mean by impossible?
Bounding boxes for GeometryCollection objects - IOW, how (and why) one would go about calculating the envelope of a potentially infinite set of discrete objects, stored as a geometrycollection
Bounding boxes for GeometryCollection objects - IOW, how (and why) one would go about calculating the envelope of a potentially infinite set of discrete objects, stored as a geometrycollection
Okay, let's drop GC's for now
Alright, first version is pretty much done (tm). It currently takes just under a second to turn 100,000 WKT objects into bounding boxes - that acceptable?
Yes, bueno 👌
Cool!
And WKT polygon generation takes...0.3 seconds from vectors, 0.4 from a list. Excellent. :D
noooiice
On the SP-to-bounding - presumably we can handle this indirectly by supporting (in sequence) SP-to-WKT and WKT-to-bounding conversion, da?
sounds good.
Okay, these functions (as wkt_bounding
and bounding_wkt
) are officially Ready For Alpha Testing (tm)
All looks good, tested out a bit, nothing I can see that needs changing
Sweet!
There should be two functions,
bounding_wkt
andwkt_bounding
:bounding_wkt
should:wkt_bounding
should: