<html><head></head><body><div><br></div><div>I agree, I think about something like ST_FilterM</div><div><br></div><div>But it can be even more general. Would it make sense to filtering other dims too?</div><div><br></div><div>Could it be usefull to get only points with x or y or z-values above or under some value?</div><div><br></div><div>I can't really see any use of it. Maybe in some sort of tiling situation to just filter out the vertex points in a tile?</div><div><br></div><div>The second question is about semantics. First I thought about text to describe the operator, like "more then", less than", "between" and so on.</div><div><br></div><div>But this function will be used where it is high performance demands and this would require strcmp, right? Or is there some other smart solution?</div><div>Another option is to define integers for the operators.</div><div><br></div><div>A third option is to have ST_Filter_M(geom, max, min);</div><div><br></div><div>if max is null then it should be above the min value, if min is NULL it should be below max-value. If both are used it is between.</div><div><br></div><div>The last option I see is to say that this should be very optimized so we have separate functions (ST_FilterMabove, ST_FilterMbelow).</div><div><br></div><div>But for the simplification uscase it should be enought with ST_FilterMabove. You never wants the vertex-points with lower values, without the ones with higher values unless you are building something that can add points to geometry to optimize on size per zoom level. (I tried that and it worked quite well)</div><div><br></div><div><br></div><div>/Nicklas</div><div><br></div><div>On Sat, 2017-09-23 at 08:50 -0700, Paul Ramsey wrote:</div><blockquote type="cite"><div dir="ltr">I think a more general M-filter is appropriate. There may be other ways of usefully populating an M for filtering than just VW.<div>P.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 23, 2017 at 4:05 AM, Sandro Santilli <span dir="ltr"><<a href="mailto:strk@kbt.io" target="_blank">strk@kbt.io</a>></span> wrote:<br><blockquote type="cite"><span class="">On Sat, Sep 23, 2017 at 12:39:16AM +0200, Nicklas Avén wrote:<br>
<br>
> Today we have no function doing this "removing of vertecies". But it<br>
> would be quite simple to write a function that just filters by the m-<br>
> value, and the simplification will be very fast.<br>
><br>
> It will be a 2.5 function, but what do you think?<br>
><br>
> Is this worth another function in the crowd?<br>
<br>
</span>Of course !<br>
Actually, I thought you already added that function<br>
as part of the Visvalingam-Whyatt algorithm work.<br>
Should it be a ST_SimplifyVWPrepared() or are you<br>
thinking of a more general "filter by M" one ?<br>
<br>
--strk;<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
postgis-devel mailing list<br>
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/postgis-devel</a></div></div><br></blockquote></div><br></div>
<pre>_______________________________________________
postgis-devel mailing list
<a href="mailto:postgis-devel@lists.osgeo.org">postgis-devel@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-devel">https://lists.osgeo.org/mailman/listinfo/postgis-devel</a></pre></blockquote></body></html>