[postgis-devel] Call for advice about sql-signature for twkb functions
lr at pcorp.us
Fri Sep 26 16:04:11 PDT 2014
Took a quick look at offlineMap - the twkb file seems to load pretty fast on
my firefox browser. Couldn't figure out how the csv part works though
--maybe that's the part you are talking about that works only in Chrome.
Have you tried this on any smart phones/tables -- Android/iPhone etc?
That's where I think offline is most needed.
Now regarding cleanest design, I don't think there is one we can all agree
on. I see raster for example and in hindsight we went a bit too far with
the permutations of things, but then again having a ton of functions named
differently that do the same thing would probably have been just as
So here is my 2 cents
> 1) What is the cleanest design with many optional parameters
I look at this page:
http://postgis.net/docs/manual-dev/ST_AsTWKB.html (and really you should
only have 1 function this one -- bytea ST_AsTWKB(geometry g1, integer
decimaldigits, int8 geometryID, boolean include sizes); )
With all others just having default values and the order of the defaults
should be in the order you expect people will want to override them
So for example digits is probably something people are going to want to set
more than geometryID and probably include sizes as well. So the order you
have those is great.
Now to get rid of all of these and save the single one,
> 2) What do I need to do since everybody with trunk code already have a
set of sql-functions so I don't mess things up in your databases. It is
some place to put code that deletes earlier functions right --
If you go with my advice in 1 then you need to put the drop statements in
Otherwise when you change the remaining function to use default args, it
will croak since you would get an ambiguous something or other error if
those others exist while you are changing the remaining to use default args
-- A BIT OF DIGRESION HERE and hopefully won't start any flame wars--
Also was wondering if you have an openlayers equivalent (preferably OL3).
I've been playing with leaflet recently too but still debating which one
works best for my needs leaflet or OL3. OL3 still needs a lot of
documentation, Leaflet docs seem much easier to follow, but I've always
liked the everything I need in one box (and the better styling options
without resorting to extra plugins that the OL2 offered which I think OL3
does as well.
Hope that helps,
More information about the postgis-devel